diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a5abf6..ec81192 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- feat: update otel dependencies to latest + ## [1.9.1] - 2024-05-09 ### Fixed diff --git a/dist/index.js b/dist/index.js index 6edd352..29c7d6b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8450,7 +8450,7 @@ function getChannelzServiceDefinition() { } /* The purpose of this complexity is to avoid loading @grpc/proto-loader at * runtime for users who will not use/enable channelz. */ - const loaderLoadSync = (__nccwpck_require__(48934)/* .loadSync */ .J_); + const loaderLoadSync = (__nccwpck_require__(98171)/* .loadSync */ .J_); const loadedProto = loaderLoadSync('channelz.proto', { keepCase: true, longs: String, @@ -20919,7 +20919,7 @@ exports.uriToString = uriToString; /***/ }), -/***/ 48934: +/***/ 98171: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -20945,10 +20945,10 @@ var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = exports.J_ = __webpack_unused_export__ = exports.Cp = __webpack_unused_export__ = __webpack_unused_export__ = void 0; const camelCase = __nccwpck_require__(7994); -const Protobuf = __nccwpck_require__(4888); -const descriptor = __nccwpck_require__(20295); -const util_1 = __nccwpck_require__(32358); -const Long = __nccwpck_require__(18482); +const Protobuf = __nccwpck_require__(85881); +const descriptor = __nccwpck_require__(21629); +const util_1 = __nccwpck_require__(13245); +const Long = __nccwpck_require__(52694); __webpack_unused_export__ = Long; function isAnyExtension(obj) { return ('@type' in obj) && (typeof obj['@type'] === 'string'); @@ -21171,7 +21171,7 @@ __webpack_unused_export__ = loadFileDescriptorSetFromObject; /***/ }), -/***/ 32358: +/***/ 13245: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -21197,7 +21197,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.addCommonProtos = exports.loadProtosWithOptionsSync = exports.loadProtosWithOptions = void 0; const fs = __nccwpck_require__(57147); const path = __nccwpck_require__(71017); -const Protobuf = __nccwpck_require__(4888); +const Protobuf = __nccwpck_require__(85881); function addIncludePathResolver(root, includePaths) { const originalResolvePath = root.resolvePath; root.resolvePath = (origin, target) => { @@ -21253,10 +21253,10 @@ function addCommonProtos() { // Protobuf.js exposes: any, duration, empty, field_mask, struct, timestamp, // and wrappers. compiler/plugin is excluded in Protobuf.js and here. // Using constant strings for compatibility with tools like Webpack - const apiDescriptor = __nccwpck_require__(34823); - const descriptorDescriptor = __nccwpck_require__(36968); - const sourceContextDescriptor = __nccwpck_require__(27668); - const typeDescriptor = __nccwpck_require__(94961); + const apiDescriptor = __nccwpck_require__(44784); + const descriptorDescriptor = __nccwpck_require__(43571); + const sourceContextDescriptor = __nccwpck_require__(73342); + const typeDescriptor = __nccwpck_require__(58783); Protobuf.common('api', apiDescriptor.nested.google.nested.protobuf.nested); Protobuf.common('descriptor', descriptorDescriptor.nested.google.nested.protobuf.nested); Protobuf.common('source_context', sourceContextDescriptor.nested.google.nested.protobuf.nested); @@ -21267,31521 +21267,21625 @@ exports.addCommonProtos = addCommonProtos; /***/ }), -/***/ 20295: -/***/ ((module, exports, __nccwpck_require__) => { +/***/ 12592: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var $protobuf = __nccwpck_require__(4888); -module.exports = exports = $protobuf.descriptor = $protobuf.Root.fromJSON(__nccwpck_require__(36968)).lookup(".google.protobuf"); - -var Namespace = $protobuf.Namespace, - Root = $protobuf.Root, - Enum = $protobuf.Enum, - Type = $protobuf.Type, - Field = $protobuf.Field, - MapField = $protobuf.MapField, - OneOf = $protobuf.OneOf, - Service = $protobuf.Service, - Method = $protobuf.Method; - -// --- Root --- - -/** - * Properties of a FileDescriptorSet message. - * @interface IFileDescriptorSet - * @property {IFileDescriptorProto[]} file Files - */ - -/** - * Properties of a FileDescriptorProto message. - * @interface IFileDescriptorProto - * @property {string} [name] File name - * @property {string} [package] Package - * @property {*} [dependency] Not supported - * @property {*} [publicDependency] Not supported - * @property {*} [weakDependency] Not supported - * @property {IDescriptorProto[]} [messageType] Nested message types - * @property {IEnumDescriptorProto[]} [enumType] Nested enums - * @property {IServiceDescriptorProto[]} [service] Nested services - * @property {IFieldDescriptorProto[]} [extension] Nested extension fields - * @property {IFileOptions} [options] Options - * @property {*} [sourceCodeInfo] Not supported - * @property {string} [syntax="proto2"] Syntax - */ - -/** - * Properties of a FileOptions message. - * @interface IFileOptions - * @property {string} [javaPackage] - * @property {string} [javaOuterClassname] - * @property {boolean} [javaMultipleFiles] - * @property {boolean} [javaGenerateEqualsAndHash] - * @property {boolean} [javaStringCheckUtf8] - * @property {IFileOptionsOptimizeMode} [optimizeFor=1] - * @property {string} [goPackage] - * @property {boolean} [ccGenericServices] - * @property {boolean} [javaGenericServices] - * @property {boolean} [pyGenericServices] - * @property {boolean} [deprecated] - * @property {boolean} [ccEnableArenas] - * @property {string} [objcClassPrefix] - * @property {string} [csharpNamespace] - */ - -/** - * Values of he FileOptions.OptimizeMode enum. - * @typedef IFileOptionsOptimizeMode - * @type {number} - * @property {number} SPEED=1 - * @property {number} CODE_SIZE=2 - * @property {number} LITE_RUNTIME=3 - */ - -/** - * Creates a root from a descriptor set. - * @param {IFileDescriptorSet|Reader|Uint8Array} descriptor Descriptor - * @returns {Root} Root instance - */ -Root.fromDescriptor = function fromDescriptor(descriptor) { - - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.FileDescriptorSet.decode(descriptor); - var root = new Root(); +Object.defineProperty(exports, "t", ({ + value: true +})); - if (descriptor.file) { - var fileDescriptor, - filePackage; - for (var j = 0, i; j < descriptor.file.length; ++j) { - filePackage = root; - if ((fileDescriptor = descriptor.file[j])["package"] && fileDescriptor["package"].length) - filePackage = root.define(fileDescriptor["package"]); - if (fileDescriptor.name && fileDescriptor.name.length) - root.files.push(filePackage.filename = fileDescriptor.name); - if (fileDescriptor.messageType) - for (i = 0; i < fileDescriptor.messageType.length; ++i) - filePackage.add(Type.fromDescriptor(fileDescriptor.messageType[i], fileDescriptor.syntax)); - if (fileDescriptor.enumType) - for (i = 0; i < fileDescriptor.enumType.length; ++i) - filePackage.add(Enum.fromDescriptor(fileDescriptor.enumType[i])); - if (fileDescriptor.extension) - for (i = 0; i < fileDescriptor.extension.length; ++i) - filePackage.add(Field.fromDescriptor(fileDescriptor.extension[i])); - if (fileDescriptor.service) - for (i = 0; i < fileDescriptor.service.length; ++i) - filePackage.add(Service.fromDescriptor(fileDescriptor.service[i])); - var opts = fromDescriptorOptions(fileDescriptor.options, exports.FileOptions); - if (opts) { - var ks = Object.keys(opts); - for (i = 0; i < ks.length; ++i) - filePackage.setOption(ks[i], opts[ks[i]]); +class TreeNode { + constructor(t, e, s = 1) { + this.i = undefined; + this.h = undefined; + this.o = undefined; + this.u = t; + this.l = e; + this.p = s; + } + I() { + let t = this; + const e = t.o.o === t; + if (e && t.p === 1) { + t = t.h; + } else if (t.i) { + t = t.i; + while (t.h) { + t = t.h; + } + } else { + if (e) { + return t.o; + } + let s = t.o; + while (s.i === t) { + t = s; + s = t.o; } + t = s; } + return t; + } + B() { + let t = this; + if (t.h) { + t = t.h; + while (t.i) { + t = t.i; + } + return t; + } else { + let e = t.o; + while (e.h === t) { + t = e; + e = t.o; + } + if (t.h !== e) { + return e; + } else return t; + } + } + _() { + const t = this.o; + const e = this.h; + const s = e.i; + if (t.o === this) t.o = e; else if (t.i === this) t.i = e; else t.h = e; + e.o = t; + e.i = this; + this.o = e; + this.h = s; + if (s) s.o = this; + return e; + } + g() { + const t = this.o; + const e = this.i; + const s = e.h; + if (t.o === this) t.o = e; else if (t.i === this) t.i = e; else t.h = e; + e.o = t; + e.h = this; + this.o = e; + this.i = s; + if (s) s.o = this; + return e; } - - return root; -}; - -/** - * Converts a root to a descriptor set. - * @returns {Message} Descriptor - * @param {string} [syntax="proto2"] Syntax - */ -Root.prototype.toDescriptor = function toDescriptor(syntax) { - var set = exports.FileDescriptorSet.create(); - Root_toDescriptorRecursive(this, set.file, syntax); - return set; -}; - -// Traverses a namespace and assembles the descriptor set -function Root_toDescriptorRecursive(ns, files, syntax) { - - // Create a new file - var file = exports.FileDescriptorProto.create({ name: ns.filename || (ns.fullName.substring(1).replace(/\./g, "_") || "root") + ".proto" }); - if (syntax) - file.syntax = syntax; - if (!(ns instanceof Root)) - file["package"] = ns.fullName.substring(1); - - // Add nested types - for (var i = 0, nested; i < ns.nestedArray.length; ++i) - if ((nested = ns._nestedArray[i]) instanceof Type) - file.messageType.push(nested.toDescriptor(syntax)); - else if (nested instanceof Enum) - file.enumType.push(nested.toDescriptor()); - else if (nested instanceof Field) - file.extension.push(nested.toDescriptor(syntax)); - else if (nested instanceof Service) - file.service.push(nested.toDescriptor()); - else if (nested instanceof /* plain */ Namespace) - Root_toDescriptorRecursive(nested, files, syntax); // requires new file - - // Keep package-level options - file.options = toDescriptorOptions(ns.options, exports.FileOptions); - - // And keep the file only if there is at least one nested object - if (file.messageType.length + file.enumType.length + file.extension.length + file.service.length) - files.push(file); } -// --- Type --- - -/** - * Properties of a DescriptorProto message. - * @interface IDescriptorProto - * @property {string} [name] Message type name - * @property {IFieldDescriptorProto[]} [field] Fields - * @property {IFieldDescriptorProto[]} [extension] Extension fields - * @property {IDescriptorProto[]} [nestedType] Nested message types - * @property {IEnumDescriptorProto[]} [enumType] Nested enums - * @property {IDescriptorProtoExtensionRange[]} [extensionRange] Extension ranges - * @property {IOneofDescriptorProto[]} [oneofDecl] Oneofs - * @property {IMessageOptions} [options] Not supported - * @property {IDescriptorProtoReservedRange[]} [reservedRange] Reserved ranges - * @property {string[]} [reservedName] Reserved names - */ - -/** - * Properties of a MessageOptions message. - * @interface IMessageOptions - * @property {boolean} [mapEntry=false] Whether this message is a map entry - */ - -/** - * Properties of an ExtensionRange message. - * @interface IDescriptorProtoExtensionRange - * @property {number} [start] Start field id - * @property {number} [end] End field id - */ - -/** - * Properties of a ReservedRange message. - * @interface IDescriptorProtoReservedRange - * @property {number} [start] Start field id - * @property {number} [end] End field id - */ +class TreeNodeEnableIndex extends TreeNode { + constructor() { + super(...arguments); + this.M = 1; + } + _() { + const t = super._(); + this.O(); + t.O(); + return t; + } + g() { + const t = super.g(); + this.O(); + t.O(); + return t; + } + O() { + this.M = 1; + if (this.i) { + this.M += this.i.M; + } + if (this.h) { + this.M += this.h.M; + } + } +} -var unnamedMessageIndex = 0; +class ContainerIterator { + constructor(t = 0) { + this.iteratorType = t; + } + equals(t) { + return this.T === t.T; + } +} -/** - * Creates a type from a descriptor. - * @param {IDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @param {string} [syntax="proto2"] Syntax - * @returns {Type} Type instance - */ -Type.fromDescriptor = function fromDescriptor(descriptor, syntax) { +class Base { + constructor() { + this.m = 0; + } + get length() { + return this.m; + } + size() { + return this.m; + } + empty() { + return this.m === 0; + } +} - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.DescriptorProto.decode(descriptor); +class Container extends Base {} - // Create the message type - var type = new Type(descriptor.name.length ? descriptor.name : "Type" + unnamedMessageIndex++, fromDescriptorOptions(descriptor.options, exports.MessageOptions)), - i; +function throwIteratorAccessError() { + throw new RangeError("Iterator access denied!"); +} - /* Oneofs */ if (descriptor.oneofDecl) - for (i = 0; i < descriptor.oneofDecl.length; ++i) - type.add(OneOf.fromDescriptor(descriptor.oneofDecl[i])); - /* Fields */ if (descriptor.field) - for (i = 0; i < descriptor.field.length; ++i) { - var field = Field.fromDescriptor(descriptor.field[i], syntax); - type.add(field); - if (descriptor.field[i].hasOwnProperty("oneofIndex")) // eslint-disable-line no-prototype-builtins - type.oneofsArray[descriptor.field[i].oneofIndex].add(field); - } - /* Extension fields */ if (descriptor.extension) - for (i = 0; i < descriptor.extension.length; ++i) - type.add(Field.fromDescriptor(descriptor.extension[i], syntax)); - /* Nested types */ if (descriptor.nestedType) - for (i = 0; i < descriptor.nestedType.length; ++i) { - type.add(Type.fromDescriptor(descriptor.nestedType[i], syntax)); - if (descriptor.nestedType[i].options && descriptor.nestedType[i].options.mapEntry) - type.setOption("map_entry", true); +class TreeContainer extends Container { + constructor(t = function(t, e) { + if (t < e) return -1; + if (t > e) return 1; + return 0; + }, e = false) { + super(); + this.v = undefined; + this.A = t; + this.enableIndex = e; + this.N = e ? TreeNodeEnableIndex : TreeNode; + this.C = new this.N; + } + R(t, e) { + let s = this.C; + while (t) { + const i = this.A(t.u, e); + if (i < 0) { + t = t.h; + } else if (i > 0) { + s = t; + t = t.i; + } else return t; } - /* Nested enums */ if (descriptor.enumType) - for (i = 0; i < descriptor.enumType.length; ++i) - type.add(Enum.fromDescriptor(descriptor.enumType[i])); - /* Extension ranges */ if (descriptor.extensionRange && descriptor.extensionRange.length) { - type.extensions = []; - for (i = 0; i < descriptor.extensionRange.length; ++i) - type.extensions.push([ descriptor.extensionRange[i].start, descriptor.extensionRange[i].end ]); + return s; } - /* Reserved... */ if (descriptor.reservedRange && descriptor.reservedRange.length || descriptor.reservedName && descriptor.reservedName.length) { - type.reserved = []; - /* Ranges */ if (descriptor.reservedRange) - for (i = 0; i < descriptor.reservedRange.length; ++i) - type.reserved.push([ descriptor.reservedRange[i].start, descriptor.reservedRange[i].end ]); - /* Names */ if (descriptor.reservedName) - for (i = 0; i < descriptor.reservedName.length; ++i) - type.reserved.push(descriptor.reservedName[i]); + K(t, e) { + let s = this.C; + while (t) { + const i = this.A(t.u, e); + if (i <= 0) { + t = t.h; + } else { + s = t; + t = t.i; + } + } + return s; } - - return type; -}; - -/** - * Converts a type to a descriptor. - * @returns {Message} Descriptor - * @param {string} [syntax="proto2"] Syntax - */ -Type.prototype.toDescriptor = function toDescriptor(syntax) { - var descriptor = exports.DescriptorProto.create({ name: this.name }), - i; - - /* Fields */ for (i = 0; i < this.fieldsArray.length; ++i) { - var fieldDescriptor; - descriptor.field.push(fieldDescriptor = this._fieldsArray[i].toDescriptor(syntax)); - if (this._fieldsArray[i] instanceof MapField) { // map fields are repeated FieldNameEntry - var keyType = toDescriptorType(this._fieldsArray[i].keyType, this._fieldsArray[i].resolvedKeyType), - valueType = toDescriptorType(this._fieldsArray[i].type, this._fieldsArray[i].resolvedType), - valueTypeName = valueType === /* type */ 11 || valueType === /* enum */ 14 - ? this._fieldsArray[i].resolvedType && shortname(this.parent, this._fieldsArray[i].resolvedType) || this._fieldsArray[i].type - : undefined; - descriptor.nestedType.push(exports.DescriptorProto.create({ - name: fieldDescriptor.typeName, - field: [ - exports.FieldDescriptorProto.create({ name: "key", number: 1, label: 1, type: keyType }), // can't reference a type or enum - exports.FieldDescriptorProto.create({ name: "value", number: 2, label: 1, type: valueType, typeName: valueTypeName }) - ], - options: exports.MessageOptions.create({ mapEntry: true }) - })); + L(t, e) { + let s = this.C; + while (t) { + const i = this.A(t.u, e); + if (i < 0) { + s = t; + t = t.h; + } else if (i > 0) { + t = t.i; + } else return t; } + return s; } - /* Oneofs */ for (i = 0; i < this.oneofsArray.length; ++i) - descriptor.oneofDecl.push(this._oneofsArray[i].toDescriptor()); - /* Nested... */ for (i = 0; i < this.nestedArray.length; ++i) { - /* Extension fields */ if (this._nestedArray[i] instanceof Field) - descriptor.field.push(this._nestedArray[i].toDescriptor(syntax)); - /* Types */ else if (this._nestedArray[i] instanceof Type) - descriptor.nestedType.push(this._nestedArray[i].toDescriptor(syntax)); - /* Enums */ else if (this._nestedArray[i] instanceof Enum) - descriptor.enumType.push(this._nestedArray[i].toDescriptor()); - // plain nested namespaces become packages instead in Root#toDescriptor + k(t, e) { + let s = this.C; + while (t) { + const i = this.A(t.u, e); + if (i < 0) { + s = t; + t = t.h; + } else { + t = t.i; + } + } + return s; } - /* Extension ranges */ if (this.extensions) - for (i = 0; i < this.extensions.length; ++i) - descriptor.extensionRange.push(exports.DescriptorProto.ExtensionRange.create({ start: this.extensions[i][0], end: this.extensions[i][1] })); - /* Reserved... */ if (this.reserved) - for (i = 0; i < this.reserved.length; ++i) - /* Names */ if (typeof this.reserved[i] === "string") - descriptor.reservedName.push(this.reserved[i]); - /* Ranges */ else - descriptor.reservedRange.push(exports.DescriptorProto.ReservedRange.create({ start: this.reserved[i][0], end: this.reserved[i][1] })); - - descriptor.options = toDescriptorOptions(this.options, exports.MessageOptions); - - return descriptor; -}; - -// --- Field --- - -/** - * Properties of a FieldDescriptorProto message. - * @interface IFieldDescriptorProto - * @property {string} [name] Field name - * @property {number} [number] Field id - * @property {IFieldDescriptorProtoLabel} [label] Field rule - * @property {IFieldDescriptorProtoType} [type] Field basic type - * @property {string} [typeName] Field type name - * @property {string} [extendee] Extended type name - * @property {string} [defaultValue] Literal default value - * @property {number} [oneofIndex] Oneof index if part of a oneof - * @property {*} [jsonName] Not supported - * @property {IFieldOptions} [options] Field options - */ - -/** - * Values of the FieldDescriptorProto.Label enum. - * @typedef IFieldDescriptorProtoLabel - * @type {number} - * @property {number} LABEL_OPTIONAL=1 - * @property {number} LABEL_REQUIRED=2 - * @property {number} LABEL_REPEATED=3 - */ - -/** - * Values of the FieldDescriptorProto.Type enum. - * @typedef IFieldDescriptorProtoType - * @type {number} - * @property {number} TYPE_DOUBLE=1 - * @property {number} TYPE_FLOAT=2 - * @property {number} TYPE_INT64=3 - * @property {number} TYPE_UINT64=4 - * @property {number} TYPE_INT32=5 - * @property {number} TYPE_FIXED64=6 - * @property {number} TYPE_FIXED32=7 - * @property {number} TYPE_BOOL=8 - * @property {number} TYPE_STRING=9 - * @property {number} TYPE_GROUP=10 - * @property {number} TYPE_MESSAGE=11 - * @property {number} TYPE_BYTES=12 - * @property {number} TYPE_UINT32=13 - * @property {number} TYPE_ENUM=14 - * @property {number} TYPE_SFIXED32=15 - * @property {number} TYPE_SFIXED64=16 - * @property {number} TYPE_SINT32=17 - * @property {number} TYPE_SINT64=18 - */ - -/** - * Properties of a FieldOptions message. - * @interface IFieldOptions - * @property {boolean} [packed] Whether packed or not (defaults to `false` for proto2 and `true` for proto3) - * @property {IFieldOptionsJSType} [jstype] JavaScript value type (not used by protobuf.js) - */ - -/** - * Values of the FieldOptions.JSType enum. - * @typedef IFieldOptionsJSType - * @type {number} - * @property {number} JS_NORMAL=0 - * @property {number} JS_STRING=1 - * @property {number} JS_NUMBER=2 - */ - -// copied here from parse.js -var numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/; - -/** - * Creates a field from a descriptor. - * @param {IFieldDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @param {string} [syntax="proto2"] Syntax - * @returns {Field} Field instance - */ -Field.fromDescriptor = function fromDescriptor(descriptor, syntax) { - - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.DescriptorProto.decode(descriptor); - - if (typeof descriptor.number !== "number") - throw Error("missing field id"); - - // Rewire field type - var fieldType; - if (descriptor.typeName && descriptor.typeName.length) - fieldType = descriptor.typeName; - else - fieldType = fromDescriptorType(descriptor.type); - - // Rewire field rule - var fieldRule; - switch (descriptor.label) { - // 0 is reserved for errors - case 1: fieldRule = undefined; break; - case 2: fieldRule = "required"; break; - case 3: fieldRule = "repeated"; break; - default: throw Error("illegal label: " + descriptor.label); + P(t) { + while (true) { + const e = t.o; + if (e === this.C) return; + if (t.p === 1) { + t.p = 0; + return; + } + if (t === e.i) { + const s = e.h; + if (s.p === 1) { + s.p = 0; + e.p = 1; + if (e === this.v) { + this.v = e._(); + } else e._(); + } else { + if (s.h && s.h.p === 1) { + s.p = e.p; + e.p = 0; + s.h.p = 0; + if (e === this.v) { + this.v = e._(); + } else e._(); + return; + } else if (s.i && s.i.p === 1) { + s.p = 1; + s.i.p = 0; + s.g(); + } else { + s.p = 1; + t = e; + } + } + } else { + const s = e.i; + if (s.p === 1) { + s.p = 0; + e.p = 1; + if (e === this.v) { + this.v = e.g(); + } else e.g(); + } else { + if (s.i && s.i.p === 1) { + s.p = e.p; + e.p = 0; + s.i.p = 0; + if (e === this.v) { + this.v = e.g(); + } else e.g(); + return; + } else if (s.h && s.h.p === 1) { + s.p = 1; + s.h.p = 0; + s._(); + } else { + s.p = 1; + t = e; + } + } + } + } } - - var extendee = descriptor.extendee; - if (descriptor.extendee !== undefined) { - extendee = extendee.length ? extendee : undefined; - } - var field = new Field( - descriptor.name.length ? descriptor.name : "field" + descriptor.number, - descriptor.number, - fieldType, - fieldRule, - extendee - ); - - field.options = fromDescriptorOptions(descriptor.options, exports.FieldOptions); - - if (descriptor.defaultValue && descriptor.defaultValue.length) { - var defaultValue = descriptor.defaultValue; - switch (defaultValue) { - case "true": case "TRUE": - defaultValue = true; - break; - case "false": case "FALSE": - defaultValue = false; - break; - default: - var match = numberRe.exec(defaultValue); - if (match) - defaultValue = parseInt(defaultValue); // eslint-disable-line radix - break; + S(t) { + if (this.m === 1) { + this.clear(); + return; + } + let e = t; + while (e.i || e.h) { + if (e.h) { + e = e.h; + while (e.i) e = e.i; + } else { + e = e.i; + } + const s = t.u; + t.u = e.u; + e.u = s; + const i = t.l; + t.l = e.l; + e.l = i; + t = e; + } + if (this.C.i === e) { + this.C.i = e.o; + } else if (this.C.h === e) { + this.C.h = e.o; + } + this.P(e); + let s = e.o; + if (e === s.i) { + s.i = undefined; + } else s.h = undefined; + this.m -= 1; + this.v.p = 0; + if (this.enableIndex) { + while (s !== this.C) { + s.M -= 1; + s = s.o; + } } - field.setOption("default", defaultValue); } - - if (packableDescriptorType(descriptor.type)) { - if (syntax === "proto3") { // defaults to packed=true (internal preset is packed=true) - if (descriptor.options && !descriptor.options.packed) - field.setOption("packed", false); - } else if (!(descriptor.options && descriptor.options.packed)) // defaults to packed=false - field.setOption("packed", false); + U(t) { + const e = typeof t === "number" ? t : undefined; + const s = typeof t === "function" ? t : undefined; + const i = typeof t === "undefined" ? [] : undefined; + let r = 0; + let n = this.v; + const h = []; + while (h.length || n) { + if (n) { + h.push(n); + n = n.i; + } else { + n = h.pop(); + if (r === e) return n; + i && i.push(n); + s && s(n, r, this); + r += 1; + n = n.h; + } + } + return i; } - - return field; -}; - -/** - * Converts a field to a descriptor. - * @returns {Message} Descriptor - * @param {string} [syntax="proto2"] Syntax - */ -Field.prototype.toDescriptor = function toDescriptor(syntax) { - var descriptor = exports.FieldDescriptorProto.create({ name: this.name, number: this.id }); - - if (this.map) { - - descriptor.type = 11; // message - descriptor.typeName = $protobuf.util.ucFirst(this.name); // fieldName -> FieldNameEntry (built in Type#toDescriptor) - descriptor.label = 3; // repeated - - } else { - - // Rewire field type - switch (descriptor.type = toDescriptorType(this.type, this.resolve().resolvedType)) { - case 10: // group - case 11: // type - case 14: // enum - descriptor.typeName = this.resolvedType ? shortname(this.parent, this.resolvedType) : this.type; - break; + j(t) { + while (true) { + const e = t.o; + if (e.p === 0) return; + const s = e.o; + if (e === s.i) { + const i = s.h; + if (i && i.p === 1) { + i.p = e.p = 0; + if (s === this.v) return; + s.p = 1; + t = s; + continue; + } else if (t === e.h) { + t.p = 0; + if (t.i) { + t.i.o = e; + } + if (t.h) { + t.h.o = s; + } + e.h = t.i; + s.i = t.h; + t.i = e; + t.h = s; + if (s === this.v) { + this.v = t; + this.C.o = t; + } else { + const e = s.o; + if (e.i === s) { + e.i = t; + } else e.h = t; + } + t.o = s.o; + e.o = t; + s.o = t; + s.p = 1; + } else { + e.p = 0; + if (s === this.v) { + this.v = s.g(); + } else s.g(); + s.p = 1; + return; + } + } else { + const i = s.i; + if (i && i.p === 1) { + i.p = e.p = 0; + if (s === this.v) return; + s.p = 1; + t = s; + continue; + } else if (t === e.i) { + t.p = 0; + if (t.i) { + t.i.o = s; + } + if (t.h) { + t.h.o = e; + } + s.h = t.i; + e.i = t.h; + t.i = s; + t.h = e; + if (s === this.v) { + this.v = t; + this.C.o = t; + } else { + const e = s.o; + if (e.i === s) { + e.i = t; + } else e.h = t; + } + t.o = s.o; + e.o = t; + s.o = t; + s.p = 1; + } else { + e.p = 0; + if (s === this.v) { + this.v = s._(); + } else s._(); + s.p = 1; + return; + } + } + if (this.enableIndex) { + e.O(); + s.O(); + t.O(); + } + return; } - - // Rewire field rule - switch (this.rule) { - case "repeated": descriptor.label = 3; break; - case "required": descriptor.label = 2; break; - default: descriptor.label = 1; break; + } + q(t, e, s) { + if (this.v === undefined) { + this.m += 1; + this.v = new this.N(t, e, 0); + this.v.o = this.C; + this.C.o = this.C.i = this.C.h = this.v; + return this.m; } - + let i; + const r = this.C.i; + const n = this.A(r.u, t); + if (n === 0) { + r.l = e; + return this.m; + } else if (n > 0) { + r.i = new this.N(t, e); + r.i.o = r; + i = r.i; + this.C.i = i; + } else { + const r = this.C.h; + const n = this.A(r.u, t); + if (n === 0) { + r.l = e; + return this.m; + } else if (n < 0) { + r.h = new this.N(t, e); + r.h.o = r; + i = r.h; + this.C.h = i; + } else { + if (s !== undefined) { + const r = s.T; + if (r !== this.C) { + const s = this.A(r.u, t); + if (s === 0) { + r.l = e; + return this.m; + } else if (s > 0) { + const s = r.I(); + const n = this.A(s.u, t); + if (n === 0) { + s.l = e; + return this.m; + } else if (n < 0) { + i = new this.N(t, e); + if (s.h === undefined) { + s.h = i; + i.o = s; + } else { + r.i = i; + i.o = r; + } + } + } + } + } + if (i === undefined) { + i = this.v; + while (true) { + const s = this.A(i.u, t); + if (s > 0) { + if (i.i === undefined) { + i.i = new this.N(t, e); + i.i.o = i; + i = i.i; + break; + } + i = i.i; + } else if (s < 0) { + if (i.h === undefined) { + i.h = new this.N(t, e); + i.h.o = i; + i = i.h; + break; + } + i = i.h; + } else { + i.l = e; + return this.m; + } + } + } + } + } + if (this.enableIndex) { + let t = i.o; + while (t !== this.C) { + t.M += 1; + t = t.o; + } + } + this.j(i); + this.m += 1; + return this.m; } - - // Handle extension field - descriptor.extendee = this.extensionField ? this.extensionField.parent.fullName : this.extend; - - // Handle part of oneof - if (this.partOf) - if ((descriptor.oneofIndex = this.parent.oneofsArray.indexOf(this.partOf)) < 0) - throw Error("missing oneof"); - - if (this.options) { - descriptor.options = toDescriptorOptions(this.options, exports.FieldOptions); - if (this.options["default"] != null) - descriptor.defaultValue = String(this.options["default"]); + H(t, e) { + while (t) { + const s = this.A(t.u, e); + if (s < 0) { + t = t.h; + } else if (s > 0) { + t = t.i; + } else return t; + } + return t || this.C; } - - if (syntax === "proto3") { // defaults to packed=true - if (!this.packed) - (descriptor.options || (descriptor.options = exports.FieldOptions.create())).packed = false; - } else if (this.packed) // defaults to packed=false - (descriptor.options || (descriptor.options = exports.FieldOptions.create())).packed = true; - - return descriptor; -}; - -// --- Enum --- - -/** - * Properties of an EnumDescriptorProto message. - * @interface IEnumDescriptorProto - * @property {string} [name] Enum name - * @property {IEnumValueDescriptorProto[]} [value] Enum values - * @property {IEnumOptions} [options] Enum options - */ - -/** - * Properties of an EnumValueDescriptorProto message. - * @interface IEnumValueDescriptorProto - * @property {string} [name] Name - * @property {number} [number] Value - * @property {*} [options] Not supported - */ - -/** - * Properties of an EnumOptions message. - * @interface IEnumOptions - * @property {boolean} [allowAlias] Whether aliases are allowed - * @property {boolean} [deprecated] - */ - -var unnamedEnumIndex = 0; - -/** - * Creates an enum from a descriptor. - * @param {IEnumDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @returns {Enum} Enum instance - */ -Enum.fromDescriptor = function fromDescriptor(descriptor) { - - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.EnumDescriptorProto.decode(descriptor); - - // Construct values object - var values = {}; - if (descriptor.value) - for (var i = 0; i < descriptor.value.length; ++i) { - var name = descriptor.value[i].name, - value = descriptor.value[i].number || 0; - values[name && name.length ? name : "NAME" + value] = value; + clear() { + this.m = 0; + this.v = undefined; + this.C.o = undefined; + this.C.i = this.C.h = undefined; + } + updateKeyByIterator(t, e) { + const s = t.T; + if (s === this.C) { + throwIteratorAccessError(); } + if (this.m === 1) { + s.u = e; + return true; + } + const i = s.B().u; + if (s === this.C.i) { + if (this.A(i, e) > 0) { + s.u = e; + return true; + } + return false; + } + const r = s.I().u; + if (s === this.C.h) { + if (this.A(r, e) < 0) { + s.u = e; + return true; + } + return false; + } + if (this.A(r, e) >= 0 || this.A(i, e) <= 0) return false; + s.u = e; + return true; + } + eraseElementByPos(t) { + if (t < 0 || t > this.m - 1) { + throw new RangeError; + } + const e = this.U(t); + this.S(e); + return this.m; + } + eraseElementByKey(t) { + if (this.m === 0) return false; + const e = this.H(this.v, t); + if (e === this.C) return false; + this.S(e); + return true; + } + eraseElementByIterator(t) { + const e = t.T; + if (e === this.C) { + throwIteratorAccessError(); + } + const s = e.h === undefined; + const i = t.iteratorType === 0; + if (i) { + if (s) t.next(); + } else { + if (!s || e.i === undefined) t.next(); + } + this.S(e); + return t; + } + getHeight() { + if (this.m === 0) return 0; + function traversal(t) { + if (!t) return 0; + return Math.max(traversal(t.i), traversal(t.h)) + 1; + } + return traversal(this.v); + } +} - return new Enum( - descriptor.name && descriptor.name.length ? descriptor.name : "Enum" + unnamedEnumIndex++, - values, - fromDescriptorOptions(descriptor.options, exports.EnumOptions) - ); -}; - -/** - * Converts an enum to a descriptor. - * @returns {Message} Descriptor - */ -Enum.prototype.toDescriptor = function toDescriptor() { +class TreeIterator extends ContainerIterator { + constructor(t, e, s) { + super(s); + this.T = t; + this.C = e; + if (this.iteratorType === 0) { + this.pre = function() { + if (this.T === this.C.i) { + throwIteratorAccessError(); + } + this.T = this.T.I(); + return this; + }; + this.next = function() { + if (this.T === this.C) { + throwIteratorAccessError(); + } + this.T = this.T.B(); + return this; + }; + } else { + this.pre = function() { + if (this.T === this.C.h) { + throwIteratorAccessError(); + } + this.T = this.T.B(); + return this; + }; + this.next = function() { + if (this.T === this.C) { + throwIteratorAccessError(); + } + this.T = this.T.I(); + return this; + }; + } + } + get index() { + let t = this.T; + const e = this.C.o; + if (t === this.C) { + if (e) { + return e.M - 1; + } + return 0; + } + let s = 0; + if (t.i) { + s += t.i.M; + } + while (t !== e) { + const e = t.o; + if (t === e.h) { + s += 1; + if (e.i) { + s += e.i.M; + } + } + t = e; + } + return s; + } + isAccessible() { + return this.T !== this.C; + } +} - // Values - var values = []; - for (var i = 0, ks = Object.keys(this.values); i < ks.length; ++i) - values.push(exports.EnumValueDescriptorProto.create({ name: ks[i], number: this.values[ks[i]] })); +class OrderedMapIterator extends TreeIterator { + constructor(t, e, s, i) { + super(t, e, i); + this.container = s; + } + get pointer() { + if (this.T === this.C) { + throwIteratorAccessError(); + } + const t = this; + return new Proxy([], { + get(e, s) { + if (s === "0") return t.T.u; else if (s === "1") return t.T.l; + e[0] = t.T.u; + e[1] = t.T.l; + return e[s]; + }, + set(e, s, i) { + if (s !== "1") { + throw new TypeError("prop must be 1"); + } + t.T.l = i; + return true; + } + }); + } + copy() { + return new OrderedMapIterator(this.T, this.C, this.container, this.iteratorType); + } +} - return exports.EnumDescriptorProto.create({ - name: this.name, - value: values, - options: toDescriptorOptions(this.options, exports.EnumOptions) - }); -}; +class OrderedMap extends TreeContainer { + constructor(t = [], e, s) { + super(e, s); + const i = this; + t.forEach((function(t) { + i.setElement(t[0], t[1]); + })); + } + begin() { + return new OrderedMapIterator(this.C.i || this.C, this.C, this); + } + end() { + return new OrderedMapIterator(this.C, this.C, this); + } + rBegin() { + return new OrderedMapIterator(this.C.h || this.C, this.C, this, 1); + } + rEnd() { + return new OrderedMapIterator(this.C, this.C, this, 1); + } + front() { + if (this.m === 0) return; + const t = this.C.i; + return [ t.u, t.l ]; + } + back() { + if (this.m === 0) return; + const t = this.C.h; + return [ t.u, t.l ]; + } + lowerBound(t) { + const e = this.R(this.v, t); + return new OrderedMapIterator(e, this.C, this); + } + upperBound(t) { + const e = this.K(this.v, t); + return new OrderedMapIterator(e, this.C, this); + } + reverseLowerBound(t) { + const e = this.L(this.v, t); + return new OrderedMapIterator(e, this.C, this); + } + reverseUpperBound(t) { + const e = this.k(this.v, t); + return new OrderedMapIterator(e, this.C, this); + } + forEach(t) { + this.U((function(e, s, i) { + t([ e.u, e.l ], s, i); + })); + } + setElement(t, e, s) { + return this.q(t, e, s); + } + getElementByPos(t) { + if (t < 0 || t > this.m - 1) { + throw new RangeError; + } + const e = this.U(t); + return [ e.u, e.l ]; + } + find(t) { + const e = this.H(this.v, t); + return new OrderedMapIterator(e, this.C, this); + } + getElementByKey(t) { + const e = this.H(this.v, t); + return e.l; + } + union(t) { + const e = this; + t.forEach((function(t) { + e.setElement(t[0], t[1]); + })); + return this.m; + } + * [Symbol.iterator]() { + const t = this.m; + const e = this.U(); + for (let s = 0; s < t; ++s) { + const t = e[s]; + yield [ t.u, t.l ]; + } + } +} -// --- OneOf --- +exports.OrderedMap = OrderedMap; +//# sourceMappingURL=index.js.map -/** - * Properties of a OneofDescriptorProto message. - * @interface IOneofDescriptorProto - * @property {string} [name] Oneof name - * @property {*} [options] Not supported - */ -var unnamedOneofIndex = 0; +/***/ }), -/** - * Creates a oneof from a descriptor. - * @param {IOneofDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @returns {OneOf} OneOf instance - */ -OneOf.fromDescriptor = function fromDescriptor(descriptor) { +/***/ 40334: +/***/ ((module) => { - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.OneofDescriptorProto.decode(descriptor); +"use strict"; - return new OneOf( - // unnamedOneOfIndex is global, not per type, because we have no ref to a type here - descriptor.name && descriptor.name.length ? descriptor.name : "oneof" + unnamedOneofIndex++ - // fromDescriptorOptions(descriptor.options, exports.OneofOptions) - only uninterpreted_option - ); +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; - -/** - * Converts a oneof to a descriptor. - * @returns {Message} Descriptor - */ -OneOf.prototype.toDescriptor = function toDescriptor() { - return exports.OneofDescriptorProto.create({ - name: this.name - // options: toDescriptorOptions(this.options, exports.OneofOptions) - only uninterpreted_option - }); +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// --- Service --- - -/** - * Properties of a ServiceDescriptorProto message. - * @interface IServiceDescriptorProto - * @property {string} [name] Service name - * @property {IMethodDescriptorProto[]} [method] Methods - * @property {IServiceOptions} [options] Options - */ - -/** - * Properties of a ServiceOptions message. - * @interface IServiceOptions - * @property {boolean} [deprecated] - */ - -var unnamedServiceIndex = 0; +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + createTokenAuth: () => createTokenAuth +}); +module.exports = __toCommonJS(dist_src_exports); -/** - * Creates a service from a descriptor. - * @param {IServiceDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @returns {Service} Service instance - */ -Service.fromDescriptor = function fromDescriptor(descriptor) { +// pkg/dist-src/auth.js +var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +var REGEX_IS_INSTALLATION = /^ghs_/; +var REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token, + tokenType + }; +} - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.ServiceDescriptorProto.decode(descriptor); +// pkg/dist-src/with-authorization-prefix.js +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} - var service = new Service(descriptor.name && descriptor.name.length ? descriptor.name : "Service" + unnamedServiceIndex++, fromDescriptorOptions(descriptor.options, exports.ServiceOptions)); - if (descriptor.method) - for (var i = 0; i < descriptor.method.length; ++i) - service.add(Method.fromDescriptor(descriptor.method[i])); +// pkg/dist-src/hook.js +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge( + route, + parameters + ); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} - return service; +// pkg/dist-src/index.js +var createTokenAuth = function createTokenAuth2(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error( + "[@octokit/auth-token] Token passed to createTokenAuth is not a string" + ); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); }; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -/** - * Converts a service to a descriptor. - * @returns {Message} Descriptor - */ -Service.prototype.toDescriptor = function toDescriptor() { - - // Methods - var methods = []; - for (var i = 0; i < this.methodsArray.length; ++i) - methods.push(this._methodsArray[i].toDescriptor()); - - return exports.ServiceDescriptorProto.create({ - name: this.name, - method: methods, - options: toDescriptorOptions(this.options, exports.ServiceOptions) - }); -}; -// --- Method --- +/***/ }), -/** - * Properties of a MethodDescriptorProto message. - * @interface IMethodDescriptorProto - * @property {string} [name] Method name - * @property {string} [inputType] Request type name - * @property {string} [outputType] Response type name - * @property {IMethodOptions} [options] Not supported - * @property {boolean} [clientStreaming=false] Whether requests are streamed - * @property {boolean} [serverStreaming=false] Whether responses are streamed - */ +/***/ 76762: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * Properties of a MethodOptions message. - * @interface IMethodOptions - * @property {boolean} [deprecated] - */ +"use strict"; -var unnamedMethodIndex = 0; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -/** - * Creates a method from a descriptor. - * @param {IMethodDescriptorProto|Reader|Uint8Array} descriptor Descriptor - * @returns {Method} Reflected method instance - */ -Method.fromDescriptor = function fromDescriptor(descriptor) { +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + Octokit: () => Octokit +}); +module.exports = __toCommonJS(dist_src_exports); +var import_universal_user_agent = __nccwpck_require__(45030); +var import_before_after_hook = __nccwpck_require__(83682); +var import_request = __nccwpck_require__(36234); +var import_graphql = __nccwpck_require__(88467); +var import_auth_token = __nccwpck_require__(40334); - // Decode the descriptor message if specified as a buffer: - if (typeof descriptor.length === "number") - descriptor = exports.MethodDescriptorProto.decode(descriptor); +// pkg/dist-src/version.js +var VERSION = "5.2.0"; - return new Method( - // unnamedMethodIndex is global, not per service, because we have no ref to a service here - descriptor.name && descriptor.name.length ? descriptor.name : "Method" + unnamedMethodIndex++, - "rpc", - descriptor.inputType, - descriptor.outputType, - Boolean(descriptor.clientStreaming), - Boolean(descriptor.serverStreaming), - fromDescriptorOptions(descriptor.options, exports.MethodOptions) +// pkg/dist-src/index.js +var noop = () => { +}; +var consoleWarn = console.warn.bind(console); +var consoleError = console.error.bind(console); +var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var Octokit = class { + static { + this.VERSION = VERSION; + } + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + super( + Object.assign( + {}, + defaults, + options, + options.userAgent && defaults.userAgent ? { + userAgent: `${options.userAgent} ${defaults.userAgent}` + } : null + ) + ); + } + }; + return OctokitWithDefaults; + } + static { + this.plugins = []; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + const currentPlugins = this.plugins; + const NewOctokit = class extends this { + static { + this.plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ); + } + }; + return NewOctokit; + } + constructor(options = {}) { + const hook = new import_before_after_hook.Collection(); + const requestDefaults = { + baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; + requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; + } + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + this.request = import_request.request.defaults(requestDefaults); + this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); + this.log = Object.assign( + { + debug: noop, + info: noop, + warn: consoleWarn, + error: consoleError + }, + options.log ); + this.hook = hook; + if (!options.authStrategy) { + if (!options.auth) { + this.auth = async () => ({ + type: "unauthenticated" + }); + } else { + const auth = (0, import_auth_token.createTokenAuth)(options.auth); + hook.wrap("request", auth.hook); + this.auth = auth; + } + } else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy( + Object.assign( + { + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, + options.auth + ) + ); + hook.wrap("request", auth.hook); + this.auth = auth; + } + const classConstructor = this.constructor; + for (let i = 0; i < classConstructor.plugins.length; ++i) { + Object.assign(this, classConstructor.plugins[i](this, options)); + } + } }; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -/** - * Converts a method to a descriptor. - * @returns {Message} Descriptor - */ -Method.prototype.toDescriptor = function toDescriptor() { - return exports.MethodDescriptorProto.create({ - name: this.name, - inputType: this.resolvedRequestType ? this.resolvedRequestType.fullName : this.requestType, - outputType: this.resolvedResponseType ? this.resolvedResponseType.fullName : this.responseType, - clientStreaming: this.requestStream, - serverStreaming: this.responseStream, - options: toDescriptorOptions(this.options, exports.MethodOptions) - }); + +/***/ }), + +/***/ 59440: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// --- utility --- +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + endpoint: () => endpoint +}); +module.exports = __toCommonJS(dist_src_exports); -// Converts a descriptor type to a protobuf.js basic type -function fromDescriptorType(type) { - switch (type) { - // 0 is reserved for errors - case 1: return "double"; - case 2: return "float"; - case 3: return "int64"; - case 4: return "uint64"; - case 5: return "int32"; - case 6: return "fixed64"; - case 7: return "fixed32"; - case 8: return "bool"; - case 9: return "string"; - case 12: return "bytes"; - case 13: return "uint32"; - case 15: return "sfixed32"; - case 16: return "sfixed64"; - case 17: return "sint32"; - case 18: return "sint64"; - } - throw Error("illegal type: " + type); +// pkg/dist-src/defaults.js +var import_universal_user_agent = __nccwpck_require__(45030); + +// pkg/dist-src/version.js +var VERSION = "9.0.5"; + +// pkg/dist-src/defaults.js +var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } +}; + +// pkg/dist-src/util/lowercase-keys.js +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); } -// Tests if a descriptor type is packable -function packableDescriptorType(type) { - switch (type) { - case 1: // double - case 2: // float - case 3: // int64 - case 4: // uint64 - case 5: // int32 - case 6: // fixed64 - case 7: // fixed32 - case 8: // bool - case 13: // uint32 - case 14: // enum (!) - case 15: // sfixed32 - case 16: // sfixed64 - case 17: // sint32 - case 18: // sint64 - return true; - } +// pkg/dist-src/util/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); } -// Converts a protobuf.js basic type to a descriptor type -function toDescriptorType(type, resolvedType) { - switch (type) { - // 0 is reserved for errors - case "double": return 1; - case "float": return 2; - case "int64": return 3; - case "uint64": return 4; - case "int32": return 5; - case "fixed64": return 6; - case "fixed32": return 7; - case "bool": return 8; - case "string": return 9; - case "bytes": return 12; - case "uint32": return 13; - case "sfixed32": return 15; - case "sfixed64": return 16; - case "sint32": return 17; - case "sint64": return 18; +// pkg/dist-src/util/merge-deep.js +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { [key]: options[key] }); } - if (resolvedType instanceof Enum) - return 14; - if (resolvedType instanceof Type) - return resolvedType.group ? 10 : 11; - throw Error("illegal type: " + type); + }); + return result; } -// Converts descriptor options to an options object -function fromDescriptorOptions(options, type) { - if (!options) - return undefined; - var out = []; - for (var i = 0, field, key, val; i < type.fieldsArray.length; ++i) - if ((key = (field = type._fieldsArray[i]).name) !== "uninterpretedOption") - if (options.hasOwnProperty(key)) { // eslint-disable-line no-prototype-builtins - val = options[key]; - if (field.resolvedType instanceof Enum && typeof val === "number" && field.resolvedType.valuesById[val] !== undefined) - val = field.resolvedType.valuesById[val]; - out.push(underScore(key), val); - } - return out.length ? $protobuf.util.toObject(out) : undefined; +// pkg/dist-src/util/remove-undefined-properties.js +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; + } + } + return obj; } -// Converts an options object to descriptor options -function toDescriptorOptions(options, type) { - if (!options) - return undefined; - var out = []; - for (var i = 0, ks = Object.keys(options), key, val; i < ks.length; ++i) { - val = options[key = ks[i]]; - if (key === "default") - continue; - var field = type.fields[key]; - if (!field && !(field = type.fields[key = $protobuf.util.camelCase(key)])) - continue; - out.push(key, val); +// pkg/dist-src/merge.js +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } else { + options = Object.assign({}, route); + } + options.headers = lowercaseKeys(options.headers); + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); } - return out.length ? type.fromObject($protobuf.util.toObject(out)) : undefined; + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); + } + return mergedOptions; } -// Calculates the shortest relative path from `from` to `to`. -function shortname(from, to) { - var fromPath = from.fullName.split("."), - toPath = to.fullName.split("."), - i = 0, - j = 0, - k = toPath.length - 1; - if (!(from instanceof Root) && to instanceof Namespace) - while (i < fromPath.length && j < k && fromPath[i] === toPath[j]) { - var other = to.lookup(fromPath[i++], true); - if (other !== null && other !== to) - break; - ++j; - } - else - for (; i < fromPath.length && j < k && fromPath[i] === toPath[j]; ++i, ++j); - return toPath.slice(j).join("."); +// pkg/dist-src/util/add-query-parameters.js +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); } -// copied here from cli/targets/proto.js -function underScore(str) { - return str.substring(0,1) - + str.substring(1) - .replace(/([A-Z])(?=[a-z]|$)/g, function($0, $1) { return "_" + $1.toLowerCase(); }); +// pkg/dist-src/util/extract-url-variable-names.js +var urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); } -// --- exports --- - -/** - * Reflected file descriptor set. - * @name FileDescriptorSet - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected file descriptor proto. - * @name FileDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected descriptor proto. - * @name DescriptorProto - * @type {Type} - * @property {Type} ExtensionRange - * @property {Type} ReservedRange - * @const - * @tstype $protobuf.Type & { - * ExtensionRange: $protobuf.Type, - * ReservedRange: $protobuf.Type - * } - */ - -/** - * Reflected field descriptor proto. - * @name FieldDescriptorProto - * @type {Type} - * @property {Enum} Label - * @property {Enum} Type - * @const - * @tstype $protobuf.Type & { - * Label: $protobuf.Enum, - * Type: $protobuf.Enum - * } - */ - -/** - * Reflected oneof descriptor proto. - * @name OneofDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected enum descriptor proto. - * @name EnumDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected service descriptor proto. - * @name ServiceDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected enum value descriptor proto. - * @name EnumValueDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected method descriptor proto. - * @name MethodDescriptorProto - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected file options. - * @name FileOptions - * @type {Type} - * @property {Enum} OptimizeMode - * @const - * @tstype $protobuf.Type & { - * OptimizeMode: $protobuf.Enum - * } - */ - -/** - * Reflected message options. - * @name MessageOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ +// pkg/dist-src/util/omit.js +function omit(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; + } + } + return result; +} -/** - * Reflected field options. - * @name FieldOptions - * @type {Type} - * @property {Enum} CType - * @property {Enum} JSType - * @const - * @tstype $protobuf.Type & { - * CType: $protobuf.Enum, - * JSType: $protobuf.Enum - * } - */ - -/** - * Reflected oneof options. - * @name OneofOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected enum options. - * @name EnumOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected enum value options. - * @name EnumValueOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ - -/** - * Reflected service options. - * @name ServiceOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ +// pkg/dist-src/util/url-template.js +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} +function isDefined(value) { + return value !== void 0 && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + } + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } +} -/** - * Reflected method options. - * @name MethodOptions - * @type {Type} - * @const - * @tstype $protobuf.Type - */ +// pkg/dist-src/parse.js +function parse(options) { + let method = options.method.toUpperCase(); + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); + } + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } + } + } + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + } + } + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); +} -/** - * Reflected uninterpretet option. - * @name UninterpretedOption - * @type {Type} - * @property {Type} NamePart - * @const - * @tstype $protobuf.Type & { - * NamePart: $protobuf.Type - * } - */ +// pkg/dist-src/endpoint-with-defaults.js +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} -/** - * Reflected source code info. - * @name SourceCodeInfo - * @type {Type} - * @property {Type} Location - * @const - * @tstype $protobuf.Type & { - * Location: $protobuf.Type - * } - */ +// pkg/dist-src/with-defaults.js +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), + parse + }); +} -/** - * Reflected generated code info. - * @name GeneratedCodeInfo - * @type {Type} - * @property {Type} Annotation - * @const - * @tstype $protobuf.Type & { - * Annotation: $protobuf.Type - * } - */ +// pkg/dist-src/index.js +var endpoint = withDefaults(null, DEFAULTS); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), -/***/ 4888: +/***/ 88467: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// full library entry point. - - -module.exports = __nccwpck_require__(71837); +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -/***/ }), +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + GraphqlResponseError: () => GraphqlResponseError, + graphql: () => graphql2, + withCustomRequest: () => withCustomRequest +}); +module.exports = __toCommonJS(dist_src_exports); +var import_request3 = __nccwpck_require__(36234); +var import_universal_user_agent = __nccwpck_require__(45030); -/***/ 10787: -/***/ ((module) => { +// pkg/dist-src/version.js +var VERSION = "7.1.0"; -"use strict"; +// pkg/dist-src/with-defaults.js +var import_request2 = __nccwpck_require__(36234); -module.exports = common; +// pkg/dist-src/graphql.js +var import_request = __nccwpck_require__(36234); -var commonRe = /\/|\./; +// pkg/dist-src/error.js +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); +} +var GraphqlResponseError = class extends Error { + constructor(request2, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request2; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } +}; -/** - * Provides common type definitions. - * Can also be used to provide additional google types or your own custom types. - * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name - * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition - * @returns {undefined} - * @property {INamespace} google/protobuf/any.proto Any - * @property {INamespace} google/protobuf/duration.proto Duration - * @property {INamespace} google/protobuf/empty.proto Empty - * @property {INamespace} google/protobuf/field_mask.proto FieldMask - * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue - * @property {INamespace} google/protobuf/timestamp.proto Timestamp - * @property {INamespace} google/protobuf/wrappers.proto Wrappers - * @example - * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension) - * protobuf.common("descriptor", descriptorJson); - * - * // manually provides a custom definition (uses my.foo namespace) - * protobuf.common("my/foo/bar.proto", myFooBarJson); - */ -function common(name, json) { - if (!commonRe.test(name)) { - name = "google/protobuf/" + name + ".proto"; - json = { nested: { google: { nested: { protobuf: { nested: json } } } } }; +// pkg/dist-src/graphql.js +var NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType" +]; +var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request2, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); } - common[name] = json; + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject( + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) + ); + } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys( + parsedOptions + ).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request2(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError( + requestOptions, + headers, + response.data + ); + } + return response.data.data; + }); } -// Not provided because of limited use (feel free to discuss or to provide yourself): -// -// google/protobuf/descriptor.proto -// google/protobuf/source_context.proto -// google/protobuf/type.proto -// -// Stripped and pre-parsed versions of these non-bundled files are instead available as part of -// the repository or package within the google/protobuf directory. - -common("any", { +// pkg/dist-src/with-defaults.js +function withDefaults(request2, newDefaults) { + const newRequest = request2.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: newRequest.endpoint + }); +} - /** - * Properties of a google.protobuf.Any message. - * @interface IAny - * @type {Object} - * @property {string} [typeUrl] - * @property {Uint8Array} [bytes] - * @memberof common - */ - Any: { - fields: { - type_url: { - type: "string", - id: 1 - }, - value: { - type: "bytes", - id: 2 - } - } - } +// pkg/dist-src/index.js +var graphql2 = withDefaults(import_request3.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + }, + method: "POST", + url: "/graphql" }); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -var timeType; -common("duration", { +/***/ }), - /** - * Properties of a google.protobuf.Duration message. - * @interface IDuration - * @type {Object} - * @property {number|Long} [seconds] - * @property {number} [nanos] - * @memberof common - */ - Duration: timeType = { - fields: { - seconds: { - type: "int64", - id: 1 - }, - nanos: { - type: "int32", - id: 2 - } - } - } -}); +/***/ 10537: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -common("timestamp", { +"use strict"; - /** - * Properties of a google.protobuf.Timestamp message. - * @interface ITimestamp - * @type {Object} - * @property {number|Long} [seconds] - * @property {number} [nanos] - * @memberof common - */ - Timestamp: timeType +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + RequestError: () => RequestError }); +module.exports = __toCommonJS(dist_src_exports); +var import_deprecation = __nccwpck_require__(58932); +var import_once = __toESM(__nccwpck_require__(1223)); +var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var RequestError = class extends Error { + constructor(message, statusCode, options) { + super(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + Object.defineProperty(this, "code", { + get() { + logOnceCode( + new import_deprecation.Deprecation( + "[@octokit/request-error] `error.code` is deprecated, use `error.status`." + ) + ); + return statusCode; + } + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders( + new import_deprecation.Deprecation( + "[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`." + ) + ); + return headers || {}; + } + }); + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -common("empty", { - /** - * Properties of a google.protobuf.Empty message. - * @interface IEmpty - * @memberof common - */ - Empty: { - fields: {} - } +/***/ }), + +/***/ 36234: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + request: () => request }); +module.exports = __toCommonJS(dist_src_exports); +var import_endpoint = __nccwpck_require__(59440); +var import_universal_user_agent = __nccwpck_require__(45030); -common("struct", { +// pkg/dist-src/version.js +var VERSION = "8.4.0"; - /** - * Properties of a google.protobuf.Struct message. - * @interface IStruct - * @type {Object} - * @property {Object.} [fields] - * @memberof common - */ - Struct: { - fields: { - fields: { - keyType: "string", - type: "Value", - id: 1 - } - } - }, +// pkg/dist-src/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} - /** - * Properties of a google.protobuf.Value message. - * @interface IValue - * @type {Object} - * @property {string} [kind] - * @property {0} [nullValue] - * @property {number} [numberValue] - * @property {string} [stringValue] - * @property {boolean} [boolValue] - * @property {IStruct} [structValue] - * @property {IListValue} [listValue] - * @memberof common - */ - Value: { - oneofs: { - kind: { - oneof: [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, - fields: { - nullValue: { - type: "NullValue", - id: 1 - }, - numberValue: { - type: "double", - id: 2 - }, - stringValue: { - type: "string", - id: 3 - }, - boolValue: { - type: "bool", - id: 4 - }, - structValue: { - type: "Struct", - id: 5 - }, - listValue: { - type: "ListValue", - id: 6 - } - } - }, +// pkg/dist-src/fetch-wrapper.js +var import_request_error = __nccwpck_require__(10537); - NullValue: { - values: { - NULL_VALUE: 0 - } - }, +// pkg/dist-src/get-buffer-response.js +function getBufferResponse(response) { + return response.arrayBuffer(); +} - /** - * Properties of a google.protobuf.ListValue message. - * @interface IListValue - * @type {Object} - * @property {Array.} [values] - * @memberof common - */ - ListValue: { - fields: { - values: { - rule: "repeated", - type: "Value", - id: 1 - } - } +// pkg/dist-src/fetch-wrapper.js +function fetchWrapper(requestOptions) { + var _a, _b, _c, _d; + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; + if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + let headers = {}; + let status; + let url; + let { fetch } = globalThis; + if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { + fetch = requestOptions.request.fetch; + } + if (!fetch) { + throw new Error( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); + } + return fetch(requestOptions.url, { + method: requestOptions.method, + body: requestOptions.body, + redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, + headers: requestOptions.headers, + signal: (_d = requestOptions.request) == null ? void 0 : _d.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }).then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } + if (status === 204 || status === 205) { + return; + } + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new import_request_error.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: void 0 + }, + request: requestOptions + }); + } + if (status === 304) { + throw new import_request_error.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new import_request_error.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return parseSuccessResponseBody ? await getResponseData(response) : response.body; + }).then((data) => { + return { + status, + url, + headers, + data + }; + }).catch((error) => { + if (error instanceof import_request_error.RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + let message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; + } + } + throw new import_request_error.RequestError(message, 500, { + request: requestOptions + }); + }); +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBufferResponse(response); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + let suffix; + if ("documentation_url" in data) { + suffix = ` - ${data.documentation_url}`; + } else { + suffix = ""; + } + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; + } + return `${data.message}${suffix}`; + } + return `Unknown error: ${JSON.stringify(data)}`; +} + +// pkg/dist-src/with-defaults.js +function withDefaults(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint2.parse(endpointOptions)); } + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); + }; + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); + return endpointOptions.request.hook(request2, endpointOptions); + }; + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); +} + +// pkg/dist-src/index.js +var request = withDefaults(import_endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + } }); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -common("wrappers", { +/***/ }), + +/***/ 57171: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ContextAPI = void 0; +const NoopContextManager_1 = __nccwpck_require__(54118); +const global_utils_1 = __nccwpck_require__(85135); +const diag_1 = __nccwpck_require__(11877); +const API_NAME = 'context'; +const NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager(); +/** + * Singleton object which represents the entry point to the OpenTelemetry Context API + */ +class ContextAPI { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + constructor() { } + /** Get the singleton instance of the Context API */ + static getInstance() { + if (!this._instance) { + this._instance = new ContextAPI(); + } + return this._instance; + } /** - * Properties of a google.protobuf.DoubleValue message. - * @interface IDoubleValue - * @type {Object} - * @property {number} [value] - * @memberof common + * Set the current context manager. + * + * @returns true if the context manager was successfully registered, else false */ - DoubleValue: { - fields: { - value: { - type: "double", - id: 1 - } - } - }, - + setGlobalContextManager(contextManager) { + return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance()); + } /** - * Properties of a google.protobuf.FloatValue message. - * @interface IFloatValue - * @type {Object} - * @property {number} [value] - * @memberof common + * Get the currently active context */ - FloatValue: { - fields: { - value: { - type: "float", - id: 1 - } - } - }, - + active() { + return this._getContextManager().active(); + } /** - * Properties of a google.protobuf.Int64Value message. - * @interface IInt64Value - * @type {Object} - * @property {number|Long} [value] - * @memberof common + * Execute a function with an active context + * + * @param context context to be active during function execution + * @param fn function to execute in a context + * @param thisArg optional receiver to be used for calling fn + * @param args optional arguments forwarded to fn */ - Int64Value: { - fields: { - value: { - type: "int64", - id: 1 - } - } - }, - + with(context, fn, thisArg, ...args) { + return this._getContextManager().with(context, fn, thisArg, ...args); + } /** - * Properties of a google.protobuf.UInt64Value message. - * @interface IUInt64Value - * @type {Object} - * @property {number|Long} [value] - * @memberof common + * Bind a context to a target function or event emitter + * + * @param context context to bind to the event emitter or function. Defaults to the currently active context + * @param target function or event emitter to bind */ - UInt64Value: { - fields: { - value: { - type: "uint64", - id: 1 - } - } - }, + bind(context, target) { + return this._getContextManager().bind(context, target); + } + _getContextManager() { + return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER; + } + /** Disable and remove the global context manager */ + disable() { + this._getContextManager().disable(); + (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); + } +} +exports.ContextAPI = ContextAPI; +//# sourceMappingURL=context.js.map + +/***/ }), + +/***/ 11877: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiagAPI = void 0; +const ComponentLogger_1 = __nccwpck_require__(17978); +const logLevelLogger_1 = __nccwpck_require__(99639); +const types_1 = __nccwpck_require__(78077); +const global_utils_1 = __nccwpck_require__(85135); +const API_NAME = 'diag'; +/** + * Singleton object which represents the entry point to the OpenTelemetry internal + * diagnostic API + */ +class DiagAPI { /** - * Properties of a google.protobuf.Int32Value message. - * @interface IInt32Value - * @type {Object} - * @property {number} [value] - * @memberof common + * Private internal constructor + * @private */ - Int32Value: { - fields: { - value: { - type: "int32", - id: 1 + constructor() { + function _logProxy(funcName) { + return function (...args) { + const logger = (0, global_utils_1.getGlobal)('diag'); + // shortcut if logger not set + if (!logger) + return; + return logger[funcName](...args); + }; + } + // Using self local variable for minification purposes as 'this' cannot be minified + const self = this; + // DiagAPI specific functions + const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => { + var _a, _b, _c; + if (logger === self) { + // There isn't much we can do here. + // Logging to the console might break the user application. + // Try to log to self. If a logger was previously registered it will receive the log. + const err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation'); + self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message); + return false; + } + if (typeof optionsOrLogLevel === 'number') { + optionsOrLogLevel = { + logLevel: optionsOrLogLevel, + }; } + const oldLogger = (0, global_utils_1.getGlobal)('diag'); + const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : types_1.DiagLogLevel.INFO, logger); + // There already is an logger registered. We'll let it know before overwriting it. + if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) { + const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : ''; + oldLogger.warn(`Current logger will be overwritten from ${stack}`); + newLogger.warn(`Current logger will overwrite one already registered from ${stack}`); + } + return (0, global_utils_1.registerGlobal)('diag', newLogger, self, true); + }; + self.setLogger = setLogger; + self.disable = () => { + (0, global_utils_1.unregisterGlobal)(API_NAME, self); + }; + self.createComponentLogger = (options) => { + return new ComponentLogger_1.DiagComponentLogger(options); + }; + self.verbose = _logProxy('verbose'); + self.debug = _logProxy('debug'); + self.info = _logProxy('info'); + self.warn = _logProxy('warn'); + self.error = _logProxy('error'); + } + /** Get the singleton instance of the DiagAPI API */ + static instance() { + if (!this._instance) { + this._instance = new DiagAPI(); } - }, + return this._instance; + } +} +exports.DiagAPI = DiagAPI; +//# sourceMappingURL=diag.js.map + +/***/ }), + +/***/ 17696: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MetricsAPI = void 0; +const NoopMeterProvider_1 = __nccwpck_require__(72647); +const global_utils_1 = __nccwpck_require__(85135); +const diag_1 = __nccwpck_require__(11877); +const API_NAME = 'metrics'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Metrics API + */ +class MetricsAPI { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + constructor() { } + /** Get the singleton instance of the Metrics API */ + static getInstance() { + if (!this._instance) { + this._instance = new MetricsAPI(); + } + return this._instance; + } /** - * Properties of a google.protobuf.UInt32Value message. - * @interface IUInt32Value - * @type {Object} - * @property {number} [value] - * @memberof common + * Set the current global meter provider. + * Returns true if the meter provider was successfully registered, else false. */ - UInt32Value: { - fields: { - value: { - type: "uint32", - id: 1 - } - } - }, - + setGlobalMeterProvider(provider) { + return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance()); + } /** - * Properties of a google.protobuf.BoolValue message. - * @interface IBoolValue - * @type {Object} - * @property {boolean} [value] - * @memberof common + * Returns the global meter provider. */ - BoolValue: { - fields: { - value: { - type: "bool", - id: 1 - } - } - }, - + getMeterProvider() { + return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER; + } /** - * Properties of a google.protobuf.StringValue message. - * @interface IStringValue - * @type {Object} - * @property {string} [value] - * @memberof common + * Returns a meter from the global meter provider. */ - StringValue: { - fields: { - value: { - type: "string", - id: 1 - } - } - }, + getMeter(name, version, options) { + return this.getMeterProvider().getMeter(name, version, options); + } + /** Remove the global meter provider */ + disable() { + (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); + } +} +exports.MetricsAPI = MetricsAPI; +//# sourceMappingURL=metrics.js.map + +/***/ }), + +/***/ 89909: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PropagationAPI = void 0; +const global_utils_1 = __nccwpck_require__(85135); +const NoopTextMapPropagator_1 = __nccwpck_require__(72368); +const TextMapPropagator_1 = __nccwpck_require__(80865); +const context_helpers_1 = __nccwpck_require__(37682); +const utils_1 = __nccwpck_require__(28136); +const diag_1 = __nccwpck_require__(11877); +const API_NAME = 'propagation'; +const NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator(); +/** + * Singleton object which represents the entry point to the OpenTelemetry Propagation API + */ +class PropagationAPI { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + constructor() { + this.createBaggage = utils_1.createBaggage; + this.getBaggage = context_helpers_1.getBaggage; + this.getActiveBaggage = context_helpers_1.getActiveBaggage; + this.setBaggage = context_helpers_1.setBaggage; + this.deleteBaggage = context_helpers_1.deleteBaggage; + } + /** Get the singleton instance of the Propagator API */ + static getInstance() { + if (!this._instance) { + this._instance = new PropagationAPI(); + } + return this._instance; + } /** - * Properties of a google.protobuf.BytesValue message. - * @interface IBytesValue - * @type {Object} - * @property {Uint8Array} [value] - * @memberof common + * Set the current propagator. + * + * @returns true if the propagator was successfully registered, else false */ - BytesValue: { - fields: { - value: { - type: "bytes", - id: 1 - } - } + setGlobalPropagator(propagator) { + return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance()); } -}); + /** + * Inject context into a carrier to be propagated inter-process + * + * @param context Context carrying tracing data to inject + * @param carrier carrier to inject context into + * @param setter Function used to set values on the carrier + */ + inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) { + return this._getGlobalPropagator().inject(context, carrier, setter); + } + /** + * Extract context from a carrier + * + * @param context Context which the newly created context will inherit from + * @param carrier Carrier to extract context from + * @param getter Function used to extract keys from a carrier + */ + extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) { + return this._getGlobalPropagator().extract(context, carrier, getter); + } + /** + * Return a list of all fields which may be used by the propagator. + */ + fields() { + return this._getGlobalPropagator().fields(); + } + /** Remove the global propagator */ + disable() { + (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); + } + _getGlobalPropagator() { + return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR; + } +} +exports.PropagationAPI = PropagationAPI; +//# sourceMappingURL=propagation.js.map -common("field_mask", { +/***/ }), + +/***/ 81539: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TraceAPI = void 0; +const global_utils_1 = __nccwpck_require__(85135); +const ProxyTracerProvider_1 = __nccwpck_require__(2285); +const spancontext_utils_1 = __nccwpck_require__(49745); +const context_utils_1 = __nccwpck_require__(23326); +const diag_1 = __nccwpck_require__(11877); +const API_NAME = 'trace'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Tracing API + */ +class TraceAPI { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + constructor() { + this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider(); + this.wrapSpanContext = spancontext_utils_1.wrapSpanContext; + this.isSpanContextValid = spancontext_utils_1.isSpanContextValid; + this.deleteSpan = context_utils_1.deleteSpan; + this.getSpan = context_utils_1.getSpan; + this.getActiveSpan = context_utils_1.getActiveSpan; + this.getSpanContext = context_utils_1.getSpanContext; + this.setSpan = context_utils_1.setSpan; + this.setSpanContext = context_utils_1.setSpanContext; + } + /** Get the singleton instance of the Trace API */ + static getInstance() { + if (!this._instance) { + this._instance = new TraceAPI(); + } + return this._instance; + } /** - * Properties of a google.protobuf.FieldMask message. - * @interface IDoubleValue - * @type {Object} - * @property {number} [value] - * @memberof common + * Set the current global tracer. + * + * @returns true if the tracer provider was successfully registered, else false */ - FieldMask: { - fields: { - paths: { - rule: "repeated", - type: "string", - id: 1 - } + setGlobalTracerProvider(provider) { + const success = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance()); + if (success) { + this._proxyTracerProvider.setDelegate(provider); } + return success; } -}); + /** + * Returns the global tracer provider. + */ + getTracerProvider() { + return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider; + } + /** + * Returns a tracer from the global tracer provider. + */ + getTracer(name, version) { + return this.getTracerProvider().getTracer(name, version); + } + /** Remove the global tracer provider */ + disable() { + (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); + this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider(); + } +} +exports.TraceAPI = TraceAPI; +//# sourceMappingURL=trace.js.map + +/***/ }), + +/***/ 37682: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = void 0; +const context_1 = __nccwpck_require__(57171); +const context_2 = __nccwpck_require__(78242); /** - * Gets the root definition of the specified common proto file. + * Baggage key + */ +const BAGGAGE_KEY = (0, context_2.createContextKey)('OpenTelemetry Baggage Key'); +/** + * Retrieve the current baggage from the given context * - * Bundled definitions are: - * - google/protobuf/any.proto - * - google/protobuf/duration.proto - * - google/protobuf/empty.proto - * - google/protobuf/field_mask.proto - * - google/protobuf/struct.proto - * - google/protobuf/timestamp.proto - * - google/protobuf/wrappers.proto + * @param {Context} Context that manage all context values + * @returns {Baggage} Extracted baggage from the context + */ +function getBaggage(context) { + return context.getValue(BAGGAGE_KEY) || undefined; +} +exports.getBaggage = getBaggage; +/** + * Retrieve the current baggage from the active/current context * - * @param {string} file Proto file name - * @returns {INamespace|null} Root definition or `null` if not defined + * @returns {Baggage} Extracted baggage from the context */ -common.get = function get(file) { - return common[file] || null; -}; - +function getActiveBaggage() { + return getBaggage(context_1.ContextAPI.getInstance().active()); +} +exports.getActiveBaggage = getActiveBaggage; +/** + * Store a baggage in the given context + * + * @param {Context} Context that manage all context values + * @param {Baggage} baggage that will be set in the actual context + */ +function setBaggage(context, baggage) { + return context.setValue(BAGGAGE_KEY, baggage); +} +exports.setBaggage = setBaggage; +/** + * Delete the baggage stored in the given context + * + * @param {Context} Context that manage all context values + */ +function deleteBaggage(context) { + return context.deleteValue(BAGGAGE_KEY); +} +exports.deleteBaggage = deleteBaggage; +//# sourceMappingURL=context-helpers.js.map /***/ }), -/***/ 98548: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 84811: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -/** - * Runtime message from/to plain object converters. - * @namespace +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -var converter = exports; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BaggageImpl = void 0; +class BaggageImpl { + constructor(entries) { + this._entries = entries ? new Map(entries) : new Map(); + } + getEntry(key) { + const entry = this._entries.get(key); + if (!entry) { + return undefined; + } + return Object.assign({}, entry); + } + getAllEntries() { + return Array.from(this._entries.entries()).map(([k, v]) => [k, v]); + } + setEntry(key, entry) { + const newBaggage = new BaggageImpl(this._entries); + newBaggage._entries.set(key, entry); + return newBaggage; + } + removeEntry(key) { + const newBaggage = new BaggageImpl(this._entries); + newBaggage._entries.delete(key); + return newBaggage; + } + removeEntries(...keys) { + const newBaggage = new BaggageImpl(this._entries); + for (const key of keys) { + newBaggage._entries.delete(key); + } + return newBaggage; + } + clear() { + return new BaggageImpl(); + } +} +exports.BaggageImpl = BaggageImpl; +//# sourceMappingURL=baggage-impl.js.map -var Enum = __nccwpck_require__(94299), - util = __nccwpck_require__(93492); +/***/ }), + +/***/ 23542: +/***/ ((__unused_webpack_module, exports) => { +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.baggageEntryMetadataSymbol = void 0; /** - * Generates a partial value fromObject conveter. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {number} fieldIndex Field index - * @param {string} prop Property reference - * @returns {Codegen} Codegen instance - * @ignore + * Symbol used to make BaggageEntryMetadata an opaque type */ -function genValuePartial_fromObject(gen, field, fieldIndex, prop) { - var defaultAlreadyEmitted = false; - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - if (field.resolvedType) { - if (field.resolvedType instanceof Enum) { gen - ("switch(d%s){", prop); - for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) { - // enum unknown values passthrough - if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen - ("default:") - ("if(typeof(d%s)===\"number\"){m%s=d%s;break}", prop, prop, prop); - if (!field.repeated) gen // fallback to default value only for - // arrays, to avoid leaving holes. - ("break"); // for non-repeated fields, just ignore - defaultAlreadyEmitted = true; - } - gen - ("case%j:", keys[i]) - ("case %i:", values[keys[i]]) - ("m%s=%j", prop, values[keys[i]]) - ("break"); - } gen - ("}"); - } else gen - ("if(typeof d%s!==\"object\")", prop) - ("throw TypeError(%j)", field.fullName + ": object expected") - ("m%s=types[%i].fromObject(d%s)", prop, fieldIndex, prop); - } else { - var isUnsigned = false; - switch (field.type) { - case "double": - case "float": gen - ("m%s=Number(d%s)", prop, prop); // also catches "NaN", "Infinity" - break; - case "uint32": - case "fixed32": gen - ("m%s=d%s>>>0", prop, prop); - break; - case "int32": - case "sint32": - case "sfixed32": gen - ("m%s=d%s|0", prop, prop); - break; - case "uint64": - isUnsigned = true; - // eslint-disable-next-line no-fallthrough - case "int64": - case "sint64": - case "fixed64": - case "sfixed64": gen - ("if(util.Long)") - ("(m%s=util.Long.fromValue(d%s)).unsigned=%j", prop, prop, isUnsigned) - ("else if(typeof d%s===\"string\")", prop) - ("m%s=parseInt(d%s,10)", prop, prop) - ("else if(typeof d%s===\"number\")", prop) - ("m%s=d%s", prop, prop) - ("else if(typeof d%s===\"object\")", prop) - ("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", prop, prop, prop, isUnsigned ? "true" : ""); - break; - case "bytes": gen - ("if(typeof d%s===\"string\")", prop) - ("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", prop, prop, prop) - ("else if(d%s.length >= 0)", prop) - ("m%s=d%s", prop, prop); - break; - case "string": gen - ("m%s=String(d%s)", prop, prop); - break; - case "bool": gen - ("m%s=Boolean(d%s)", prop, prop); - break; - /* default: gen - ("m%s=d%s", prop, prop); - break; */ - } - } - return gen; - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -} - -/** - * Generates a plain object to runtime message converter specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -converter.fromObject = function fromObject(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var fields = mtype.fieldsArray; - var gen = util.codegen(["d"], mtype.name + "$fromObject") - ("if(d instanceof this.ctor)") - ("return d"); - if (!fields.length) return gen - ("return new this.ctor"); - gen - ("var m=new this.ctor"); - for (var i = 0; i < fields.length; ++i) { - var field = fields[i].resolve(), - prop = util.safeProp(field.name); +exports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata'); +//# sourceMappingURL=symbol.js.map - // Map fields - if (field.map) { gen - ("if(d%s){", prop) - ("if(typeof d%s!==\"object\")", prop) - ("throw TypeError(%j)", field.fullName + ": object expected") - ("m%s={}", prop) - ("for(var ks=Object.keys(d%s),i=0;i { - // Non-repeated fields - } else { - if (!(field.resolvedType instanceof Enum)) gen // no need to test for null/undefined if an enum (uses switch) - ("if(d%s!=null){", prop); // !== undefined && !== null - genValuePartial_fromObject(gen, field, /* not sorted */ i, prop); - if (!(field.resolvedType instanceof Enum)) gen - ("}"); - } - } return gen - ("return m"); - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ -}; +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.baggageEntryMetadataFromString = exports.createBaggage = void 0; +const diag_1 = __nccwpck_require__(11877); +const baggage_impl_1 = __nccwpck_require__(84811); +const symbol_1 = __nccwpck_require__(23542); +const diag = diag_1.DiagAPI.instance(); /** - * Generates a partial value toObject converter. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {number} fieldIndex Field index - * @param {string} prop Property reference - * @returns {Codegen} Codegen instance - * @ignore + * Create a new Baggage with optional entries + * + * @param entries An array of baggage entries the new baggage should contain */ -function genValuePartial_toObject(gen, field, fieldIndex, prop) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - if (field.resolvedType) { - if (field.resolvedType instanceof Enum) gen - ("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", prop, fieldIndex, prop, prop, fieldIndex, prop, prop); - else gen - ("d%s=types[%i].toObject(m%s,o)", prop, fieldIndex, prop); - } else { - var isUnsigned = false; - switch (field.type) { - case "double": - case "float": gen - ("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", prop, prop, prop, prop); - break; - case "uint64": - isUnsigned = true; - // eslint-disable-next-line no-fallthrough - case "int64": - case "sint64": - case "fixed64": - case "sfixed64": gen - ("if(typeof m%s===\"number\")", prop) - ("d%s=o.longs===String?String(m%s):m%s", prop, prop, prop) - ("else") // Long-like - ("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true": "", prop); - break; - case "bytes": gen - ("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", prop, prop, prop, prop, prop); - break; - default: gen - ("d%s=m%s", prop, prop); - break; - } - } - return gen; - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +function createBaggage(entries = {}) { + return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries))); } - +exports.createBaggage = createBaggage; /** - * Generates a runtime message to plain object converter specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance + * Create a serializable BaggageEntryMetadata object from a string. + * + * @param str string metadata. Format is currently not defined by the spec and has no special meaning. + * */ -converter.toObject = function toObject(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById); - if (!fields.length) - return util.codegen()("return {}"); - var gen = util.codegen(["m", "o"], mtype.name + "$toObject") - ("if(!o)") - ("o={}") - ("var d={}"); - - var repeatedFields = [], - mapFields = [], - normalFields = [], - i = 0; - for (; i < fields.length; ++i) - if (!fields[i].partOf) - ( fields[i].resolve().repeated ? repeatedFields - : fields[i].map ? mapFields - : normalFields).push(fields[i]); - - if (repeatedFields.length) { gen - ("if(o.arrays||o.defaults){"); - for (i = 0; i < repeatedFields.length; ++i) gen - ("d%s=[]", util.safeProp(repeatedFields[i].name)); - gen - ("}"); - } - - if (mapFields.length) { gen - ("if(o.objects||o.defaults){"); - for (i = 0; i < mapFields.length; ++i) gen - ("d%s={}", util.safeProp(mapFields[i].name)); - gen - ("}"); - } - - if (normalFields.length) { gen - ("if(o.defaults){"); - for (i = 0; i < normalFields.length; ++i) { - var field = normalFields[i], - prop = util.safeProp(field.name); - if (field.resolvedType instanceof Enum) gen - ("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault); - else if (field.long) gen - ("if(util.Long){") - ("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned) - ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", prop) - ("}else") - ("d%s=o.longs===String?%j:%i", prop, field.typeDefault.toString(), field.typeDefault.toNumber()); - else if (field.bytes) { - var arrayDefault = "[" + Array.prototype.slice.call(field.typeDefault).join(",") + "]"; - gen - ("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault)) - ("else{") - ("d%s=%s", prop, arrayDefault) - ("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop) - ("}"); - } else gen - ("d%s=%j", prop, field.typeDefault); // also messages (=null) - } gen - ("}"); - } - var hasKs2 = false; - for (i = 0; i < fields.length; ++i) { - var field = fields[i], - index = mtype._fieldsArray.indexOf(field), - prop = util.safeProp(field.name); - if (field.map) { - if (!hasKs2) { hasKs2 = true; gen - ("var ks2"); - } gen - ("if(m%s&&(ks2=Object.keys(m%s)).length){", prop, prop) - ("d%s={}", prop) - ("for(var j=0;j { +/***/ 7393: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = decoder; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.context = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const context_1 = __nccwpck_require__(57171); +/** Entrypoint for context API */ +exports.context = context_1.ContextAPI.getInstance(); +//# sourceMappingURL=context-api.js.map -var Enum = __nccwpck_require__(94299), - types = __nccwpck_require__(98887), - util = __nccwpck_require__(93492); +/***/ }), -function missing(field) { - return "missing required '" + field.name + "'"; -} +/***/ 54118: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Generates a decoder specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -function decoder(mtype) { - /* eslint-disable no-unexpected-multiline */ - var gen = util.codegen(["r", "l"], mtype.name + "$decode") - ("if(!(r instanceof Reader))") - ("r=Reader.create(r)") - ("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (mtype.fieldsArray.filter(function(field) { return field.map; }).length ? ",k,value" : "")) - ("while(r.pos>>3){"); +"use strict"; - var i = 0; - for (; i < /* initializes */ mtype.fieldsArray.length; ++i) { - var field = mtype._fieldsArray[i].resolve(), - type = field.resolvedType instanceof Enum ? "int32" : field.type, - ref = "m" + util.safeProp(field.name); gen - ("case %i: {", field.id); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NoopContextManager = void 0; +const context_1 = __nccwpck_require__(78242); +class NoopContextManager { + active() { + return context_1.ROOT_CONTEXT; + } + with(_context, fn, thisArg, ...args) { + return fn.call(thisArg, ...args); + } + bind(_context, target) { + return target; + } + enable() { + return this; + } + disable() { + return this; + } +} +exports.NoopContextManager = NoopContextManager; +//# sourceMappingURL=NoopContextManager.js.map - // Map fields - if (field.map) { gen - ("if(%s===util.emptyObject)", ref) - ("%s={}", ref) - ("var c2 = r.uint32()+r.pos"); +/***/ }), - if (types.defaults[field.keyType] !== undefined) gen - ("k=%j", types.defaults[field.keyType]); - else gen - ("k=null"); +/***/ 78242: +/***/ ((__unused_webpack_module, exports) => { - if (types.defaults[type] !== undefined) gen - ("value=%j", types.defaults[type]); - else gen - ("value=null"); +"use strict"; - gen - ("while(r.pos>>3){") - ("case 1: k=r.%s(); break", field.keyType) - ("case 2:"); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ROOT_CONTEXT = exports.createContextKey = void 0; +/** Get a key to uniquely identify a context value */ +function createContextKey(description) { + // The specification states that for the same input, multiple calls should + // return different keys. Due to the nature of the JS dependency management + // system, this creates problems where multiple versions of some package + // could hold different keys for the same property. + // + // Therefore, we use Symbol.for which returns the same key for the same input. + return Symbol.for(description); +} +exports.createContextKey = createContextKey; +class BaseContext { + /** + * Construct a new context which inherits values from an optional parent context. + * + * @param parentContext a context from which to inherit values + */ + constructor(parentContext) { + // for minification + const self = this; + self._currentContext = parentContext ? new Map(parentContext) : new Map(); + self.getValue = (key) => self._currentContext.get(key); + self.setValue = (key, value) => { + const context = new BaseContext(self._currentContext); + context._currentContext.set(key, value); + return context; + }; + self.deleteValue = (key) => { + const context = new BaseContext(self._currentContext); + context._currentContext.delete(key); + return context; + }; + } +} +/** The root context is used as the default parent context when there is no active context */ +exports.ROOT_CONTEXT = new BaseContext(); +//# sourceMappingURL=context.js.map - if (types.basic[type] === undefined) gen - ("value=types[%i].decode(r,r.uint32())", i); // can't be groups - else gen - ("value=r.%s()", type); +/***/ }), - gen - ("break") - ("default:") - ("r.skipType(tag2&7)") - ("break") - ("}") - ("}"); +/***/ 39721: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (types.long[field.keyType] !== undefined) gen - ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref); - else gen - ("%s[k]=value", ref); +"use strict"; - // Repeated fields - } else if (field.repeated) { gen +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.diag = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const diag_1 = __nccwpck_require__(11877); +/** + * Entrypoint for Diag API. + * Defines Diagnostic handler used for internal diagnostic logging operations. + * The default provides a Noop DiagLogger implementation which may be changed via the + * diag.setLogger(logger: DiagLogger) function. + */ +exports.diag = diag_1.DiagAPI.instance(); +//# sourceMappingURL=diag-api.js.map - ("if(!(%s&&%s.length))", ref, ref) - ("%s=[]", ref); +/***/ }), - // Packable (always check for forward and backward compatiblity) - if (types.packed[type] !== undefined) gen - ("if((t&7)===2){") - ("var c2=r.uint32()+r.pos") - ("while(r.pos { - // Non-packed - if (types.basic[type] === undefined) gen(field.resolvedType.group - ? "%s.push(types[%i].decode(r))" - : "%s.push(types[%i].decode(r,r.uint32()))", ref, i); - else gen - ("%s.push(r.%s())", ref, type); +"use strict"; - // Non-repeated - } else if (types.basic[type] === undefined) gen(field.resolvedType.group - ? "%s=types[%i].decode(r)" - : "%s=types[%i].decode(r,r.uint32())", ref, i); - else gen - ("%s=r.%s()", ref, type); - gen - ("break") - ("}"); - // Unknown fields - } gen - ("default:") - ("r.skipType(t&7)") - ("break") - - ("}") - ("}"); - - // Field presence - for (i = 0; i < mtype._fieldsArray.length; ++i) { - var rfield = mtype._fieldsArray[i]; - if (rfield.required) gen - ("if(!m.hasOwnProperty(%j))", rfield.name) - ("throw util.ProtocolError(%j,{instance:m})", missing(rfield)); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiagComponentLogger = void 0; +const global_utils_1 = __nccwpck_require__(85135); +/** + * Component Logger which is meant to be used as part of any component which + * will add automatically additional namespace in front of the log message. + * It will then forward all message to global diag logger + * @example + * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' }); + * cLogger.debug('test'); + * // @opentelemetry/instrumentation-http test + */ +class DiagComponentLogger { + constructor(props) { + this._namespace = props.namespace || 'DiagComponentLogger'; + } + debug(...args) { + return logProxy('debug', this._namespace, args); + } + error(...args) { + return logProxy('error', this._namespace, args); + } + info(...args) { + return logProxy('info', this._namespace, args); + } + warn(...args) { + return logProxy('warn', this._namespace, args); + } + verbose(...args) { + return logProxy('verbose', this._namespace, args); } - - return gen - ("return m"); - /* eslint-enable no-unexpected-multiline */ } - +exports.DiagComponentLogger = DiagComponentLogger; +function logProxy(funcName, namespace, args) { + const logger = (0, global_utils_1.getGlobal)('diag'); + // shortcut if logger not set + if (!logger) { + return; + } + args.unshift(namespace); + return logger[funcName](...args); +} +//# sourceMappingURL=ComponentLogger.js.map /***/ }), -/***/ 61469: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 3041: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = encoder; - -var Enum = __nccwpck_require__(94299), - types = __nccwpck_require__(98887), - util = __nccwpck_require__(93492); - -/** - * Generates a partial message type encoder. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {number} fieldIndex Field index - * @param {string} ref Variable reference - * @returns {Codegen} Codegen instance - * @ignore +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -function genTypePartial(gen, field, fieldIndex, ref) { - return field.resolvedType.group - ? gen("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0) - : gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0); -} - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiagConsoleLogger = void 0; +const consoleMap = [ + { n: 'error', c: 'error' }, + { n: 'warn', c: 'warn' }, + { n: 'info', c: 'info' }, + { n: 'debug', c: 'debug' }, + { n: 'verbose', c: 'trace' }, +]; /** - * Generates an encoder specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance + * A simple Immutable Console based diagnostic logger which will output any messages to the Console. + * If you want to limit the amount of logging to a specific level or lower use the + * {@link createLogLevelDiagLogger} */ -function encoder(mtype) { - /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ - var gen = util.codegen(["m", "w"], mtype.name + "$encode") - ("if(!w)") - ("w=Writer.create()"); - - var i, ref; - - // "when a message is serialized its known fields should be written sequentially by field number" - var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById); - - for (var i = 0; i < fields.length; ++i) { - var field = fields[i].resolve(), - index = mtype._fieldsArray.indexOf(field), - type = field.resolvedType instanceof Enum ? "int32" : field.type, - wireType = types.basic[type]; - ref = "m" + util.safeProp(field.name); - - // Map fields - if (field.map) { - gen - ("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name) // !== undefined && !== null - ("for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType); - if (wireType === undefined) gen - ("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", index, ref); // can't be groups - else gen - (".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref); - gen - ("}") - ("}"); - - // Repeated fields - } else if (field.repeated) { gen - ("if(%s!=null&&%s.length){", ref, ref); // !== undefined && !== null - - // Packed repeated - if (field.packed && types.packed[type] !== undefined) { gen - - ("w.uint32(%i).fork()", (field.id << 3 | 2) >>> 0) - ("for(var i=0;i<%s.length;++i)", ref) - ("w.%s(%s[i])", type, ref) - ("w.ldelim()"); - - // Non-packed - } else { gen - - ("for(var i=0;i<%s.length;++i)", ref); - if (wireType === undefined) - genTypePartial(gen, field, index, ref + "[i]"); - else gen - ("w.uint32(%i).%s(%s[i])", (field.id << 3 | wireType) >>> 0, type, ref); +class DiagConsoleLogger { + constructor() { + function _consoleFunc(funcName) { + return function (...args) { + if (console) { + // Some environments only expose the console when the F12 developer console is open + // eslint-disable-next-line no-console + let theFunc = console[funcName]; + if (typeof theFunc !== 'function') { + // Not all environments support all functions + // eslint-disable-next-line no-console + theFunc = console.log; + } + // One last final check + if (typeof theFunc === 'function') { + return theFunc.apply(console, args); + } + } + }; + } + for (let i = 0; i < consoleMap.length; i++) { + this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c); + } + } +} +exports.DiagConsoleLogger = DiagConsoleLogger; +//# sourceMappingURL=consoleLogger.js.map - } gen - ("}"); +/***/ }), - // Non-repeated - } else { - if (field.optional) gen - ("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", ref, field.name); // !== undefined && !== null +/***/ 99639: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (wireType === undefined) - genTypePartial(gen, field, index, ref); - else gen - ("w.uint32(%i).%s(%s)", (field.id << 3 | wireType) >>> 0, type, ref); +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createLogLevelDiagLogger = void 0; +const types_1 = __nccwpck_require__(78077); +function createLogLevelDiagLogger(maxLevel, logger) { + if (maxLevel < types_1.DiagLogLevel.NONE) { + maxLevel = types_1.DiagLogLevel.NONE; + } + else if (maxLevel > types_1.DiagLogLevel.ALL) { + maxLevel = types_1.DiagLogLevel.ALL; + } + // In case the logger is null or undefined + logger = logger || {}; + function _filterFunc(funcName, theLevel) { + const theFunc = logger[funcName]; + if (typeof theFunc === 'function' && maxLevel >= theLevel) { + return theFunc.bind(logger); } + return function () { }; } - - return gen - ("return w"); - /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ + return { + error: _filterFunc('error', types_1.DiagLogLevel.ERROR), + warn: _filterFunc('warn', types_1.DiagLogLevel.WARN), + info: _filterFunc('info', types_1.DiagLogLevel.INFO), + debug: _filterFunc('debug', types_1.DiagLogLevel.DEBUG), + verbose: _filterFunc('verbose', types_1.DiagLogLevel.VERBOSE), + }; } - +exports.createLogLevelDiagLogger = createLogLevelDiagLogger; +//# sourceMappingURL=logLevelLogger.js.map /***/ }), -/***/ 94299: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 78077: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = Enum; - -// extends ReflectionObject -var ReflectionObject = __nccwpck_require__(96070); -((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = "Enum"; - -var Namespace = __nccwpck_require__(28131), - util = __nccwpck_require__(93492); - +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiagLogLevel = void 0; /** - * Constructs a new enum instance. - * @classdesc Reflected enum. - * @extends ReflectionObject - * @constructor - * @param {string} name Unique name within its namespace - * @param {Object.} [values] Enum values as an object, by name - * @param {Object.} [options] Declared options - * @param {string} [comment] The comment for this enum - * @param {Object.} [comments] The value comments for this enum - * @param {Object.>|undefined} [valuesOptions] The value options for this enum + * Defines the available internal logging levels for the diagnostic logger, the numeric values + * of the levels are defined to match the original values from the initial LogLevel to avoid + * compatibility/migration issues for any implementation that assume the numeric ordering. */ -function Enum(name, values, options, comment, comments, valuesOptions) { - ReflectionObject.call(this, name, options); - - if (values && typeof values !== "object") - throw TypeError("values must be an object"); - - /** - * Enum values by id. - * @type {Object.} - */ - this.valuesById = {}; - - /** - * Enum values by name. - * @type {Object.} - */ - this.values = Object.create(this.valuesById); // toJSON, marker - - /** - * Enum comment text. - * @type {string|null} - */ - this.comment = comment; - - /** - * Value comment texts, if any. - * @type {Object.} - */ - this.comments = comments || {}; - - /** - * Values options, if any - * @type {Object>|undefined} - */ - this.valuesOptions = valuesOptions; - +var DiagLogLevel; +(function (DiagLogLevel) { + /** Diagnostic Logging level setting to disable all logging (except and forced logs) */ + DiagLogLevel[DiagLogLevel["NONE"] = 0] = "NONE"; + /** Identifies an error scenario */ + DiagLogLevel[DiagLogLevel["ERROR"] = 30] = "ERROR"; + /** Identifies a warning scenario */ + DiagLogLevel[DiagLogLevel["WARN"] = 50] = "WARN"; + /** General informational log message */ + DiagLogLevel[DiagLogLevel["INFO"] = 60] = "INFO"; + /** General debug log message */ + DiagLogLevel[DiagLogLevel["DEBUG"] = 70] = "DEBUG"; /** - * Reserved ranges, if any. - * @type {Array.} + * Detailed trace level logging should only be used for development, should only be set + * in a development environment. */ - this.reserved = undefined; // toJSON + DiagLogLevel[DiagLogLevel["VERBOSE"] = 80] = "VERBOSE"; + /** Used to set the logging level to include all logging */ + DiagLogLevel[DiagLogLevel["ALL"] = 9999] = "ALL"; +})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {})); +//# sourceMappingURL=types.js.map - // Note that values inherit valuesById on their prototype which makes them a TypeScript- - // compatible enum. This is used by pbts to write actual enum definitions that work for - // static and reflection code alike instead of emitting generic object definitions. +/***/ }), - if (values) - for (var keys = Object.keys(values), i = 0; i < keys.length; ++i) - if (typeof values[keys[i]] === "number") // use forward entries only - this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i]; -} +/***/ 65163: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Enum descriptor. - * @interface IEnum - * @property {Object.} values Enum values - * @property {Object.} [options] Enum options - */ +"use strict"; -/** - * Constructs an enum from an enum descriptor. - * @param {string} name Enum name - * @param {IEnum} json Enum descriptor - * @returns {Enum} Created enum - * @throws {TypeError} If arguments are invalid +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Enum.fromJSON = function fromJSON(name, json) { - var enm = new Enum(name, json.values, json.options, json.comment, json.comments); - enm.reserved = json.reserved; - return enm; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = void 0; +var utils_1 = __nccwpck_require__(28136); +Object.defineProperty(exports, "baggageEntryMetadataFromString", ({ enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } })); +// Context APIs +var context_1 = __nccwpck_require__(78242); +Object.defineProperty(exports, "createContextKey", ({ enumerable: true, get: function () { return context_1.createContextKey; } })); +Object.defineProperty(exports, "ROOT_CONTEXT", ({ enumerable: true, get: function () { return context_1.ROOT_CONTEXT; } })); +// Diag APIs +var consoleLogger_1 = __nccwpck_require__(3041); +Object.defineProperty(exports, "DiagConsoleLogger", ({ enumerable: true, get: function () { return consoleLogger_1.DiagConsoleLogger; } })); +var types_1 = __nccwpck_require__(78077); +Object.defineProperty(exports, "DiagLogLevel", ({ enumerable: true, get: function () { return types_1.DiagLogLevel; } })); +// Metrics APIs +var NoopMeter_1 = __nccwpck_require__(4837); +Object.defineProperty(exports, "createNoopMeter", ({ enumerable: true, get: function () { return NoopMeter_1.createNoopMeter; } })); +var Metric_1 = __nccwpck_require__(89999); +Object.defineProperty(exports, "ValueType", ({ enumerable: true, get: function () { return Metric_1.ValueType; } })); +// Propagation APIs +var TextMapPropagator_1 = __nccwpck_require__(80865); +Object.defineProperty(exports, "defaultTextMapGetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapGetter; } })); +Object.defineProperty(exports, "defaultTextMapSetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapSetter; } })); +var ProxyTracer_1 = __nccwpck_require__(43503); +Object.defineProperty(exports, "ProxyTracer", ({ enumerable: true, get: function () { return ProxyTracer_1.ProxyTracer; } })); +var ProxyTracerProvider_1 = __nccwpck_require__(2285); +Object.defineProperty(exports, "ProxyTracerProvider", ({ enumerable: true, get: function () { return ProxyTracerProvider_1.ProxyTracerProvider; } })); +var SamplingResult_1 = __nccwpck_require__(33209); +Object.defineProperty(exports, "SamplingDecision", ({ enumerable: true, get: function () { return SamplingResult_1.SamplingDecision; } })); +var span_kind_1 = __nccwpck_require__(31424); +Object.defineProperty(exports, "SpanKind", ({ enumerable: true, get: function () { return span_kind_1.SpanKind; } })); +var status_1 = __nccwpck_require__(48845); +Object.defineProperty(exports, "SpanStatusCode", ({ enumerable: true, get: function () { return status_1.SpanStatusCode; } })); +var trace_flags_1 = __nccwpck_require__(26905); +Object.defineProperty(exports, "TraceFlags", ({ enumerable: true, get: function () { return trace_flags_1.TraceFlags; } })); +var utils_2 = __nccwpck_require__(32615); +Object.defineProperty(exports, "createTraceState", ({ enumerable: true, get: function () { return utils_2.createTraceState; } })); +var spancontext_utils_1 = __nccwpck_require__(49745); +Object.defineProperty(exports, "isSpanContextValid", ({ enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } })); +Object.defineProperty(exports, "isValidTraceId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } })); +Object.defineProperty(exports, "isValidSpanId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidSpanId; } })); +var invalid_span_constants_1 = __nccwpck_require__(91760); +Object.defineProperty(exports, "INVALID_SPANID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } })); +Object.defineProperty(exports, "INVALID_TRACEID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } })); +Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } })); +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const context_api_1 = __nccwpck_require__(7393); +Object.defineProperty(exports, "context", ({ enumerable: true, get: function () { return context_api_1.context; } })); +const diag_api_1 = __nccwpck_require__(39721); +Object.defineProperty(exports, "diag", ({ enumerable: true, get: function () { return diag_api_1.diag; } })); +const metrics_api_1 = __nccwpck_require__(72601); +Object.defineProperty(exports, "metrics", ({ enumerable: true, get: function () { return metrics_api_1.metrics; } })); +const propagation_api_1 = __nccwpck_require__(17591); +Object.defineProperty(exports, "propagation", ({ enumerable: true, get: function () { return propagation_api_1.propagation; } })); +const trace_api_1 = __nccwpck_require__(98989); +Object.defineProperty(exports, "trace", ({ enumerable: true, get: function () { return trace_api_1.trace; } })); +// Default export. +exports["default"] = { + context: context_api_1.context, + diag: diag_api_1.diag, + metrics: metrics_api_1.metrics, + propagation: propagation_api_1.propagation, + trace: trace_api_1.trace, }; +//# sourceMappingURL=index.js.map -/** - * Converts this enum to an enum descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IEnum} Enum descriptor - */ -Enum.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "options" , this.options, - "valuesOptions" , this.valuesOptions, - "values" , this.values, - "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, - "comment" , keepComments ? this.comment : undefined, - "comments" , keepComments ? this.comments : undefined - ]); -}; +/***/ }), -/** - * Adds a value to this enum. - * @param {string} name Value name - * @param {number} id Value id - * @param {string} [comment] Comment, if any - * @param {Object.|undefined} [options] Options, if any - * @returns {Enum} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a value with this name or id - */ -Enum.prototype.add = function add(name, id, comment, options) { - // utilized by the parser but not by .fromJSON +/***/ 85135: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (!util.isString(name)) - throw TypeError("name must be a string"); +"use strict"; - if (!util.isInteger(id)) - throw TypeError("id must be an integer"); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0; +const platform_1 = __nccwpck_require__(99957); +const version_1 = __nccwpck_require__(98996); +const semver_1 = __nccwpck_require__(81522); +const major = version_1.VERSION.split('.')[0]; +const GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`); +const _global = platform_1._globalThis; +function registerGlobal(type, instance, diag, allowOverride = false) { + var _a; + const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { + version: version_1.VERSION, + }); + if (!allowOverride && api[type]) { + // already registered an API of this type + const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`); + diag.error(err.stack || err.message); + return false; + } + if (api.version !== version_1.VERSION) { + // All registered APIs must be of the same version exactly + const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${version_1.VERSION}`); + diag.error(err.stack || err.message); + return false; + } + api[type] = instance; + diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`); + return true; +} +exports.registerGlobal = registerGlobal; +function getGlobal(type) { + var _a, _b; + const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version; + if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) { + return; + } + return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type]; +} +exports.getGlobal = getGlobal; +function unregisterGlobal(type, diag) { + diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`); + const api = _global[GLOBAL_OPENTELEMETRY_API_KEY]; + if (api) { + delete api[type]; + } +} +exports.unregisterGlobal = unregisterGlobal; +//# sourceMappingURL=global-utils.js.map - if (this.values[name] !== undefined) - throw Error("duplicate name '" + name + "' in " + this); +/***/ }), - if (this.isReservedId(id)) - throw Error("id " + id + " is reserved in " + this); +/***/ 81522: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (this.isReservedName(name)) - throw Error("name '" + name + "' is reserved in " + this); +"use strict"; - if (this.valuesById[id] !== undefined) { - if (!(this.options && this.options.allow_alias)) - throw Error("duplicate id " + id + " in " + this); - this.values[name] = id; - } else - this.valuesById[this.values[name] = id] = name; - - if (options) { - if (this.valuesOptions === undefined) - this.valuesOptions = {}; - this.valuesOptions[name] = options || null; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isCompatible = exports._makeCompatibilityCheck = void 0; +const version_1 = __nccwpck_require__(98996); +const re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; +/** + * Create a function to test an API version to see if it is compatible with the provided ownVersion. + * + * The returned function has the following semantics: + * - Exact match is always compatible + * - Major versions must match exactly + * - 1.x package cannot use global 2.x package + * - 2.x package cannot use global 1.x package + * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API + * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects + * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3 + * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor + * - Patch and build tag differences are not considered at this time + * + * @param ownVersion version which should be checked against + */ +function _makeCompatibilityCheck(ownVersion) { + const acceptedVersions = new Set([ownVersion]); + const rejectedVersions = new Set(); + const myVersionMatch = ownVersion.match(re); + if (!myVersionMatch) { + // we cannot guarantee compatibility so we always return noop + return () => false; } - - this.comments[name] = comment || null; - return this; -}; - + const ownVersionParsed = { + major: +myVersionMatch[1], + minor: +myVersionMatch[2], + patch: +myVersionMatch[3], + prerelease: myVersionMatch[4], + }; + // if ownVersion has a prerelease tag, versions must match exactly + if (ownVersionParsed.prerelease != null) { + return function isExactmatch(globalVersion) { + return globalVersion === ownVersion; + }; + } + function _reject(v) { + rejectedVersions.add(v); + return false; + } + function _accept(v) { + acceptedVersions.add(v); + return true; + } + return function isCompatible(globalVersion) { + if (acceptedVersions.has(globalVersion)) { + return true; + } + if (rejectedVersions.has(globalVersion)) { + return false; + } + const globalVersionMatch = globalVersion.match(re); + if (!globalVersionMatch) { + // cannot parse other version + // we cannot guarantee compatibility so we always noop + return _reject(globalVersion); + } + const globalVersionParsed = { + major: +globalVersionMatch[1], + minor: +globalVersionMatch[2], + patch: +globalVersionMatch[3], + prerelease: globalVersionMatch[4], + }; + // if globalVersion has a prerelease tag, versions must match exactly + if (globalVersionParsed.prerelease != null) { + return _reject(globalVersion); + } + // major versions must match + if (ownVersionParsed.major !== globalVersionParsed.major) { + return _reject(globalVersion); + } + if (ownVersionParsed.major === 0) { + if (ownVersionParsed.minor === globalVersionParsed.minor && + ownVersionParsed.patch <= globalVersionParsed.patch) { + return _accept(globalVersion); + } + return _reject(globalVersion); + } + if (ownVersionParsed.minor <= globalVersionParsed.minor) { + return _accept(globalVersion); + } + return _reject(globalVersion); + }; +} +exports._makeCompatibilityCheck = _makeCompatibilityCheck; /** - * Removes a value from this enum - * @param {string} name Value name - * @returns {Enum} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `name` is not a name of this enum + * Test an API version to see if it is compatible with this API. + * + * - Exact match is always compatible + * - Major versions must match exactly + * - 1.x package cannot use global 2.x package + * - 2.x package cannot use global 1.x package + * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API + * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects + * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3 + * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor + * - Patch and build tag differences are not considered at this time + * + * @param version version of the API requesting an instance of the global API */ -Enum.prototype.remove = function remove(name) { - - if (!util.isString(name)) - throw TypeError("name must be a string"); - - var val = this.values[name]; - if (val == null) - throw Error("name '" + name + "' does not exist in " + this); +exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION); +//# sourceMappingURL=semver.js.map - delete this.valuesById[val]; - delete this.values[name]; - delete this.comments[name]; - if (this.valuesOptions) - delete this.valuesOptions[name]; +/***/ }), - return this; -}; +/***/ 72601: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Tests if the specified id is reserved. - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Enum.prototype.isReservedId = function isReservedId(id) { - return Namespace.isReservedId(this.reserved, id); -}; +"use strict"; -/** - * Tests if the specified name is reserved. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Enum.prototype.isReservedName = function isReservedName(name) { - return Namespace.isReservedName(this.reserved, name); -}; - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.metrics = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const metrics_1 = __nccwpck_require__(17696); +/** Entrypoint for metrics API */ +exports.metrics = metrics_1.MetricsAPI.getInstance(); +//# sourceMappingURL=metrics-api.js.map /***/ }), -/***/ 20577: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 89999: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = Field; - -// extends ReflectionObject -var ReflectionObject = __nccwpck_require__(96070); -((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = "Field"; - -var Enum = __nccwpck_require__(94299), - types = __nccwpck_require__(98887), - util = __nccwpck_require__(93492); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ValueType = void 0; +/** The Type of value. It describes how the data is reported. */ +var ValueType; +(function (ValueType) { + ValueType[ValueType["INT"] = 0] = "INT"; + ValueType[ValueType["DOUBLE"] = 1] = "DOUBLE"; +})(ValueType = exports.ValueType || (exports.ValueType = {})); +//# sourceMappingURL=Metric.js.map -var Type; // cyclic +/***/ }), -var ruleRe = /^required|optional|repeated$/; +/***/ 4837: +/***/ ((__unused_webpack_module, exports) => { -/** - * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. - * @name Field - * @classdesc Reflected message field. - * @extends FieldBase - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} type Value type - * @param {string|Object.} [rule="optional"] Field rule - * @param {string|Object.} [extend] Extended type if different from parent - * @param {Object.} [options] Declared options - */ +"use strict"; -/** - * Constructs a field from a field descriptor. - * @param {string} name Field name - * @param {IField} json Field descriptor - * @returns {Field} Created field - * @throws {TypeError} If arguments are invalid +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Field.fromJSON = function fromJSON(name, json) { - return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment); -}; - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0; /** - * Not an actual constructor. Use {@link Field} instead. - * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions. - * @exports FieldBase - * @extends ReflectionObject - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} type Value type - * @param {string|Object.} [rule="optional"] Field rule - * @param {string|Object.} [extend] Extended type if different from parent - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field + * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses + * constant NoopMetrics for all of its methods. */ -function Field(name, id, type, rule, extend, options, comment) { - - if (util.isObject(rule)) { - comment = extend; - options = rule; - rule = extend = undefined; - } else if (util.isObject(extend)) { - comment = options; - options = extend; - extend = undefined; - } - - ReflectionObject.call(this, name, options); - - if (!util.isInteger(id) || id < 0) - throw TypeError("id must be a non-negative integer"); - - if (!util.isString(type)) - throw TypeError("type must be a string"); - - if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase())) - throw TypeError("rule must be a string rule"); - - if (extend !== undefined && !util.isString(extend)) - throw TypeError("extend must be a string"); - +class NoopMeter { + constructor() { } /** - * Field rule, if any. - * @type {string|undefined} + * @see {@link Meter.createHistogram} */ - if (rule === "proto3_optional") { - rule = "optional"; + createHistogram(_name, _options) { + return exports.NOOP_HISTOGRAM_METRIC; } - this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON - /** - * Field type. - * @type {string} + * @see {@link Meter.createCounter} */ - this.type = type; // toJSON - + createCounter(_name, _options) { + return exports.NOOP_COUNTER_METRIC; + } /** - * Unique field id. - * @type {number} + * @see {@link Meter.createUpDownCounter} */ - this.id = id; // toJSON, marker - + createUpDownCounter(_name, _options) { + return exports.NOOP_UP_DOWN_COUNTER_METRIC; + } /** - * Extended type if different from parent. - * @type {string|undefined} + * @see {@link Meter.createObservableGauge} */ - this.extend = extend || undefined; // toJSON - + createObservableGauge(_name, _options) { + return exports.NOOP_OBSERVABLE_GAUGE_METRIC; + } /** - * Whether this field is required. - * @type {boolean} + * @see {@link Meter.createObservableCounter} */ - this.required = rule === "required"; - + createObservableCounter(_name, _options) { + return exports.NOOP_OBSERVABLE_COUNTER_METRIC; + } /** - * Whether this field is optional. - * @type {boolean} + * @see {@link Meter.createObservableUpDownCounter} */ - this.optional = !this.required; - + createObservableUpDownCounter(_name, _options) { + return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC; + } /** - * Whether this field is repeated. - * @type {boolean} + * @see {@link Meter.addBatchObservableCallback} */ - this.repeated = rule === "repeated"; - + addBatchObservableCallback(_callback, _observables) { } /** - * Whether this field is a map or not. - * @type {boolean} + * @see {@link Meter.removeBatchObservableCallback} */ - this.map = false; + removeBatchObservableCallback(_callback) { } +} +exports.NoopMeter = NoopMeter; +class NoopMetric { +} +exports.NoopMetric = NoopMetric; +class NoopCounterMetric extends NoopMetric { + add(_value, _attributes) { } +} +exports.NoopCounterMetric = NoopCounterMetric; +class NoopUpDownCounterMetric extends NoopMetric { + add(_value, _attributes) { } +} +exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric; +class NoopHistogramMetric extends NoopMetric { + record(_value, _attributes) { } +} +exports.NoopHistogramMetric = NoopHistogramMetric; +class NoopObservableMetric { + addCallback(_callback) { } + removeCallback(_callback) { } +} +exports.NoopObservableMetric = NoopObservableMetric; +class NoopObservableCounterMetric extends NoopObservableMetric { +} +exports.NoopObservableCounterMetric = NoopObservableCounterMetric; +class NoopObservableGaugeMetric extends NoopObservableMetric { +} +exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric; +class NoopObservableUpDownCounterMetric extends NoopObservableMetric { +} +exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric; +exports.NOOP_METER = new NoopMeter(); +// Synchronous instruments +exports.NOOP_COUNTER_METRIC = new NoopCounterMetric(); +exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric(); +exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric(); +// Asynchronous instruments +exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric(); +exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric(); +exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric(); +/** + * Create a no-op Meter + */ +function createNoopMeter() { + return exports.NOOP_METER; +} +exports.createNoopMeter = createNoopMeter; +//# sourceMappingURL=NoopMeter.js.map - /** - * Message this field belongs to. - * @type {Type|null} - */ - this.message = null; +/***/ }), - /** - * OneOf this field belongs to, if any, - * @type {OneOf|null} - */ - this.partOf = null; +/***/ 72647: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * The field type's default value. - * @type {*} - */ - this.typeDefault = null; +"use strict"; - /** - * The field's default value on prototypes. - * @type {*} - */ - this.defaultValue = null; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0; +const NoopMeter_1 = __nccwpck_require__(4837); +/** + * An implementation of the {@link MeterProvider} which returns an impotent Meter + * for all calls to `getMeter` + */ +class NoopMeterProvider { + getMeter(_name, _version, _options) { + return NoopMeter_1.NOOP_METER; + } +} +exports.NoopMeterProvider = NoopMeterProvider; +exports.NOOP_METER_PROVIDER = new NoopMeterProvider(); +//# sourceMappingURL=NoopMeterProvider.js.map - /** - * Whether this field's value should be treated as a long. - * @type {boolean} - */ - this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false; +/***/ }), - /** - * Whether this field's value is a buffer. - * @type {boolean} - */ - this.bytes = type === "bytes"; +/***/ 99957: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - /** - * Resolved type if not a basic type. - * @type {Type|Enum|null} - */ - this.resolvedType = null; +"use strict"; - /** - * Sister-field within the extended type if a declaring extension field. - * @type {Field|null} - */ - this.extensionField = null; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(87200), exports); +//# sourceMappingURL=index.js.map - /** - * Sister-field within the declaring namespace if an extended field. - * @type {Field|null} - */ - this.declaringField = null; +/***/ }), - /** - * Internally remembers whether this field is packed. - * @type {boolean|null} - * @private - */ - this._packed = null; +/***/ 89406: +/***/ ((__unused_webpack_module, exports) => { - /** - * Comment for this field. - * @type {string|null} - */ - this.comment = comment; -} +"use strict"; -/** - * Determines whether this field is packed. Only relevant when repeated and working with proto2. - * @name Field#packed - * @type {boolean} - * @readonly +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Object.defineProperty(Field.prototype, "packed", { - get: function() { - // defaults to packed=true if not explicity set to false - if (this._packed === null) - this._packed = this.getOption("packed") !== false; - return this._packed; - } -}); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports._globalThis = void 0; +/** only globals that common to node and browsers are allowed */ +// eslint-disable-next-line node/no-unsupported-features/es-builtins +exports._globalThis = typeof globalThis === 'object' ? globalThis : global; +//# sourceMappingURL=globalThis.js.map -/** - * @override - */ -Field.prototype.setOption = function setOption(name, value, ifNotSet) { - if (name === "packed") // clear cached before setting - this._packed = null; - return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet); -}; +/***/ }), -/** - * Field descriptor. - * @interface IField - * @property {string} [rule="optional"] Field rule - * @property {string} type Field type - * @property {number} id Field id - * @property {Object.} [options] Field options - */ +/***/ 87200: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -/** - * Extension field descriptor. - * @interface IExtensionField - * @extends IField - * @property {string} extend Extended type - */ +"use strict"; -/** - * Converts this field to a field descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IField} Field descriptor - */ -Field.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "rule" , this.rule !== "optional" && this.rule || undefined, - "type" , this.type, - "id" , this.id, - "extend" , this.extend, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * Resolves this field's type references. - * @returns {Field} `this` - * @throws {Error} If any reference cannot be resolved +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Field.prototype.resolve = function resolve() { - - if (this.resolved) - return this; - - if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it - this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type); - if (this.resolvedType instanceof Type) - this.typeDefault = null; - else // instanceof Enum - this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined - } else if (this.options && this.options.proto3_optional) { - // proto3 scalar value marked optional; should default to null - this.typeDefault = null; - } - - // use explicitly set default value if present - if (this.options && this.options["default"] != null) { - this.typeDefault = this.options["default"]; - if (this.resolvedType instanceof Enum && typeof this.typeDefault === "string") - this.typeDefault = this.resolvedType.values[this.typeDefault]; - } +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(89406), exports); +//# sourceMappingURL=index.js.map - // remove unnecessary options - if (this.options) { - if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum)) - delete this.options.packed; - if (!Object.keys(this.options).length) - this.options = undefined; - } +/***/ }), - // convert to internal data type if necesssary - if (this.long) { - this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"); +/***/ 17591: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /* istanbul ignore else */ - if (Object.freeze) - Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) +"use strict"; - } else if (this.bytes && typeof this.typeDefault === "string") { - var buf; - if (util.base64.test(this.typeDefault)) - util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0); - else - util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0); - this.typeDefault = buf; - } +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.propagation = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const propagation_1 = __nccwpck_require__(89909); +/** Entrypoint for propagation API */ +exports.propagation = propagation_1.PropagationAPI.getInstance(); +//# sourceMappingURL=propagation-api.js.map - // take special care of maps and repeated fields - if (this.map) - this.defaultValue = util.emptyObject; - else if (this.repeated) - this.defaultValue = util.emptyArray; - else - this.defaultValue = this.typeDefault; +/***/ }), - // ensure proper value on prototype - if (this.parent instanceof Type) - this.parent.ctor.prototype[this.name] = this.defaultValue; +/***/ 72368: +/***/ ((__unused_webpack_module, exports) => { - return ReflectionObject.prototype.resolve.call(this); -}; +"use strict"; -/** - * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript). - * @typedef FieldDecorator - * @type {function} - * @param {Object} prototype Target prototype - * @param {string} fieldName Field name - * @returns {undefined} +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NoopTextMapPropagator = void 0; /** - * Field decorator (TypeScript). - * @name Field.d - * @function - * @param {number} fieldId Field id - * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|Object} fieldType Field type - * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule - * @param {T} [defaultValue] Default value - * @returns {FieldDecorator} Decorator function - * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[] + * No-op implementations of {@link TextMapPropagator}. */ -Field.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) { +class NoopTextMapPropagator { + /** Noop inject function does nothing */ + inject(_context, _carrier) { } + /** Noop extract function does nothing and returns the input context */ + extract(context, _carrier) { + return context; + } + fields() { + return []; + } +} +exports.NoopTextMapPropagator = NoopTextMapPropagator; +//# sourceMappingURL=NoopTextMapPropagator.js.map - // submessage: decorate the submessage and use its name as the type - if (typeof fieldType === "function") - fieldType = util.decorateType(fieldType).name; +/***/ }), - // enum reference: create a reflected copy of the enum and keep reuseing it - else if (fieldType && typeof fieldType === "object") - fieldType = util.decorateEnum(fieldType).name; +/***/ 80865: +/***/ ((__unused_webpack_module, exports) => { - return function fieldDecorator(prototype, fieldName) { - util.decorateType(prototype.constructor) - .add(new Field(fieldName, fieldId, fieldType, fieldRule, { "default": defaultValue })); - }; -}; +"use strict"; -/** - * Field decorator (TypeScript). - * @name Field.d - * @function - * @param {number} fieldId Field id - * @param {Constructor|string} fieldType Field type - * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule - * @returns {FieldDecorator} Decorator function - * @template T extends Message - * @variation 2 +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -// like Field.d but without a default value - -// Sets up cyclic dependencies (called in index-light) -Field._configure = function configure(Type_) { - Type = Type_; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0; +exports.defaultTextMapGetter = { + get(carrier, key) { + if (carrier == null) { + return undefined; + } + return carrier[key]; + }, + keys(carrier) { + if (carrier == null) { + return []; + } + return Object.keys(carrier); + }, }; - +exports.defaultTextMapSetter = { + set(carrier, key, value) { + if (carrier == null) { + return; + } + carrier[key] = value; + }, +}; +//# sourceMappingURL=TextMapPropagator.js.map /***/ }), -/***/ 60851: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 98989: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var protobuf = module.exports = __nccwpck_require__(86423); - -protobuf.build = "light"; - -/** - * A node-style callback as used by {@link load} and {@link Root#load}. - * @typedef LoadCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Root} [root] Root, if there hasn't been an error - * @returns {undefined} - */ - -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. - * @param {string|string[]} filename One or multiple files to load - * @param {Root} root Root namespace, defaults to create a new one if omitted. - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @see {@link Root#load} +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -function load(filename, root, callback) { - if (typeof root === "function") { - callback = root; - root = new protobuf.Root(); - } else if (!root) - root = new protobuf.Root(); - return root.load(filename, callback); -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.trace = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const trace_1 = __nccwpck_require__(81539); +/** Entrypoint for trace API */ +exports.trace = trace_1.TraceAPI.getInstance(); +//# sourceMappingURL=trace-api.js.map -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. - * @name load - * @function - * @param {string|string[]} filename One or multiple files to load - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @see {@link Root#load} - * @variation 2 - */ -// function load(filename:string, callback:LoadCallback):undefined +/***/ }), -/** - * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise. - * @name load - * @function - * @param {string|string[]} filename One or multiple files to load - * @param {Root} [root] Root namespace, defaults to create a new one if omitted. - * @returns {Promise} Promise - * @see {@link Root#load} - * @variation 3 - */ -// function load(filename:string, [root:Root]):Promise +/***/ 81462: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -protobuf.load = load; +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NonRecordingSpan = void 0; +const invalid_span_constants_1 = __nccwpck_require__(91760); /** - * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only). - * @param {string|string[]} filename One or multiple files to load - * @param {Root} [root] Root namespace, defaults to create a new one if omitted. - * @returns {Root} Root namespace - * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid - * @see {@link Root#loadSync} + * The NonRecordingSpan is the default {@link Span} that is used when no Span + * implementation is available. All operations are no-op including context + * propagation. */ -function loadSync(filename, root) { - if (!root) - root = new protobuf.Root(); - return root.loadSync(filename); +class NonRecordingSpan { + constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) { + this._spanContext = _spanContext; + } + // Returns a SpanContext. + spanContext() { + return this._spanContext; + } + // By default does nothing + setAttribute(_key, _value) { + return this; + } + // By default does nothing + setAttributes(_attributes) { + return this; + } + // By default does nothing + addEvent(_name, _attributes) { + return this; + } + // By default does nothing + setStatus(_status) { + return this; + } + // By default does nothing + updateName(_name) { + return this; + } + // By default does nothing + end(_endTime) { } + // isRecording always returns false for NonRecordingSpan. + isRecording() { + return false; + } + // By default does nothing + recordException(_exception, _time) { } } - -protobuf.loadSync = loadSync; - -// Serialization -protobuf.encoder = __nccwpck_require__(61469); -protobuf.decoder = __nccwpck_require__(17128); -protobuf.verifier = __nccwpck_require__(23759); -protobuf.converter = __nccwpck_require__(98548); - -// Reflection -protobuf.ReflectionObject = __nccwpck_require__(96070); -protobuf.Namespace = __nccwpck_require__(28131); -protobuf.Root = __nccwpck_require__(38372); -protobuf.Enum = __nccwpck_require__(94299); -protobuf.Type = __nccwpck_require__(26301); -protobuf.Field = __nccwpck_require__(20577); -protobuf.OneOf = __nccwpck_require__(51895); -protobuf.MapField = __nccwpck_require__(86663); -protobuf.Service = __nccwpck_require__(86269); -protobuf.Method = __nccwpck_require__(86814); - -// Runtime -protobuf.Message = __nccwpck_require__(63036); -protobuf.wrappers = __nccwpck_require__(7281); - -// Utility -protobuf.types = __nccwpck_require__(98887); -protobuf.util = __nccwpck_require__(93492); - -// Set up possibly cyclic reflection dependencies -protobuf.ReflectionObject._configure(protobuf.Root); -protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum); -protobuf.Root._configure(protobuf.Type); -protobuf.Field._configure(protobuf.Type); - +exports.NonRecordingSpan = NonRecordingSpan; +//# sourceMappingURL=NonRecordingSpan.js.map /***/ }), -/***/ 86423: +/***/ 17606: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var protobuf = exports; - -/** - * Build type, one of `"full"`, `"light"` or `"minimal"`. - * @name build - * @type {string} - * @const +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -protobuf.build = "minimal"; - -// Serialization -protobuf.Writer = __nccwpck_require__(86287); -protobuf.BufferWriter = __nccwpck_require__(35740); -protobuf.Reader = __nccwpck_require__(24576); -protobuf.BufferReader = __nccwpck_require__(22819); - -// Utility -protobuf.util = __nccwpck_require__(10329); -protobuf.rpc = __nccwpck_require__(56967); -protobuf.roots = __nccwpck_require__(1878); -protobuf.configure = configure; - -/* istanbul ignore next */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NoopTracer = void 0; +const context_1 = __nccwpck_require__(57171); +const context_utils_1 = __nccwpck_require__(23326); +const NonRecordingSpan_1 = __nccwpck_require__(81462); +const spancontext_utils_1 = __nccwpck_require__(49745); +const contextApi = context_1.ContextAPI.getInstance(); /** - * Reconfigures the library according to the environment. - * @returns {undefined} + * No-op implementations of {@link Tracer}. */ -function configure() { - protobuf.util._configure(); - protobuf.Writer._configure(protobuf.BufferWriter); - protobuf.Reader._configure(protobuf.BufferReader); +class NoopTracer { + // startSpan starts a noop span. + startSpan(name, options, context = contextApi.active()) { + const root = Boolean(options === null || options === void 0 ? void 0 : options.root); + if (root) { + return new NonRecordingSpan_1.NonRecordingSpan(); + } + const parentFromContext = context && (0, context_utils_1.getSpanContext)(context); + if (isSpanContext(parentFromContext) && + (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) { + return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext); + } + else { + return new NonRecordingSpan_1.NonRecordingSpan(); + } + } + startActiveSpan(name, arg2, arg3, arg4) { + let opts; + let ctx; + let fn; + if (arguments.length < 2) { + return; + } + else if (arguments.length === 2) { + fn = arg2; + } + else if (arguments.length === 3) { + opts = arg2; + fn = arg3; + } + else { + opts = arg2; + ctx = arg3; + fn = arg4; + } + const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active(); + const span = this.startSpan(name, opts, parentContext); + const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span); + return contextApi.with(contextWithSpanSet, fn, undefined, span); + } } - -// Set up buffer utility according to the environment -configure(); - +exports.NoopTracer = NoopTracer; +function isSpanContext(spanContext) { + return (typeof spanContext === 'object' && + typeof spanContext['spanId'] === 'string' && + typeof spanContext['traceId'] === 'string' && + typeof spanContext['traceFlags'] === 'number'); +} +//# sourceMappingURL=NoopTracer.js.map /***/ }), -/***/ 71837: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 23259: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var protobuf = module.exports = __nccwpck_require__(60851); - -protobuf.build = "full"; - -// Parser -protobuf.tokenize = __nccwpck_require__(68857); -protobuf.parse = __nccwpck_require__(19511); -protobuf.common = __nccwpck_require__(10787); - -// Configure parser -protobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common); - +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NoopTracerProvider = void 0; +const NoopTracer_1 = __nccwpck_require__(17606); +/** + * An implementation of the {@link TracerProvider} which returns an impotent + * Tracer for all calls to `getTracer`. + * + * All operations are no-op. + */ +class NoopTracerProvider { + getTracer(_name, _version, _options) { + return new NoopTracer_1.NoopTracer(); + } +} +exports.NoopTracerProvider = NoopTracerProvider; +//# sourceMappingURL=NoopTracerProvider.js.map /***/ }), -/***/ 86663: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 43503: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = MapField; - -// extends Field -var Field = __nccwpck_require__(20577); -((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = "MapField"; - -var types = __nccwpck_require__(98887), - util = __nccwpck_require__(93492); - +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ProxyTracer = void 0; +const NoopTracer_1 = __nccwpck_require__(17606); +const NOOP_TRACER = new NoopTracer_1.NoopTracer(); /** - * Constructs a new map field instance. - * @classdesc Reflected map field. - * @extends FieldBase - * @constructor - * @param {string} name Unique name within its namespace - * @param {number} id Unique id within its namespace - * @param {string} keyType Key type - * @param {string} type Value type - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field + * Proxy tracer provided by the proxy tracer provider */ -function MapField(name, id, keyType, type, options, comment) { - Field.call(this, name, id, type, undefined, undefined, options, comment); - - /* istanbul ignore if */ - if (!util.isString(keyType)) - throw TypeError("keyType must be a string"); - - /** - * Key type. - * @type {string} - */ - this.keyType = keyType; // toJSON, marker - +class ProxyTracer { + constructor(_provider, name, version, options) { + this._provider = _provider; + this.name = name; + this.version = version; + this.options = options; + } + startSpan(name, options, context) { + return this._getTracer().startSpan(name, options, context); + } + startActiveSpan(_name, _options, _context, _fn) { + const tracer = this._getTracer(); + return Reflect.apply(tracer.startActiveSpan, tracer, arguments); + } /** - * Resolved key type if not a basic type. - * @type {ReflectionObject|null} + * Try to get a tracer from the proxy tracer provider. + * If the proxy tracer provider has no delegate, return a noop tracer. */ - this.resolvedKeyType = null; - - // Overrides Field#map - this.map = true; + _getTracer() { + if (this._delegate) { + return this._delegate; + } + const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options); + if (!tracer) { + return NOOP_TRACER; + } + this._delegate = tracer; + return this._delegate; + } } +exports.ProxyTracer = ProxyTracer; +//# sourceMappingURL=ProxyTracer.js.map -/** - * Map field descriptor. - * @interface IMapField - * @extends {IField} - * @property {string} keyType Key type - */ +/***/ }), -/** - * Extension map field descriptor. - * @interface IExtensionMapField - * @extends IMapField - * @property {string} extend Extended type - */ +/***/ 2285: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Constructs a map field from a map field descriptor. - * @param {string} name Field name - * @param {IMapField} json Map field descriptor - * @returns {MapField} Created map field - * @throws {TypeError} If arguments are invalid - */ -MapField.fromJSON = function fromJSON(name, json) { - return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment); -}; +"use strict"; -/** - * Converts this map field to a map field descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IMapField} Map field descriptor +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -MapField.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "keyType" , this.keyType, - "type" , this.type, - "id" , this.id, - "extend" , this.extend, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined - ]); -}; - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ProxyTracerProvider = void 0; +const ProxyTracer_1 = __nccwpck_require__(43503); +const NoopTracerProvider_1 = __nccwpck_require__(23259); +const NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider(); /** - * @override + * Tracer provider which provides {@link ProxyTracer}s. + * + * Before a delegate is set, tracers provided are NoOp. + * When a delegate is set, traces are provided from the delegate. + * When a delegate is set after tracers have already been provided, + * all tracers already provided will use the provided delegate implementation. */ -MapField.prototype.resolve = function resolve() { - if (this.resolved) - return this; +class ProxyTracerProvider { + /** + * Get a {@link ProxyTracer} + */ + getTracer(name, version, options) { + var _a; + return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options)); + } + getDelegate() { + var _a; + return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER; + } + /** + * Set the delegate tracer provider + */ + setDelegate(delegate) { + this._delegate = delegate; + } + getDelegateTracer(name, version, options) { + var _a; + return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options); + } +} +exports.ProxyTracerProvider = ProxyTracerProvider; +//# sourceMappingURL=ProxyTracerProvider.js.map - // Besides a value type, map fields have a key type that may be "any scalar type except for floating point types and bytes" - if (types.mapKey[this.keyType] === undefined) - throw Error("invalid key type: " + this.keyType); +/***/ }), - return Field.prototype.resolve.call(this); -}; +/***/ 33209: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SamplingDecision = void 0; /** - * Map field decorator (TypeScript). - * @name MapField.d - * @function - * @param {number} fieldId Field id - * @param {"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"} fieldKeyType Field key type - * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|Object|Constructor<{}>} fieldValueType Field value type - * @returns {FieldDecorator} Decorator function - * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> } + * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead. + * A sampling decision that determines how a {@link Span} will be recorded + * and collected. */ -MapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) { - - // submessage value: decorate the submessage and use its name as the type - if (typeof fieldValueType === "function") - fieldValueType = util.decorateType(fieldValueType).name; - - // enum reference value: create a reflected copy of the enum and keep reuseing it - else if (fieldValueType && typeof fieldValueType === "object") - fieldValueType = util.decorateEnum(fieldValueType).name; - - return function mapFieldDecorator(prototype, fieldName) { - util.decorateType(prototype.constructor) - .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType)); - }; -}; - +var SamplingDecision; +(function (SamplingDecision) { + /** + * `Span.isRecording() === false`, span will not be recorded and all events + * and attributes will be dropped. + */ + SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD"; + /** + * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags} + * MUST NOT be set. + */ + SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD"; + /** + * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags} + * MUST be set. + */ + SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED"; +})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {})); +//# sourceMappingURL=SamplingResult.js.map /***/ }), -/***/ 63036: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 23326: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = Message; - -var util = __nccwpck_require__(10329); - -/** - * Constructs a new message instance. - * @classdesc Abstract runtime message. - * @constructor - * @param {Properties} [properties] Properties to set - * @template T extends object = object +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -function Message(properties) { - // not used internally - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - this[keys[i]] = properties[keys[i]]; -} - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = void 0; +const context_1 = __nccwpck_require__(78242); +const NonRecordingSpan_1 = __nccwpck_require__(81462); +const context_2 = __nccwpck_require__(57171); /** - * Reference to the reflected type. - * @name Message.$type - * @type {Type} - * @readonly + * span key */ - +const SPAN_KEY = (0, context_1.createContextKey)('OpenTelemetry Context Key SPAN'); /** - * Reference to the reflected type. - * @name Message#$type - * @type {Type} - * @readonly + * Return the span if one exists + * + * @param context context to get span from */ - -/*eslint-disable valid-jsdoc*/ - +function getSpan(context) { + return context.getValue(SPAN_KEY) || undefined; +} +exports.getSpan = getSpan; /** - * Creates a new message of this type using the specified properties. - * @param {Object.} [properties] Properties to set - * @returns {Message} Message instance - * @template T extends Message - * @this Constructor + * Gets the span from the current context, if one exists. */ -Message.create = function create(properties) { - return this.$type.create(properties); -}; - +function getActiveSpan() { + return getSpan(context_2.ContextAPI.getInstance().active()); +} +exports.getActiveSpan = getActiveSpan; /** - * Encodes a message of this type. - * @param {T|Object.} message Message to encode - * @param {Writer} [writer] Writer to use - * @returns {Writer} Writer - * @template T extends Message - * @this Constructor + * Set the span on a context + * + * @param context context to use as parent + * @param span span to set active */ -Message.encode = function encode(message, writer) { - return this.$type.encode(message, writer); -}; - +function setSpan(context, span) { + return context.setValue(SPAN_KEY, span); +} +exports.setSpan = setSpan; /** - * Encodes a message of this type preceeded by its length as a varint. - * @param {T|Object.} message Message to encode - * @param {Writer} [writer] Writer to use - * @returns {Writer} Writer - * @template T extends Message - * @this Constructor + * Remove current span stored in the context + * + * @param context context to delete span from */ -Message.encodeDelimited = function encodeDelimited(message, writer) { - return this.$type.encodeDelimited(message, writer); -}; - +function deleteSpan(context) { + return context.deleteValue(SPAN_KEY); +} +exports.deleteSpan = deleteSpan; /** - * Decodes a message of this type. - * @name Message.decode - * @function - * @param {Reader|Uint8Array} reader Reader or buffer to decode - * @returns {T} Decoded message - * @template T extends Message - * @this Constructor + * Wrap span context in a NoopSpan and set as span in a new + * context + * + * @param context context to set active span on + * @param spanContext span context to be wrapped */ -Message.decode = function decode(reader) { - return this.$type.decode(reader); -}; - +function setSpanContext(context, spanContext) { + return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext)); +} +exports.setSpanContext = setSpanContext; /** - * Decodes a message of this type preceeded by its length as a varint. - * @name Message.decodeDelimited - * @function - * @param {Reader|Uint8Array} reader Reader or buffer to decode - * @returns {T} Decoded message - * @template T extends Message - * @this Constructor + * Get the span context of the span if it exists. + * + * @param context context to get values from */ -Message.decodeDelimited = function decodeDelimited(reader) { - return this.$type.decodeDelimited(reader); -}; +function getSpanContext(context) { + var _a; + return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext(); +} +exports.getSpanContext = getSpanContext; +//# sourceMappingURL=context-utils.js.map -/** - * Verifies a message of this type. - * @name Message.verify - * @function - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ -Message.verify = function verify(message) { - return this.$type.verify(message); -}; +/***/ }), -/** - * Creates a new message of this type from a plain object. Also converts values to their respective internal types. - * @param {Object.} object Plain object - * @returns {T} Message instance - * @template T extends Message - * @this Constructor - */ -Message.fromObject = function fromObject(object) { - return this.$type.fromObject(object); -}; +/***/ 62110: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Creates a plain object from a message of this type. Also converts values to other types if specified. - * @param {T} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - * @template T extends Message - * @this Constructor - */ -Message.toObject = function toObject(message, options) { - return this.$type.toObject(message, options); -}; +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TraceStateImpl = void 0; +const tracestate_validators_1 = __nccwpck_require__(54864); +const MAX_TRACE_STATE_ITEMS = 32; +const MAX_TRACE_STATE_LEN = 512; +const LIST_MEMBERS_SEPARATOR = ','; +const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; /** - * Converts this message to JSON. - * @returns {Object.} JSON object + * TraceState must be a class and not a simple object type because of the spec + * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). + * + * Here is the list of allowed mutations: + * - New key-value pair should be added into the beginning of the list + * - The value of any key can be updated. Modified keys MUST be moved to the + * beginning of the list. */ -Message.prototype.toJSON = function toJSON() { - return this.$type.toObject(this, util.toJSONOptions); -}; - -/*eslint-enable valid-jsdoc*/ +class TraceStateImpl { + constructor(rawTraceState) { + this._internalState = new Map(); + if (rawTraceState) + this._parse(rawTraceState); + } + set(key, value) { + // TODO: Benchmark the different approaches(map vs list) and + // use the faster one. + const traceState = this._clone(); + if (traceState._internalState.has(key)) { + traceState._internalState.delete(key); + } + traceState._internalState.set(key, value); + return traceState; + } + unset(key) { + const traceState = this._clone(); + traceState._internalState.delete(key); + return traceState; + } + get(key) { + return this._internalState.get(key); + } + serialize() { + return this._keys() + .reduce((agg, key) => { + agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); + return agg; + }, []) + .join(LIST_MEMBERS_SEPARATOR); + } + _parse(rawTraceState) { + if (rawTraceState.length > MAX_TRACE_STATE_LEN) + return; + this._internalState = rawTraceState + .split(LIST_MEMBERS_SEPARATOR) + .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning + .reduce((agg, part) => { + const listMember = part.trim(); // Optional Whitespace (OWS) handling + const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); + if (i !== -1) { + const key = listMember.slice(0, i); + const value = listMember.slice(i + 1, part.length); + if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) { + agg.set(key, value); + } + else { + // TODO: Consider to add warning log + } + } + return agg; + }, new Map()); + // Because of the reverse() requirement, trunc must be done after map is created + if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { + this._internalState = new Map(Array.from(this._internalState.entries()) + .reverse() // Use reverse same as original tracestate parse chain + .slice(0, MAX_TRACE_STATE_ITEMS)); + } + } + _keys() { + return Array.from(this._internalState.keys()).reverse(); + } + _clone() { + const traceState = new TraceStateImpl(); + traceState._internalState = new Map(this._internalState); + return traceState; + } +} +exports.TraceStateImpl = TraceStateImpl; +//# sourceMappingURL=tracestate-impl.js.map /***/ }), -/***/ 86814: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 54864: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = Method; - -// extends ReflectionObject -var ReflectionObject = __nccwpck_require__(96070); -((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.validateValue = exports.validateKey = void 0; +const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; +const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; +const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; +const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); +const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; +const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; +/** + * Key is opaque string up to 256 characters printable. It MUST begin with a + * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, + * underscores _, dashes -, asterisks *, and forward slashes /. + * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the + * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. + * see https://www.w3.org/TR/trace-context/#key + */ +function validateKey(key) { + return VALID_KEY_REGEX.test(key); +} +exports.validateKey = validateKey; +/** + * Value is opaque string up to 256 characters printable ASCII RFC0020 + * characters (i.e., the range 0x20 to 0x7E) except comma , and =. + */ +function validateValue(value) { + return (VALID_VALUE_BASE_REGEX.test(value) && + !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); +} +exports.validateValue = validateValue; +//# sourceMappingURL=tracestate-validators.js.map -var util = __nccwpck_require__(93492); +/***/ }), -/** - * Constructs a new service method instance. - * @classdesc Reflected service method. - * @extends ReflectionObject - * @constructor - * @param {string} name Method name - * @param {string|undefined} type Method type, usually `"rpc"` - * @param {string} requestType Request message type - * @param {string} responseType Response message type - * @param {boolean|Object.} [requestStream] Whether the request is streamed - * @param {boolean|Object.} [responseStream] Whether the response is streamed - * @param {Object.} [options] Declared options - * @param {string} [comment] The comment for this method - * @param {Object.} [parsedOptions] Declared options, properly parsed into an object +/***/ 32615: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -function Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) { +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createTraceState = void 0; +const tracestate_impl_1 = __nccwpck_require__(62110); +function createTraceState(rawTraceState) { + return new tracestate_impl_1.TraceStateImpl(rawTraceState); +} +exports.createTraceState = createTraceState; +//# sourceMappingURL=utils.js.map - /* istanbul ignore next */ - if (util.isObject(requestStream)) { - options = requestStream; - requestStream = responseStream = undefined; - } else if (util.isObject(responseStream)) { - options = responseStream; - responseStream = undefined; - } +/***/ }), - /* istanbul ignore if */ - if (!(type === undefined || util.isString(type))) - throw TypeError("type must be a string"); +/***/ 91760: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /* istanbul ignore if */ - if (!util.isString(requestType)) - throw TypeError("requestType must be a string"); +"use strict"; - /* istanbul ignore if */ - if (!util.isString(responseType)) - throw TypeError("responseType must be a string"); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0; +const trace_flags_1 = __nccwpck_require__(26905); +exports.INVALID_SPANID = '0000000000000000'; +exports.INVALID_TRACEID = '00000000000000000000000000000000'; +exports.INVALID_SPAN_CONTEXT = { + traceId: exports.INVALID_TRACEID, + spanId: exports.INVALID_SPANID, + traceFlags: trace_flags_1.TraceFlags.NONE, +}; +//# sourceMappingURL=invalid-span-constants.js.map - ReflectionObject.call(this, name, options); +/***/ }), - /** - * Method type. - * @type {string} - */ - this.type = type || "rpc"; // toJSON +/***/ 31424: +/***/ ((__unused_webpack_module, exports) => { - /** - * Request type. - * @type {string} - */ - this.requestType = requestType; // toJSON, marker +"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SpanKind = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var SpanKind; +(function (SpanKind) { + /** Default value. Indicates that the span is used internally. */ + SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL"; /** - * Whether requests are streamed or not. - * @type {boolean|undefined} + * Indicates that the span covers server-side handling of an RPC or other + * remote request. */ - this.requestStream = requestStream ? true : undefined; // toJSON - + SpanKind[SpanKind["SERVER"] = 1] = "SERVER"; /** - * Response type. - * @type {string} + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. */ - this.responseType = responseType; // toJSON - + SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT"; /** - * Whether responses are streamed or not. - * @type {boolean|undefined} + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. */ - this.responseStream = responseStream ? true : undefined; // toJSON - + SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER"; /** - * Resolved request type. - * @type {Type|null} + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. */ - this.resolvedRequestType = null; + SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER"; +})(SpanKind = exports.SpanKind || (exports.SpanKind = {})); +//# sourceMappingURL=span_kind.js.map - /** - * Resolved response type. - * @type {Type|null} - */ - this.resolvedResponseType = null; +/***/ }), - /** - * Comment for this method - * @type {string|null} - */ - this.comment = comment; +/***/ 49745: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * Options properly parsed into an object - */ - this.parsedOptions = parsedOptions; -} +"use strict"; -/** - * Method descriptor. - * @interface IMethod - * @property {string} [type="rpc"] Method type - * @property {string} requestType Request type - * @property {string} responseType Response type - * @property {boolean} [requestStream=false] Whether requests are streamed - * @property {boolean} [responseStream=false] Whether responses are streamed - * @property {Object.} [options] Method options - * @property {string} comment Method comments - * @property {Object.} [parsedOptions] Method options properly parsed into an object +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - +const invalid_span_constants_1 = __nccwpck_require__(91760); +const NonRecordingSpan_1 = __nccwpck_require__(81462); +const VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i; +const VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i; +function isValidTraceId(traceId) { + return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID; +} +exports.isValidTraceId = isValidTraceId; +function isValidSpanId(spanId) { + return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID; +} +exports.isValidSpanId = isValidSpanId; /** - * Constructs a method from a method descriptor. - * @param {string} name Method name - * @param {IMethod} json Method descriptor - * @returns {Method} Created method - * @throws {TypeError} If arguments are invalid + * Returns true if this {@link SpanContext} is valid. + * @return true if this {@link SpanContext} is valid. */ -Method.fromJSON = function fromJSON(name, json) { - return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions); -}; - +function isSpanContextValid(spanContext) { + return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId)); +} +exports.isSpanContextValid = isSpanContextValid; /** - * Converts this method to a method descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IMethod} Method descriptor + * Wrap the given {@link SpanContext} in a new non-recording {@link Span} + * + * @param spanContext span context to be wrapped + * @returns a new non-recording {@link Span} with the provided context */ -Method.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "type" , this.type !== "rpc" && /* istanbul ignore next */ this.type || undefined, - "requestType" , this.requestType, - "requestStream" , this.requestStream, - "responseType" , this.responseType, - "responseStream" , this.responseStream, - "options" , this.options, - "comment" , keepComments ? this.comment : undefined, - "parsedOptions" , this.parsedOptions, - ]); -}; +function wrapSpanContext(spanContext) { + return new NonRecordingSpan_1.NonRecordingSpan(spanContext); +} +exports.wrapSpanContext = wrapSpanContext; +//# sourceMappingURL=spancontext-utils.js.map + +/***/ }), + +/***/ 48845: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SpanStatusCode = void 0; /** - * @override + * An enumeration of status codes. */ -Method.prototype.resolve = function resolve() { +var SpanStatusCode; +(function (SpanStatusCode) { + /** + * The default status. + */ + SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET"; + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ + SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK"; + /** + * The operation contains an error. + */ + SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR"; +})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {})); +//# sourceMappingURL=status.js.map - /* istanbul ignore if */ - if (this.resolved) - return this; +/***/ }), - this.resolvedRequestType = this.parent.lookupType(this.requestType); - this.resolvedResponseType = this.parent.lookupType(this.responseType); +/***/ 26905: +/***/ ((__unused_webpack_module, exports) => { - return ReflectionObject.prototype.resolve.call(this); -}; +"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TraceFlags = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var TraceFlags; +(function (TraceFlags) { + /** Represents no flag set. */ + TraceFlags[TraceFlags["NONE"] = 0] = "NONE"; + /** Bit to represent whether trace is sampled in trace flags. */ + TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED"; +})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {})); +//# sourceMappingURL=trace_flags.js.map /***/ }), -/***/ 28131: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 98996: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = Namespace; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.VERSION = void 0; +// this is autogenerated file, see scripts/version-update.js +exports.VERSION = '1.8.0'; +//# sourceMappingURL=version.js.map -// extends ReflectionObject -var ReflectionObject = __nccwpck_require__(96070); -((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace"; +/***/ }), -var Field = __nccwpck_require__(20577), - util = __nccwpck_require__(93492), - OneOf = __nccwpck_require__(51895); +/***/ 67959: +/***/ ((__unused_webpack_module, exports) => { -var Type, // cyclic - Service, - Enum; +"use strict"; -/** - * Constructs a new namespace instance. - * @name Namespace - * @classdesc Reflected namespace. - * @extends NamespaceBase - * @constructor - * @param {string} name Namespace name - * @param {Object.} [options] Declared options +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExportResultCode = void 0; +var ExportResultCode; +(function (ExportResultCode) { + ExportResultCode[ExportResultCode["SUCCESS"] = 0] = "SUCCESS"; + ExportResultCode[ExportResultCode["FAILED"] = 1] = "FAILED"; +})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {})); +//# sourceMappingURL=ExportResult.js.map -/** - * Constructs a namespace from JSON. - * @memberof Namespace - * @function - * @param {string} name Namespace name - * @param {Object.} json JSON object - * @returns {Namespace} Created namespace - * @throws {TypeError} If arguments are invalid - */ -Namespace.fromJSON = function fromJSON(name, json) { - return new Namespace(name, json.options).addJSON(json.nested); -}; +/***/ }), -/** - * Converts an array of reflection objects to JSON. - * @memberof Namespace - * @param {ReflectionObject[]} array Object array - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {Object.|undefined} JSON object or `undefined` when array is empty - */ -function arrayToJSON(array, toJSONOptions) { - if (!(array && array.length)) - return undefined; - var obj = {}; - for (var i = 0; i < array.length; ++i) - obj[array[i].name] = array[i].toJSON(toJSONOptions); - return obj; -} +/***/ 36178: +/***/ ((__unused_webpack_module, exports) => { -Namespace.arrayToJSON = arrayToJSON; +"use strict"; -/** - * Tests if the specified id is reserved. - * @param {Array.|undefined} reserved Array of reserved ranges and names - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Namespace.isReservedId = function isReservedId(reserved, id) { - if (reserved) - for (var i = 0; i < reserved.length; ++i) - if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] > id) - return true; - return false; -}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0; +exports.BAGGAGE_KEY_PAIR_SEPARATOR = '='; +exports.BAGGAGE_PROPERTIES_SEPARATOR = ';'; +exports.BAGGAGE_ITEMS_SEPARATOR = ','; +// Name of the http header used to propagate the baggage +exports.BAGGAGE_HEADER = 'baggage'; +// Maximum number of name-value pairs allowed by w3c spec +exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180; +// Maximum number of bytes per a single name-value pair allowed by w3c spec +exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096; +// Maximum total length of all name-value pairs allowed by w3c spec +exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192; +//# sourceMappingURL=constants.js.map -/** - * Tests if the specified name is reserved. - * @param {Array.|undefined} reserved Array of reserved ranges and names - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Namespace.isReservedName = function isReservedName(reserved, name) { - if (reserved) - for (var i = 0; i < reserved.length; ++i) - if (reserved[i] === name) - return true; - return false; -}; +/***/ }), -/** - * Not an actual constructor. Use {@link Namespace} instead. - * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions. - * @exports NamespaceBase - * @extends ReflectionObject - * @abstract - * @constructor - * @param {string} name Namespace name - * @param {Object.} [options] Declared options - * @see {@link Namespace} - */ -function Namespace(name, options) { - ReflectionObject.call(this, name, options); +/***/ 61476: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * Nested objects by name. - * @type {Object.|undefined} - */ - this.nested = undefined; // toJSON +"use strict"; - /** - * Cached nested objects as an array. - * @type {ReflectionObject[]|null} - * @private - */ - this._nestedArray = null; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.W3CBaggagePropagator = void 0; +const api_1 = __nccwpck_require__(65163); +const suppress_tracing_1 = __nccwpck_require__(54463); +const constants_1 = __nccwpck_require__(36178); +const utils_1 = __nccwpck_require__(49884); +/** + * Propagates {@link Baggage} through Context format propagation. + * + * Based on the Baggage specification: + * https://w3c.github.io/baggage/ + */ +class W3CBaggagePropagator { + inject(context, carrier, setter) { + const baggage = api_1.propagation.getBaggage(context); + if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context)) + return; + const keyPairs = (0, utils_1.getKeyPairs)(baggage) + .filter((pair) => { + return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS; + }) + .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS); + const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs); + if (headerValue.length > 0) { + setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue); + } + } + extract(context, carrier, getter) { + const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER); + const baggageString = Array.isArray(headerValue) + ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) + : headerValue; + if (!baggageString) + return context; + const baggage = {}; + if (baggageString.length === 0) { + return context; + } + const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR); + pairs.forEach(entry => { + const keyPair = (0, utils_1.parsePairKeyValue)(entry); + if (keyPair) { + const baggageEntry = { value: keyPair.value }; + if (keyPair.metadata) { + baggageEntry.metadata = keyPair.metadata; + } + baggage[keyPair.key] = baggageEntry; + } + }); + if (Object.entries(baggage).length === 0) { + return context; + } + return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage)); + } + fields() { + return [constants_1.BAGGAGE_HEADER]; + } } +exports.W3CBaggagePropagator = W3CBaggagePropagator; +//# sourceMappingURL=W3CBaggagePropagator.js.map -function clearCache(namespace) { - namespace._nestedArray = null; - return namespace; -} +/***/ }), -/** - * Nested objects of this namespace as an array for iteration. - * @name NamespaceBase#nestedArray - * @type {ReflectionObject[]} - * @readonly +/***/ 49884: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Object.defineProperty(Namespace.prototype, "nestedArray", { - get: function() { - return this._nestedArray || (this._nestedArray = util.toArray(this.nested)); +const api_1 = __nccwpck_require__(65163); +const constants_1 = __nccwpck_require__(36178); +function serializeKeyPairs(keyPairs) { + return keyPairs.reduce((hValue, current) => { + const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`; + return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value; + }, ''); +} +exports.serializeKeyPairs = serializeKeyPairs; +function getKeyPairs(baggage) { + return baggage.getAllEntries().map(([key, value]) => { + let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`; + // include opaque metadata if provided + // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation + if (value.metadata !== undefined) { + entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString(); + } + return entry; + }); +} +exports.getKeyPairs = getKeyPairs; +function parsePairKeyValue(entry) { + const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR); + if (valueProps.length <= 0) + return; + const keyPairPart = valueProps.shift(); + if (!keyPairPart) + return; + const separatorIndex = keyPairPart.indexOf(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR); + if (separatorIndex <= 0) + return; + const key = decodeURIComponent(keyPairPart.substring(0, separatorIndex).trim()); + const value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim()); + let metadata; + if (valueProps.length > 0) { + metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR)); } -}); - + return { key, value, metadata }; +} +exports.parsePairKeyValue = parsePairKeyValue; /** - * Namespace descriptor. - * @interface INamespace - * @property {Object.} [options] Namespace options - * @property {Object.} [nested] Nested object descriptors + * Parse a string serialized in the baggage HTTP Format (without metadata): + * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md */ +function parseKeyPairsIntoRecord(value) { + if (typeof value !== 'string' || value.length === 0) + return {}; + return value + .split(constants_1.BAGGAGE_ITEMS_SEPARATOR) + .map(entry => { + return parsePairKeyValue(entry); + }) + .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0) + .reduce((headers, keyPair) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + headers[keyPair.key] = keyPair.value; + return headers; + }, {}); +} +exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord; +//# sourceMappingURL=utils.js.map -/** - * Any extension field descriptor. - * @typedef AnyExtensionField - * @type {IExtensionField|IExtensionMapField} - */ +/***/ }), -/** - * Any nested object descriptor. - * @typedef AnyNestedObject - * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf} - */ +/***/ 54848: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AnchoredClock = void 0; /** - * Converts this namespace to a namespace descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {INamespace} Namespace descriptor + * A utility for returning wall times anchored to a given point in time. Wall time measurements will + * not be taken from the system, but instead are computed by adding a monotonic clock time + * to the anchor point. + * + * This is needed because the system time can change and result in unexpected situations like + * spans ending before they are started. Creating an anchored clock for each local root span + * ensures that span timings and durations are accurate while preventing span times from drifting + * too far from the system clock. + * + * Only creating an anchored clock once per local trace ensures span times are correct relative + * to each other. For example, a child span will never have a start time before its parent even + * if the system clock is corrected during the local trace. + * + * Heavily inspired by the OTel Java anchored clock + * https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/AnchoredClock.java */ -Namespace.prototype.toJSON = function toJSON(toJSONOptions) { - return util.toObject([ - "options" , this.options, - "nested" , arrayToJSON(this.nestedArray, toJSONOptions) - ]); -}; +class AnchoredClock { + /** + * Create a new AnchoredClock anchored to the current time returned by systemClock. + * + * @param systemClock should be a clock that returns the number of milliseconds since January 1 1970 such as Date + * @param monotonicClock should be a clock that counts milliseconds monotonically such as window.performance or perf_hooks.performance + */ + constructor(systemClock, monotonicClock) { + this._monotonicClock = monotonicClock; + this._epochMillis = systemClock.now(); + this._performanceMillis = monotonicClock.now(); + } + /** + * Returns the current time by adding the number of milliseconds since the + * AnchoredClock was created to the creation epoch time + */ + now() { + const delta = this._monotonicClock.now() - this._performanceMillis; + return this._epochMillis + delta; + } +} +exports.AnchoredClock = AnchoredClock; +//# sourceMappingURL=anchored-clock.js.map -/** - * Adds nested objects to this namespace from nested object descriptors. - * @param {Object.} nestedJson Any nested object descriptors - * @returns {Namespace} `this` +/***/ }), + +/***/ 82807: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Namespace.prototype.addJSON = function addJSON(nestedJson) { - var ns = this; - /* istanbul ignore else */ - if (nestedJson) { - for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) { - nested = nestedJson[names[i]]; - ns.add( // most to least likely - ( nested.fields !== undefined - ? Type.fromJSON - : nested.values !== undefined - ? Enum.fromJSON - : nested.methods !== undefined - ? Service.fromJSON - : nested.id !== undefined - ? Field.fromJSON - : Namespace.fromJSON )(names[i], nested) - ); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0; +const api_1 = __nccwpck_require__(65163); +function sanitizeAttributes(attributes) { + const out = {}; + if (typeof attributes !== 'object' || attributes == null) { + return out; + } + for (const [key, val] of Object.entries(attributes)) { + if (!isAttributeKey(key)) { + api_1.diag.warn(`Invalid attribute key: ${key}`); + continue; + } + if (!isAttributeValue(val)) { + api_1.diag.warn(`Invalid attribute value set for key: ${key}`); + continue; + } + if (Array.isArray(val)) { + out[key] = val.slice(); + } + else { + out[key] = val; } } - return this; -}; + return out; +} +exports.sanitizeAttributes = sanitizeAttributes; +function isAttributeKey(key) { + return typeof key === 'string' && key.length > 0; +} +exports.isAttributeKey = isAttributeKey; +function isAttributeValue(val) { + if (val == null) { + return true; + } + if (Array.isArray(val)) { + return isHomogeneousAttributeValueArray(val); + } + return isValidPrimitiveAttributeValue(val); +} +exports.isAttributeValue = isAttributeValue; +function isHomogeneousAttributeValueArray(arr) { + let type; + for (const element of arr) { + // null/undefined elements are allowed + if (element == null) + continue; + if (!type) { + if (isValidPrimitiveAttributeValue(element)) { + type = typeof element; + continue; + } + // encountered an invalid primitive + return false; + } + if (typeof element === type) { + continue; + } + return false; + } + return true; +} +function isValidPrimitiveAttributeValue(val) { + switch (typeof val) { + case 'number': + case 'boolean': + case 'string': + return true; + } + return false; +} +//# sourceMappingURL=attributes.js.map -/** - * Gets the nested object of the specified name. - * @param {string} name Nested object name - * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist - */ -Namespace.prototype.get = function get(name) { - return this.nested && this.nested[name] - || null; -}; +/***/ }), + +/***/ 69246: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.globalErrorHandler = exports.setGlobalErrorHandler = void 0; +const logging_error_handler_1 = __nccwpck_require__(32882); +/** The global error handler delegate */ +let delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)(); /** - * Gets the values of the nested {@link Enum|enum} of the specified name. - * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`. - * @param {string} name Nested enum name - * @returns {Object.} Enum values - * @throws {Error} If there is no such enum + * Set the global error handler + * @param {ErrorHandler} handler */ -Namespace.prototype.getEnum = function getEnum(name) { - if (this.nested && this.nested[name] instanceof Enum) - return this.nested[name].values; - throw Error("no such enum: " + name); -}; - +function setGlobalErrorHandler(handler) { + delegateHandler = handler; +} +exports.setGlobalErrorHandler = setGlobalErrorHandler; /** - * Adds a nested object to this namespace. - * @param {ReflectionObject} object Nested object to add - * @returns {Namespace} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a nested object with this name + * Return the global error handler + * @param {Exception} ex */ -Namespace.prototype.add = function add(object) { +function globalErrorHandler(ex) { + try { + delegateHandler(ex); + } + catch (_a) { } // eslint-disable-line no-empty +} +exports.globalErrorHandler = globalErrorHandler; +//# sourceMappingURL=global-error-handler.js.map - if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace)) - throw TypeError("object must be a valid nested object"); +/***/ }), - if (!this.nested) - this.nested = {}; - else { - var prev = this.get(object.name); - if (prev) { - if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) { - // replace plain namespace but keep existing nested elements and options - var nested = prev.nestedArray; - for (var i = 0; i < nested.length; ++i) - object.add(nested[i]); - this.remove(prev); - if (!this.nested) - this.nested = {}; - object.setOptions(prev.options, true); +/***/ 54986: +/***/ ((__unused_webpack_module, exports) => { - } else - throw Error("duplicate name '" + object.name + "' in " + this); - } - } - this.nested[object.name] = object; - object.onAdd(this); - return clearCache(this); -}; +"use strict"; -/** - * Removes a nested object from this namespace. - * @param {ReflectionObject} object Nested object to remove - * @returns {Namespace} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `object` is not a member of this namespace +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Namespace.prototype.remove = function remove(object) { +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.hexToBinary = void 0; +function intValue(charCode) { + // 0-9 + if (charCode >= 48 && charCode <= 57) { + return charCode - 48; + } + // a-f + if (charCode >= 97 && charCode <= 102) { + return charCode - 87; + } + // A-F + return charCode - 55; +} +function hexToBinary(hexStr) { + const buf = new Uint8Array(hexStr.length / 2); + let offset = 0; + for (let i = 0; i < hexStr.length; i += 2) { + const hi = intValue(hexStr.charCodeAt(i)); + const lo = intValue(hexStr.charCodeAt(i + 1)); + buf[offset++] = (hi << 4) | lo; + } + return buf; +} +exports.hexToBinary = hexToBinary; +//# sourceMappingURL=hex-to-binary.js.map - if (!(object instanceof ReflectionObject)) - throw TypeError("object must be a ReflectionObject"); - if (object.parent !== this) - throw Error(object + " is not a member of " + this); +/***/ }), - delete this.nested[object.name]; - if (!Object.keys(this.nested).length) - this.nested = undefined; +/***/ 32882: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - object.onRemove(this); - return clearCache(this); -}; +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.loggingErrorHandler = void 0; +const api_1 = __nccwpck_require__(65163); /** - * Defines additial namespaces within this one if not yet existing. - * @param {string|string[]} path Path to create - * @param {*} [json] Nested types to create from JSON - * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty + * Returns a function that logs an error using the provided logger, or a + * console logger if one was not provided. */ -Namespace.prototype.define = function define(path, json) { - - if (util.isString(path)) - path = path.split("."); - else if (!Array.isArray(path)) - throw TypeError("illegal path"); - if (path && path.length && path[0] === "") - throw Error("path must be relative"); - - var ptr = this; - while (path.length > 0) { - var part = path.shift(); - if (ptr.nested && ptr.nested[part]) { - ptr = ptr.nested[part]; - if (!(ptr instanceof Namespace)) - throw Error("path conflicts with non-namespace objects"); - } else - ptr.add(ptr = new Namespace(part)); - } - if (json) - ptr.addJSON(json); - return ptr; -}; - +function loggingErrorHandler() { + return (ex) => { + api_1.diag.error(stringifyException(ex)); + }; +} +exports.loggingErrorHandler = loggingErrorHandler; /** - * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. - * @returns {Namespace} `this` + * Converts an exception into a string representation + * @param {Exception} ex */ -Namespace.prototype.resolveAll = function resolveAll() { - var nested = this.nestedArray, i = 0; - while (i < nested.length) - if (nested[i] instanceof Namespace) - nested[i++].resolveAll(); - else - nested[i++].resolve(); - return this.resolve(); -}; - +function stringifyException(ex) { + if (typeof ex === 'string') { + return ex; + } + else { + return JSON.stringify(flattenException(ex)); + } +} /** - * Recursively looks up the reflection object matching the specified path in the scope of this namespace. - * @param {string|string[]} path Path to look up - * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc. - * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found + * Flattens an exception into key-value pairs by traversing the prototype chain + * and coercing values to strings. Duplicate properties will not be overwritten; + * the first insert wins. */ -Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) { - - /* istanbul ignore next */ - if (typeof filterTypes === "boolean") { - parentAlreadyChecked = filterTypes; - filterTypes = undefined; - } else if (filterTypes && !Array.isArray(filterTypes)) - filterTypes = [ filterTypes ]; - - if (util.isString(path) && path.length) { - if (path === ".") - return this.root; - path = path.split("."); - } else if (!path.length) - return this; - - // Start at root if path is absolute - if (path[0] === "") - return this.root.lookup(path.slice(1), filterTypes); +function flattenException(ex) { + const result = {}; + let current = ex; + while (current !== null) { + Object.getOwnPropertyNames(current).forEach(propertyName => { + if (result[propertyName]) + return; + const value = current[propertyName]; + if (value) { + result[propertyName] = String(value); + } + }); + current = Object.getPrototypeOf(current); + } + return result; +} +//# sourceMappingURL=logging-error-handler.js.map - // Test if the first part matches any nested object, and if so, traverse if path contains more - var found = this.get(path[0]); - if (found) { - if (path.length === 1) { - if (!filterTypes || filterTypes.indexOf(found.constructor) > -1) - return found; - } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true))) - return found; +/***/ }), - // Otherwise try each nested namespace - } else - for (var i = 0; i < this.nestedArray.length; ++i) - if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true))) - return found; +/***/ 86161: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // If there hasn't been a match, try again at the parent - if (this.parent === null || parentAlreadyChecked) - return null; - return this.parent.lookup(path, filterTypes); -}; +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.addHrTimes = exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = exports.getTimeOrigin = exports.millisToHrTime = void 0; +const platform_1 = __nccwpck_require__(6730); +const NANOSECOND_DIGITS = 9; +const NANOSECOND_DIGITS_IN_MILLIS = 6; +const MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS); +const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS); /** - * Looks up the reflection object at the specified path, relative to this namespace. - * @name NamespaceBase#lookup - * @function - * @param {string|string[]} path Path to look up - * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked - * @returns {ReflectionObject|null} Looked up object or `null` if none could be found - * @variation 2 + * Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]). + * @param epochMillis */ -// lookup(path: string, [parentAlreadyChecked: boolean]) - +function millisToHrTime(epochMillis) { + const epochSeconds = epochMillis / 1000; + // Decimals only. + const seconds = Math.trunc(epochSeconds); + // Round sub-nanosecond accuracy to nanosecond. + const nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS); + return [seconds, nanos]; +} +exports.millisToHrTime = millisToHrTime; +function getTimeOrigin() { + let timeOrigin = platform_1.otperformance.timeOrigin; + if (typeof timeOrigin !== 'number') { + const perf = platform_1.otperformance; + timeOrigin = perf.timing && perf.timing.fetchStart; + } + return timeOrigin; +} +exports.getTimeOrigin = getTimeOrigin; /** - * Looks up the {@link Type|type} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Type} Looked up type - * @throws {Error} If `path` does not point to a type + * Returns an hrtime calculated via performance component. + * @param performanceNow */ -Namespace.prototype.lookupType = function lookupType(path) { - var found = this.lookup(path, [ Type ]); - if (!found) - throw Error("no such type: " + path); - return found; -}; - +function hrTime(performanceNow) { + const timeOrigin = millisToHrTime(getTimeOrigin()); + const now = millisToHrTime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now()); + return addHrTimes(timeOrigin, now); +} +exports.hrTime = hrTime; /** - * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Enum} Looked up enum - * @throws {Error} If `path` does not point to an enum + * + * Converts a TimeInput to an HrTime, defaults to _hrtime(). + * @param time */ -Namespace.prototype.lookupEnum = function lookupEnum(path) { - var found = this.lookup(path, [ Enum ]); - if (!found) - throw Error("no such Enum '" + path + "' in " + this); - return found; -}; - +function timeInputToHrTime(time) { + // process.hrtime + if (isTimeInputHrTime(time)) { + return time; + } + else if (typeof time === 'number') { + // Must be a performance.now() if it's smaller than process start time. + if (time < getTimeOrigin()) { + return hrTime(time); + } + else { + // epoch milliseconds or performance.timeOrigin + return millisToHrTime(time); + } + } + else if (time instanceof Date) { + return millisToHrTime(time.getTime()); + } + else { + throw TypeError('Invalid input type'); + } +} +exports.timeInputToHrTime = timeInputToHrTime; /** - * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Type} Looked up type or enum - * @throws {Error} If `path` does not point to a type or enum + * Returns a duration of two hrTime. + * @param startTime + * @param endTime */ -Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) { - var found = this.lookup(path, [ Type, Enum ]); - if (!found) - throw Error("no such Type or Enum '" + path + "' in " + this); - return found; -}; - +function hrTimeDuration(startTime, endTime) { + let seconds = endTime[0] - startTime[0]; + let nanos = endTime[1] - startTime[1]; + // overflow + if (nanos < 0) { + seconds -= 1; + // negate + nanos += SECOND_TO_NANOSECONDS; + } + return [seconds, nanos]; +} +exports.hrTimeDuration = hrTimeDuration; /** - * Looks up the {@link Service|service} at the specified path, relative to this namespace. - * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. - * @param {string|string[]} path Path to look up - * @returns {Service} Looked up service - * @throws {Error} If `path` does not point to a service + * Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z" + * @param time */ -Namespace.prototype.lookupService = function lookupService(path) { - var found = this.lookup(path, [ Service ]); - if (!found) - throw Error("no such Service '" + path + "' in " + this); - return found; -}; +function hrTimeToTimeStamp(time) { + const precision = NANOSECOND_DIGITS; + const tmp = `${'0'.repeat(precision)}${time[1]}Z`; + const nanoString = tmp.substr(tmp.length - precision - 1); + const date = new Date(time[0] * 1000).toISOString(); + return date.replace('000Z', nanoString); +} +exports.hrTimeToTimeStamp = hrTimeToTimeStamp; +/** + * Convert hrTime to nanoseconds. + * @param time + */ +function hrTimeToNanoseconds(time) { + return time[0] * SECOND_TO_NANOSECONDS + time[1]; +} +exports.hrTimeToNanoseconds = hrTimeToNanoseconds; +/** + * Convert hrTime to milliseconds. + * @param time + */ +function hrTimeToMilliseconds(time) { + return time[0] * 1e3 + time[1] / 1e6; +} +exports.hrTimeToMilliseconds = hrTimeToMilliseconds; +/** + * Convert hrTime to microseconds. + * @param time + */ +function hrTimeToMicroseconds(time) { + return time[0] * 1e6 + time[1] / 1e3; +} +exports.hrTimeToMicroseconds = hrTimeToMicroseconds; +/** + * check if time is HrTime + * @param value + */ +function isTimeInputHrTime(value) { + return (Array.isArray(value) && + value.length === 2 && + typeof value[0] === 'number' && + typeof value[1] === 'number'); +} +exports.isTimeInputHrTime = isTimeInputHrTime; +/** + * check if input value is a correct types.TimeInput + * @param value + */ +function isTimeInput(value) { + return (isTimeInputHrTime(value) || + typeof value === 'number' || + value instanceof Date); +} +exports.isTimeInput = isTimeInput; +/** + * Given 2 HrTime formatted times, return their sum as an HrTime. + */ +function addHrTimes(time1, time2) { + const out = [time1[0] + time2[0], time1[1] + time2[1]]; + // Nanoseconds + if (out[1] >= SECOND_TO_NANOSECONDS) { + out[1] -= SECOND_TO_NANOSECONDS; + out[0] += 1; + } + return out; +} +exports.addHrTimes = addHrTimes; +//# sourceMappingURL=time.js.map -// Sets up cyclic dependencies (called in index-light) -Namespace._configure = function(Type_, Service_, Enum_) { - Type = Type_; - Service = Service_; - Enum = Enum_; -}; +/***/ }), + +/***/ 27342: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=types.js.map /***/ }), -/***/ 96070: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 89736: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -module.exports = ReflectionObject; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.internal = exports.baggageUtils = void 0; +__exportStar(__nccwpck_require__(61476), exports); +__exportStar(__nccwpck_require__(54848), exports); +__exportStar(__nccwpck_require__(82807), exports); +__exportStar(__nccwpck_require__(69246), exports); +__exportStar(__nccwpck_require__(32882), exports); +__exportStar(__nccwpck_require__(86161), exports); +__exportStar(__nccwpck_require__(27342), exports); +__exportStar(__nccwpck_require__(54986), exports); +__exportStar(__nccwpck_require__(67959), exports); +exports.baggageUtils = __nccwpck_require__(49884); +__exportStar(__nccwpck_require__(6730), exports); +__exportStar(__nccwpck_require__(57785), exports); +__exportStar(__nccwpck_require__(61463), exports); +__exportStar(__nccwpck_require__(231), exports); +__exportStar(__nccwpck_require__(52992), exports); +__exportStar(__nccwpck_require__(16478), exports); +__exportStar(__nccwpck_require__(88317), exports); +__exportStar(__nccwpck_require__(15136), exports); +__exportStar(__nccwpck_require__(69326), exports); +__exportStar(__nccwpck_require__(54463), exports); +__exportStar(__nccwpck_require__(1914), exports); +__exportStar(__nccwpck_require__(7238), exports); +__exportStar(__nccwpck_require__(65387), exports); +__exportStar(__nccwpck_require__(28289), exports); +__exportStar(__nccwpck_require__(48400), exports); +__exportStar(__nccwpck_require__(90839), exports); +__exportStar(__nccwpck_require__(67226), exports); +__exportStar(__nccwpck_require__(12408), exports); +__exportStar(__nccwpck_require__(55687), exports); +const exporter_1 = __nccwpck_require__(87795); +exports.internal = { + _export: exporter_1._export, +}; +//# sourceMappingURL=index.js.map -ReflectionObject.className = "ReflectionObject"; +/***/ }), -var util = __nccwpck_require__(93492); +/***/ 87795: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var Root; // cyclic +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports._export = void 0; +const api_1 = __nccwpck_require__(65163); +const suppress_tracing_1 = __nccwpck_require__(54463); /** - * Constructs a new reflection object instance. - * @classdesc Base class of all reflection objects. - * @constructor - * @param {string} name Object name - * @param {Object.} [options] Declared options - * @abstract + * @internal + * Shared functionality used by Exporters while exporting data, including suppression of Traces. */ -function ReflectionObject(name, options) { +function _export(exporter, arg) { + return new Promise(resolve => { + // prevent downstream exporter calls from generating spans + api_1.context.with((0, suppress_tracing_1.suppressTracing)(api_1.context.active()), () => { + exporter.export(arg, (result) => { + resolve(result); + }); + }); + }); +} +exports._export = _export; +//# sourceMappingURL=exporter.js.map - if (!util.isString(name)) - throw TypeError("name must be a string"); +/***/ }), - if (options && !util.isObject(options)) - throw TypeError("options must be an object"); +/***/ 96242: +/***/ ((__unused_webpack_module, exports) => { - /** - * Options. - * @type {Object.|undefined} - */ - this.options = options; // toJSON +"use strict"; - /** - * Parsed Options. - * @type {Array.>|undefined} - */ - this.parsedOptions = null; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.validateValue = exports.validateKey = void 0; +const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; +const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; +const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; +const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); +const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; +const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; +/** + * Key is opaque string up to 256 characters printable. It MUST begin with a + * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, + * underscores _, dashes -, asterisks *, and forward slashes /. + * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the + * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. + * see https://www.w3.org/TR/trace-context/#key + */ +function validateKey(key) { + return VALID_KEY_REGEX.test(key); +} +exports.validateKey = validateKey; +/** + * Value is opaque string up to 256 characters printable ASCII RFC0020 + * characters (i.e., the range 0x20 to 0x7E) except comma , and =. + */ +function validateValue(value) { + return (VALID_VALUE_BASE_REGEX.test(value) && + !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); +} +exports.validateValue = validateValue; +//# sourceMappingURL=validators.js.map - /** - * Unique name within its namespace. - * @type {string} - */ - this.name = name; +/***/ }), - /** - * Parent namespace. - * @type {Namespace|null} - */ - this.parent = null; +/***/ 6730: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - /** - * Whether already resolved or not. - * @type {boolean} - */ - this.resolved = false; - - /** - * Comment text, if any. - * @type {string|null} - */ - this.comment = null; - - /** - * Defining file name. - * @type {string|null} - */ - this.filename = null; -} - -Object.defineProperties(ReflectionObject.prototype, { - - /** - * Reference to the root namespace. - * @name ReflectionObject#root - * @type {Root} - * @readonly - */ - root: { - get: function() { - var ptr = this; - while (ptr.parent !== null) - ptr = ptr.parent; - return ptr; - } - }, - - /** - * Full name including leading dot. - * @name ReflectionObject#fullName - * @type {string} - * @readonly - */ - fullName: { - get: function() { - var path = [ this.name ], - ptr = this.parent; - while (ptr) { - path.unshift(ptr.name); - ptr = ptr.parent; - } - return path.join("."); - } - } -}); +"use strict"; -/** - * Converts this reflection object to its descriptor representation. - * @returns {Object.} Descriptor - * @abstract - */ -ReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() { - throw Error(); // not implemented, shouldn't happen +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; - -/** - * Called when this object is added to a parent. - * @param {ReflectionObject} parent Parent added to - * @returns {undefined} +Object.defineProperty(exports, "__esModule", ({ value: true })); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -ReflectionObject.prototype.onAdd = function onAdd(parent) { - if (this.parent && this.parent !== parent) - this.parent.remove(this); - this.parent = parent; - this.resolved = false; - var root = parent.root; - if (root instanceof Root) - root._handleAdd(this); -}; +__exportStar(__nccwpck_require__(9340), exports); +//# sourceMappingURL=index.js.map -/** - * Called when this object is removed from a parent. - * @param {ReflectionObject} parent Parent removed from - * @returns {undefined} - */ -ReflectionObject.prototype.onRemove = function onRemove(parent) { - var root = parent.root; - if (root instanceof Root) - root._handleRemove(this); - this.parent = null; - this.resolved = false; -}; +/***/ }), -/** - * Resolves this objects type references. - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.resolve = function resolve() { - if (this.resolved) - return this; - if (this.root instanceof Root) - this.resolved = true; // only if part of a root - return this; -}; +/***/ 25476: +/***/ ((__unused_webpack_module, exports) => { -/** - * Gets an option value. - * @param {string} name Option name - * @returns {*} Option value or `undefined` if not set - */ -ReflectionObject.prototype.getOption = function getOption(name) { - if (this.options) - return this.options[name]; - return undefined; -}; +"use strict"; -/** - * Sets an option. - * @param {string} name Option name - * @param {*} value Option value - * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set - * @returns {ReflectionObject} `this` +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) { - if (!ifNotSet || !this.options || this.options[name] === undefined) - (this.options || (this.options = {}))[name] = value; - return this; -}; - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RandomIdGenerator = void 0; +const SPAN_ID_BYTES = 8; +const TRACE_ID_BYTES = 16; /** - * Sets a parsed option. - * @param {string} name parsed Option name - * @param {*} value Option value - * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value - * @returns {ReflectionObject} `this` + * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead. */ -ReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) { - if (!this.parsedOptions) { - this.parsedOptions = []; +class RandomIdGenerator { + constructor() { + /** + * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex + * characters corresponding to 128 bits. + */ + this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); + /** + * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex + * characters corresponding to 64 bits. + */ + this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); } - var parsedOptions = this.parsedOptions; - if (propName) { - // If setting a sub property of an option then try to merge it - // with an existing option - var opt = parsedOptions.find(function (opt) { - return Object.prototype.hasOwnProperty.call(opt, name); - }); - if (opt) { - // If we found an existing option - just merge the property value - var newValue = opt[name]; - util.setProperty(newValue, propName, value); - } else { - // otherwise, create a new option, set it's property and add it to the list - opt = {}; - opt[name] = util.setProperty({}, propName, value); - parsedOptions.push(opt); +} +exports.RandomIdGenerator = RandomIdGenerator; +const SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); +function getIdGenerator(bytes) { + return function generateId() { + for (let i = 0; i < bytes / 4; i++) { + // unsigned right shift drops decimal part of the number + // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE + SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4); } - } else { - // Always create a new option when setting the value of the option itself - var newOpt = {}; - newOpt[name] = value; - parsedOptions.push(newOpt); - } - return this; -}; + // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated + for (let i = 0; i < bytes; i++) { + if (SHARED_BUFFER[i] > 0) { + break; + } + else if (i === bytes - 1) { + SHARED_BUFFER[bytes - 1] = 1; + } + } + return SHARED_BUFFER.toString('hex', 0, bytes); + }; +} +//# sourceMappingURL=RandomIdGenerator.js.map -/** - * Sets multiple options. - * @param {Object.} options Options to set - * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set - * @returns {ReflectionObject} `this` - */ -ReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) { - if (options) - for (var keys = Object.keys(options), i = 0; i < keys.length; ++i) - this.setOption(keys[i], options[keys[i]], ifNotSet); - return this; -}; +/***/ }), -/** - * Converts this instance to its string representation. - * @returns {string} Class name[, space, full name] - */ -ReflectionObject.prototype.toString = function toString() { - var className = this.constructor.className, - fullName = this.fullName; - if (fullName.length) - return className + " " + fullName; - return className; -}; +/***/ 76494: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// Sets up cyclic dependencies (called in index-light) -ReflectionObject._configure = function(Root_) { - Root = Root_; -}; +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEnvWithoutDefaults = exports.getEnv = void 0; +const environment_1 = __nccwpck_require__(7238); +/** + * Gets the environment variables + */ +function getEnv() { + const processEnv = (0, environment_1.parseEnvironment)(process.env); + return Object.assign({}, environment_1.DEFAULT_ENVIRONMENT, processEnv); +} +exports.getEnv = getEnv; +function getEnvWithoutDefaults() { + return (0, environment_1.parseEnvironment)(process.env); +} +exports.getEnvWithoutDefaults = getEnvWithoutDefaults; +//# sourceMappingURL=environment.js.map /***/ }), -/***/ 51895: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 57196: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = OneOf; - -// extends ReflectionObject -var ReflectionObject = __nccwpck_require__(96070); -((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf"; - -var Field = __nccwpck_require__(20577), - util = __nccwpck_require__(93492); - -/** - * Constructs a new oneof instance. - * @classdesc Reflected oneof. - * @extends ReflectionObject - * @constructor - * @param {string} name Oneof name - * @param {string[]|Object.} [fieldNames] Field names - * @param {Object.} [options] Declared options - * @param {string} [comment] Comment associated with this field +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -function OneOf(name, fieldNames, options, comment) { - if (!Array.isArray(fieldNames)) { - options = fieldNames; - fieldNames = undefined; - } - ReflectionObject.call(this, name, options); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports._globalThis = void 0; +/** only globals that common to node and browsers are allowed */ +// eslint-disable-next-line node/no-unsupported-features/es-builtins +exports._globalThis = typeof globalThis === 'object' ? globalThis : global; +//# sourceMappingURL=globalThis.js.map - /* istanbul ignore if */ - if (!(fieldNames === undefined || Array.isArray(fieldNames))) - throw TypeError("fieldNames must be an Array"); +/***/ }), - /** - * Field names that belong to this oneof. - * @type {string[]} - */ - this.oneof = fieldNames || []; // toJSON, marker +/***/ 75004: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * Fields that belong to this oneof as an array for iteration. - * @type {Field[]} - * @readonly - */ - this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent +"use strict"; - /** - * Comment for this field. - * @type {string|null} - */ - this.comment = comment; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.hexToBase64 = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const hex_to_binary_1 = __nccwpck_require__(54986); +function hexToBase64(hexStr) { + return Buffer.from((0, hex_to_binary_1.hexToBinary)(hexStr)).toString('base64'); } +exports.hexToBase64 = hexToBase64; +//# sourceMappingURL=hex-to-base64.js.map -/** - * Oneof descriptor. - * @interface IOneOf - * @property {Array.} oneof Oneof field names - * @property {Object.} [options] Oneof options - */ +/***/ }), -/** - * Constructs a oneof from a oneof descriptor. - * @param {string} name Oneof name - * @param {IOneOf} json Oneof descriptor - * @returns {OneOf} Created oneof - * @throws {TypeError} If arguments are invalid - */ -OneOf.fromJSON = function fromJSON(name, json) { - return new OneOf(name, json.oneof, json.options, json.comment); -}; +/***/ 9340: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -/** - * Converts this oneof to a oneof descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IOneOf} Oneof descriptor - */ -OneOf.prototype.toJSON = function toJSON(toJSONOptions) { - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "options" , this.options, - "oneof" , this.oneof, - "comment" , keepComments ? this.comment : undefined - ]); -}; +"use strict"; -/** - * Adds the fields of the specified oneof to the parent if not already done so. - * @param {OneOf} oneof The oneof - * @returns {undefined} - * @inner - * @ignore +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -function addFieldsToParent(oneof) { - if (oneof.parent) - for (var i = 0; i < oneof.fieldsArray.length; ++i) - if (!oneof.fieldsArray[i].parent) - oneof.parent.add(oneof.fieldsArray[i]); -} +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEnv = exports.getEnvWithoutDefaults = void 0; +var environment_1 = __nccwpck_require__(76494); +Object.defineProperty(exports, "getEnvWithoutDefaults", ({ enumerable: true, get: function () { return environment_1.getEnvWithoutDefaults; } })); +Object.defineProperty(exports, "getEnv", ({ enumerable: true, get: function () { return environment_1.getEnv; } })); +__exportStar(__nccwpck_require__(57196), exports); +__exportStar(__nccwpck_require__(75004), exports); +__exportStar(__nccwpck_require__(25476), exports); +__exportStar(__nccwpck_require__(39338), exports); +__exportStar(__nccwpck_require__(10265), exports); +__exportStar(__nccwpck_require__(51027), exports); +//# sourceMappingURL=index.js.map -/** - * Adds a field to this oneof and removes it from its current parent, if any. - * @param {Field} field Field to add - * @returns {OneOf} `this` - */ -OneOf.prototype.add = function add(field) { +/***/ }), - /* istanbul ignore if */ - if (!(field instanceof Field)) - throw TypeError("field must be a Field"); +/***/ 39338: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (field.parent && field.parent !== this.parent) - field.parent.remove(field); - this.oneof.push(field.name); - this.fieldsArray.push(field); - field.partOf = this; // field.parent remains null - addFieldsToParent(this); - return this; -}; +"use strict"; -/** - * Removes a field from this oneof and puts it back to the oneof's parent. - * @param {Field} field Field to remove - * @returns {OneOf} `this` +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -OneOf.prototype.remove = function remove(field) { +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.otperformance = void 0; +const perf_hooks_1 = __nccwpck_require__(4074); +exports.otperformance = perf_hooks_1.performance; +//# sourceMappingURL=performance.js.map - /* istanbul ignore if */ - if (!(field instanceof Field)) - throw TypeError("field must be a Field"); +/***/ }), - var index = this.fieldsArray.indexOf(field); +/***/ 10265: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /* istanbul ignore if */ - if (index < 0) - throw Error(field + " is not a member of " + this); +"use strict"; - this.fieldsArray.splice(index, 1); - index = this.oneof.indexOf(field.name); - - /* istanbul ignore else */ - if (index > -1) // theoretical - this.oneof.splice(index, 1); - - field.partOf = null; - return this; -}; - -/** - * @override +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -OneOf.prototype.onAdd = function onAdd(parent) { - ReflectionObject.prototype.onAdd.call(this, parent); - var self = this; - // Collect present fields - for (var i = 0; i < this.oneof.length; ++i) { - var field = parent.get(this.oneof[i]); - if (field && !field.partOf) { - field.partOf = self; - self.fieldsArray.push(field); - } - } - // Add not yet present fields - addFieldsToParent(this); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SDK_INFO = void 0; +const version_1 = __nccwpck_require__(55687); +const semantic_conventions_1 = __nccwpck_require__(67275); +/** Constants describing the SDK in use */ +exports.SDK_INFO = { + [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry', + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node', + [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS, + [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION, }; +//# sourceMappingURL=sdk-info.js.map -/** - * @override - */ -OneOf.prototype.onRemove = function onRemove(parent) { - for (var i = 0, field; i < this.fieldsArray.length; ++i) - if ((field = this.fieldsArray[i]).parent) - field.parent.remove(field); - ReflectionObject.prototype.onRemove.call(this, parent); -}; +/***/ }), -/** - * Decorator function as returned by {@link OneOf.d} (TypeScript). - * @typedef OneOfDecorator - * @type {function} - * @param {Object} prototype Target prototype - * @param {string} oneofName OneOf name - * @returns {undefined} - */ +/***/ 51027: +/***/ ((__unused_webpack_module, exports) => { -/** - * OneOf decorator (TypeScript). - * @function - * @param {...string} fieldNames Field names - * @returns {OneOfDecorator} Decorator function - * @template T extends string - */ -OneOf.d = function decorateOneOf() { - var fieldNames = new Array(arguments.length), - index = 0; - while (index < arguments.length) - fieldNames[index] = arguments[index++]; - return function oneOfDecorator(prototype, oneofName) { - util.decorateType(prototype.constructor) - .add(new OneOf(oneofName, fieldNames)); - Object.defineProperty(prototype, oneofName, { - get: util.oneOfGetter(fieldNames), - set: util.oneOfSetter(fieldNames) - }); - }; -}; +"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.unrefTimer = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +function unrefTimer(timer) { + timer.unref(); +} +exports.unrefTimer = unrefTimer; +//# sourceMappingURL=timer-util.js.map /***/ }), -/***/ 19511: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 57785: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = parse; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CompositePropagator = void 0; +const api_1 = __nccwpck_require__(65163); +/** Combines multiple propagators into a single propagator. */ +class CompositePropagator { + /** + * Construct a composite propagator from a list of propagators. + * + * @param [config] Configuration object for composite propagator + */ + constructor(config = {}) { + var _a; + this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : []; + this._fields = Array.from(new Set(this._propagators + // older propagators may not have fields function, null check to be sure + .map(p => (typeof p.fields === 'function' ? p.fields() : [])) + .reduce((x, y) => x.concat(y), []))); + } + /** + * Run each of the configured propagators with the given context and carrier. + * Propagators are run in the order they are configured, so if multiple + * propagators write the same carrier key, the propagator later in the list + * will "win". + * + * @param context Context to inject + * @param carrier Carrier into which context will be injected + */ + inject(context, carrier, setter) { + for (const propagator of this._propagators) { + try { + propagator.inject(context, carrier, setter); + } + catch (err) { + api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); + } + } + } + /** + * Run each of the configured propagators with the given context and carrier. + * Propagators are run in the order they are configured, so if multiple + * propagators write the same context key, the propagator later in the list + * will "win". + * + * @param context Context to add values to + * @param carrier Carrier from which to extract context + */ + extract(context, carrier, getter) { + return this._propagators.reduce((ctx, propagator) => { + try { + return propagator.extract(ctx, carrier, getter); + } + catch (err) { + api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); + } + return ctx; + }, context); + } + fields() { + // return a new array so our fields cannot be modified + return this._fields.slice(); + } +} +exports.CompositePropagator = CompositePropagator; +//# sourceMappingURL=composite.js.map -parse.filename = null; -parse.defaults = { keepCase: false }; +/***/ }), -var tokenize = __nccwpck_require__(68857), - Root = __nccwpck_require__(38372), - Type = __nccwpck_require__(26301), - Field = __nccwpck_require__(20577), - MapField = __nccwpck_require__(86663), - OneOf = __nccwpck_require__(51895), - Enum = __nccwpck_require__(94299), - Service = __nccwpck_require__(86269), - Method = __nccwpck_require__(86814), - types = __nccwpck_require__(98887), - util = __nccwpck_require__(93492); +/***/ 231: +/***/ ((__unused_webpack_module, exports) => { -var base10Re = /^[1-9][0-9]*$/, - base10NegRe = /^-?[1-9][0-9]*$/, - base16Re = /^0[x][0-9a-fA-F]+$/, - base16NegRe = /^-?0[x][0-9a-fA-F]+$/, - base8Re = /^0[0-7]+$/, - base8NegRe = /^-?0[0-7]+$/, - numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, - nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/, - typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/, - fqTypeRefRe = /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/; +"use strict"; -/** - * Result object returned from {@link parse}. - * @interface IParserResult - * @property {string|undefined} package Package name, if declared - * @property {string[]|undefined} imports Imports, if any - * @property {string[]|undefined} weakImports Weak imports, if any - * @property {string|undefined} syntax Syntax, if specified (either `"proto2"` or `"proto3"`) - * @property {Root} root Populated root instance +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=IdGenerator.js.map -/** - * Options modifying the behavior of {@link parse}. - * @interface IParseOptions - * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case - * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments. - * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist. - */ +/***/ }), -/** - * Options modifying the behavior of JSON serialization. - * @interface IToJSONOptions - * @property {boolean} [keepComments=false] Serializes comments. - */ +/***/ 1914: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TraceState = void 0; +const validators_1 = __nccwpck_require__(96242); +const MAX_TRACE_STATE_ITEMS = 32; +const MAX_TRACE_STATE_LEN = 512; +const LIST_MEMBERS_SEPARATOR = ','; +const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; /** - * Parses the given .proto source and returns an object with the parsed contents. - * @param {string} source Source contents - * @param {Root} root Root to populate - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {IParserResult} Parser result - * @property {string} filename=null Currently processing file name for error reporting, if known - * @property {IParseOptions} defaults Default {@link IParseOptions} + * TraceState must be a class and not a simple object type because of the spec + * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). + * + * Here is the list of allowed mutations: + * - New key-value pair should be added into the beginning of the list + * - The value of any key can be updated. Modified keys MUST be moved to the + * beginning of the list. */ -function parse(source, root, options) { - /* eslint-disable callback-return */ - if (!(root instanceof Root)) { - options = root; - root = new Root(); +class TraceState { + constructor(rawTraceState) { + this._internalState = new Map(); + if (rawTraceState) + this._parse(rawTraceState); } - if (!options) - options = parse.defaults; - - var preferTrailingComment = options.preferTrailingComment || false; - var tn = tokenize(source, options.alternateCommentMode || false), - next = tn.next, - push = tn.push, - peek = tn.peek, - skip = tn.skip, - cmnt = tn.cmnt; - - var head = true, - pkg, - imports, - weakImports, - syntax, - isProto3 = false; - - var ptr = root; - - var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase; - - /* istanbul ignore next */ - function illegal(token, name, insideTryCatch) { - var filename = parse.filename; - if (!insideTryCatch) - parse.filename = null; - return Error("illegal " + (name || "token") + " '" + token + "' (" + (filename ? filename + ", " : "") + "line " + tn.line + ")"); + set(key, value) { + // TODO: Benchmark the different approaches(map vs list) and + // use the faster one. + const traceState = this._clone(); + if (traceState._internalState.has(key)) { + traceState._internalState.delete(key); + } + traceState._internalState.set(key, value); + return traceState; } - - function readString() { - var values = [], - token; - do { - /* istanbul ignore if */ - if ((token = next()) !== "\"" && token !== "'") - throw illegal(token); - - values.push(next()); - skip(token); - token = peek(); - } while (token === "\"" || token === "'"); - return values.join(""); + unset(key) { + const traceState = this._clone(); + traceState._internalState.delete(key); + return traceState; } - - function readValue(acceptTypeRef) { - var token = next(); - switch (token) { - case "'": - case "\"": - push(token); - return readString(); - case "true": case "TRUE": - return true; - case "false": case "FALSE": - return false; - } - try { - return parseNumber(token, /* insideTryCatch */ true); - } catch (e) { - - /* istanbul ignore else */ - if (acceptTypeRef && typeRefRe.test(token)) - return token; - - /* istanbul ignore next */ - throw illegal(token, "value"); - } + get(key) { + return this._internalState.get(key); } - - function readRanges(target, acceptStrings) { - var token, start; - do { - if (acceptStrings && ((token = peek()) === "\"" || token === "'")) - target.push(readString()); - else - target.push([ start = parseId(next()), skip("to", true) ? parseId(next()) : start ]); - } while (skip(",", true)); - skip(";"); + serialize() { + return this._keys() + .reduce((agg, key) => { + agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); + return agg; + }, []) + .join(LIST_MEMBERS_SEPARATOR); } - - function parseNumber(token, insideTryCatch) { - var sign = 1; - if (token.charAt(0) === "-") { - sign = -1; - token = token.substring(1); - } - switch (token) { - case "inf": case "INF": case "Inf": - return sign * Infinity; - case "nan": case "NAN": case "Nan": case "NaN": - return NaN; - case "0": - return 0; + _parse(rawTraceState) { + if (rawTraceState.length > MAX_TRACE_STATE_LEN) + return; + this._internalState = rawTraceState + .split(LIST_MEMBERS_SEPARATOR) + .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning + .reduce((agg, part) => { + const listMember = part.trim(); // Optional Whitespace (OWS) handling + const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); + if (i !== -1) { + const key = listMember.slice(0, i); + const value = listMember.slice(i + 1, part.length); + if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) { + agg.set(key, value); + } + else { + // TODO: Consider to add warning log + } + } + return agg; + }, new Map()); + // Because of the reverse() requirement, trunc must be done after map is created + if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { + this._internalState = new Map(Array.from(this._internalState.entries()) + .reverse() // Use reverse same as original tracestate parse chain + .slice(0, MAX_TRACE_STATE_ITEMS)); } - if (base10Re.test(token)) - return sign * parseInt(token, 10); - if (base16Re.test(token)) - return sign * parseInt(token, 16); - if (base8Re.test(token)) - return sign * parseInt(token, 8); - - /* istanbul ignore else */ - if (numberRe.test(token)) - return sign * parseFloat(token); - - /* istanbul ignore next */ - throw illegal(token, "number", insideTryCatch); } - - function parseId(token, acceptNegative) { - switch (token) { - case "max": case "MAX": case "Max": - return 536870911; - case "0": - return 0; - } - - /* istanbul ignore if */ - if (!acceptNegative && token.charAt(0) === "-") - throw illegal(token, "id"); - - if (base10NegRe.test(token)) - return parseInt(token, 10); - if (base16NegRe.test(token)) - return parseInt(token, 16); - - /* istanbul ignore else */ - if (base8NegRe.test(token)) - return parseInt(token, 8); - - /* istanbul ignore next */ - throw illegal(token, "id"); + _keys() { + return Array.from(this._internalState.keys()).reverse(); } + _clone() { + const traceState = new TraceState(); + traceState._internalState = new Map(this._internalState); + return traceState; + } +} +exports.TraceState = TraceState; +//# sourceMappingURL=TraceState.js.map - function parsePackage() { - - /* istanbul ignore if */ - if (pkg !== undefined) - throw illegal("package"); - - pkg = next(); +/***/ }), - /* istanbul ignore if */ - if (!typeRefRe.test(pkg)) - throw illegal(pkg, "name"); +/***/ 61463: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - ptr = ptr.define(pkg); - skip(";"); - } +"use strict"; - function parseImport() { - var token = peek(); - var whichImports; - switch (token) { - case "weak": - whichImports = weakImports || (weakImports = []); - next(); - break; - case "public": - next(); - // eslint-disable-next-line no-fallthrough - default: - whichImports = imports || (imports = []); - break; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0; +const api_1 = __nccwpck_require__(65163); +const suppress_tracing_1 = __nccwpck_require__(54463); +const TraceState_1 = __nccwpck_require__(1914); +exports.TRACE_PARENT_HEADER = 'traceparent'; +exports.TRACE_STATE_HEADER = 'tracestate'; +const VERSION = '00'; +const VERSION_PART = '(?!ff)[\\da-f]{2}'; +const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}'; +const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}'; +const FLAGS_PART = '[\\da-f]{2}'; +const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`); +/** + * Parses information from the [traceparent] span tag and converts it into {@link SpanContext} + * @param traceParent - A meta property that comes from server. + * It should be dynamically generated server side to have the server's request trace Id, + * a parent span Id that was set on the server's request span, + * and the trace flags to indicate the server's sampling decision + * (01 = sampled, 00 = not sampled). + * for example: '{version}-{traceId}-{spanId}-{sampleDecision}' + * For more information see {@link https://www.w3.org/TR/trace-context/} + */ +function parseTraceParent(traceParent) { + const match = TRACE_PARENT_REGEX.exec(traceParent); + if (!match) + return null; + // According to the specification the implementation should be compatible + // with future versions. If there are more parts, we only reject it if it's using version 00 + // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent + if (match[1] === '00' && match[5]) + return null; + return { + traceId: match[2], + spanId: match[3], + traceFlags: parseInt(match[4], 16), + }; +} +exports.parseTraceParent = parseTraceParent; +/** + * Propagates {@link SpanContext} through Trace Context format propagation. + * + * Based on the Trace Context specification: + * https://www.w3.org/TR/trace-context/ + */ +class W3CTraceContextPropagator { + inject(context, carrier, setter) { + const spanContext = api_1.trace.getSpanContext(context); + if (!spanContext || + (0, suppress_tracing_1.isTracingSuppressed)(context) || + !(0, api_1.isSpanContextValid)(spanContext)) + return; + const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`; + setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent); + if (spanContext.traceState) { + setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize()); } - token = readString(); - skip(";"); - whichImports.push(token); } + extract(context, carrier, getter) { + const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER); + if (!traceParentHeader) + return context; + const traceParent = Array.isArray(traceParentHeader) + ? traceParentHeader[0] + : traceParentHeader; + if (typeof traceParent !== 'string') + return context; + const spanContext = parseTraceParent(traceParent); + if (!spanContext) + return context; + spanContext.isRemote = true; + const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER); + if (traceStateHeader) { + // If more than one `tracestate` header is found, we merge them into a + // single header. + const state = Array.isArray(traceStateHeader) + ? traceStateHeader.join(',') + : traceStateHeader; + spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined); + } + return api_1.trace.setSpanContext(context, spanContext); + } + fields() { + return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER]; + } +} +exports.W3CTraceContextPropagator = W3CTraceContextPropagator; +//# sourceMappingURL=W3CTraceContextPropagator.js.map - function parseSyntax() { - skip("="); - syntax = readString(); - isProto3 = syntax === "proto3"; - - /* istanbul ignore if */ - if (!isProto3 && syntax !== "proto2") - throw illegal(syntax, "syntax"); +/***/ }), - skip(";"); - } +/***/ 52992: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - function parseCommon(parent, token) { - switch (token) { +"use strict"; - case "option": - parseOption(parent, token); - skip(";"); - return true; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0; +const api_1 = __nccwpck_require__(65163); +const RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA'); +var RPCType; +(function (RPCType) { + RPCType["HTTP"] = "http"; +})(RPCType = exports.RPCType || (exports.RPCType = {})); +function setRPCMetadata(context, meta) { + return context.setValue(RPC_METADATA_KEY, meta); +} +exports.setRPCMetadata = setRPCMetadata; +function deleteRPCMetadata(context) { + return context.deleteValue(RPC_METADATA_KEY); +} +exports.deleteRPCMetadata = deleteRPCMetadata; +function getRPCMetadata(context) { + return context.getValue(RPC_METADATA_KEY); +} +exports.getRPCMetadata = getRPCMetadata; +//# sourceMappingURL=rpc-metadata.js.map - case "message": - parseType(parent, token); - return true; +/***/ }), - case "enum": - parseEnum(parent, token); - return true; +/***/ 16478: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - case "service": - parseService(parent, token); - return true; +"use strict"; - case "extend": - parseExtension(parent, token); - return true; - } - return false; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AlwaysOffSampler = void 0; +const api_1 = __nccwpck_require__(65163); +/** + * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead. + * Sampler that samples no traces. + */ +class AlwaysOffSampler { + shouldSample() { + return { + decision: api_1.SamplingDecision.NOT_RECORD, + }; } - - function ifBlock(obj, fnIf, fnElse) { - var trailingLine = tn.line; - if (obj) { - if(typeof obj.comment !== "string") { - obj.comment = cmnt(); // try block-type comment - } - obj.filename = parse.filename; - } - if (skip("{", true)) { - var token; - while ((token = next()) !== "}") - fnIf(token); - skip(";", true); - } else { - if (fnElse) - fnElse(); - skip(";"); - if (obj && (typeof obj.comment !== "string" || preferTrailingComment)) - obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment - } + toString() { + return 'AlwaysOffSampler'; } +} +exports.AlwaysOffSampler = AlwaysOffSampler; +//# sourceMappingURL=AlwaysOffSampler.js.map - function parseType(parent, token) { +/***/ }), - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "type name"); +/***/ 88317: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var type = new Type(token); - ifBlock(type, function parseType_block(token) { - if (parseCommon(type, token)) - return; +"use strict"; - switch (token) { +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AlwaysOnSampler = void 0; +const api_1 = __nccwpck_require__(65163); +/** + * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead. + * Sampler that samples all traces. + */ +class AlwaysOnSampler { + shouldSample() { + return { + decision: api_1.SamplingDecision.RECORD_AND_SAMPLED, + }; + } + toString() { + return 'AlwaysOnSampler'; + } +} +exports.AlwaysOnSampler = AlwaysOnSampler; +//# sourceMappingURL=AlwaysOnSampler.js.map - case "map": - parseMapField(type, token); - break; +/***/ }), - case "required": - case "repeated": - parseField(type, token); - break; +/***/ 15136: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - case "optional": - /* istanbul ignore if */ - if (isProto3) { - parseField(type, "proto3_optional"); - } else { - parseField(type, "optional"); - } - break; +"use strict"; - case "oneof": - parseOneOf(type, token); - break; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ParentBasedSampler = void 0; +const api_1 = __nccwpck_require__(65163); +const global_error_handler_1 = __nccwpck_require__(69246); +const AlwaysOffSampler_1 = __nccwpck_require__(16478); +const AlwaysOnSampler_1 = __nccwpck_require__(88317); +/** + * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead. + * A composite sampler that either respects the parent span's sampling decision + * or delegates to `delegateSampler` for root spans. + */ +class ParentBasedSampler { + constructor(config) { + var _a, _b, _c, _d; + this._root = config.root; + if (!this._root) { + (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured')); + this._root = new AlwaysOnSampler_1.AlwaysOnSampler(); + } + this._remoteParentSampled = + (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler(); + this._remoteParentNotSampled = + (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler(); + this._localParentSampled = + (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler(); + this._localParentNotSampled = + (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler(); + } + shouldSample(context, traceId, spanName, spanKind, attributes, links) { + const parentContext = api_1.trace.getSpanContext(context); + if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) { + return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links); + } + if (parentContext.isRemote) { + if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { + return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); + } + return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); + } + if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { + return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); + } + return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); + } + toString() { + return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`; + } +} +exports.ParentBasedSampler = ParentBasedSampler; +//# sourceMappingURL=ParentBasedSampler.js.map - case "extensions": - readRanges(type.extensions || (type.extensions = [])); - break; +/***/ }), - case "reserved": - readRanges(type.reserved || (type.reserved = []), true); - break; +/***/ 69326: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - default: - /* istanbul ignore if */ - if (!isProto3 || !typeRefRe.test(token)) - throw illegal(token); +"use strict"; - push(token); - parseField(type, "optional"); - break; - } - }); - parent.add(type); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TraceIdRatioBasedSampler = void 0; +const api_1 = __nccwpck_require__(65163); +/** + * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead. + * Sampler that samples a given fraction of traces based of trace id deterministically. + */ +class TraceIdRatioBasedSampler { + constructor(_ratio = 0) { + this._ratio = _ratio; + this._ratio = this._normalize(_ratio); + this._upperBound = Math.floor(this._ratio * 0xffffffff); } - - function parseField(parent, rule, extend) { - var type = next(); - if (type === "group") { - parseGroup(parent, rule); - return; - } - // Type names can consume multiple tokens, in multiple variants: - // package.subpackage field tokens: "package.subpackage" [TYPE NAME ENDS HERE] "field" - // package . subpackage field tokens: "package" "." "subpackage" [TYPE NAME ENDS HERE] "field" - // package. subpackage field tokens: "package." "subpackage" [TYPE NAME ENDS HERE] "field" - // package .subpackage field tokens: "package" ".subpackage" [TYPE NAME ENDS HERE] "field" - // Keep reading tokens until we get a type name with no period at the end, - // and the next token does not start with a period. - while (type.endsWith(".") || peek().startsWith(".")) { - type += next(); + shouldSample(context, traceId) { + return { + decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound + ? api_1.SamplingDecision.RECORD_AND_SAMPLED + : api_1.SamplingDecision.NOT_RECORD, + }; + } + toString() { + return `TraceIdRatioBased{${this._ratio}}`; + } + _normalize(ratio) { + if (typeof ratio !== 'number' || isNaN(ratio)) + return 0; + return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; + } + _accumulate(traceId) { + let accumulation = 0; + for (let i = 0; i < traceId.length / 8; i++) { + const pos = i * 8; + const part = parseInt(traceId.slice(pos, pos + 8), 16); + accumulation = (accumulation ^ part) >>> 0; } + return accumulation; + } +} +exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; +//# sourceMappingURL=TraceIdRatioBasedSampler.js.map - /* istanbul ignore if */ - if (!typeRefRe.test(type)) - throw illegal(type, "type"); +/***/ }), - var name = next(); +/***/ 54463: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /* istanbul ignore if */ - if (!nameRe.test(name)) - throw illegal(name, "name"); +"use strict"; - name = applyCase(name); - skip("="); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0; +const api_1 = __nccwpck_require__(65163); +const SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING'); +function suppressTracing(context) { + return context.setValue(SUPPRESS_TRACING_KEY, true); +} +exports.suppressTracing = suppressTracing; +function unsuppressTracing(context) { + return context.deleteValue(SUPPRESS_TRACING_KEY); +} +exports.unsuppressTracing = unsuppressTracing; +function isTracingSuppressed(context) { + return context.getValue(SUPPRESS_TRACING_KEY) === true; +} +exports.isTracingSuppressed = isTracingSuppressed; +//# sourceMappingURL=suppress-tracing.js.map - var field = new Field(name, parseId(next()), type, rule, extend); - ifBlock(field, function parseField_block(token) { +/***/ }), - /* istanbul ignore else */ - if (token === "option") { - parseOption(field, token); - skip(";"); - } else - throw illegal(token); +/***/ 12408: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - }, function parseField_line() { - parseInlineOptions(field); - }); +"use strict"; - if (rule === "proto3_optional") { - // for proto3 optional fields, we create a single-member Oneof to mimic "optional" behavior - var oneof = new OneOf("_" + name); - field.setOption("proto3_optional", true); - oneof.add(field); - parent.add(oneof); - } else { - parent.add(field); - } - - // JSON defaults to packed=true if not set so we have to set packed=false explicity when - // parsing proto2 descriptors without the option, where applicable. This must be done for - // all known packable types and anything that could be an enum (= is not a basic type). - if (!isProto3 && field.repeated && (types.packed[type] !== undefined || types.basic[type] === undefined)) - field.setOption("packed", false, /* ifNotSet */ true); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BindOnceFuture = void 0; +const promise_1 = __nccwpck_require__(28329); +/** + * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked. + */ +class BindOnceFuture { + constructor(_callback, _that) { + this._callback = _callback; + this._that = _that; + this._isCalled = false; + this._deferred = new promise_1.Deferred(); } - - function parseGroup(parent, rule) { - var name = next(); - - /* istanbul ignore if */ - if (!nameRe.test(name)) - throw illegal(name, "name"); - - var fieldName = util.lcFirst(name); - if (name === fieldName) - name = util.ucFirst(name); - skip("="); - var id = parseId(next()); - var type = new Type(name); - type.group = true; - var field = new Field(fieldName, id, name, rule); - field.filename = parse.filename; - ifBlock(type, function parseGroup_block(token) { - switch (token) { - - case "option": - parseOption(type, token); - skip(";"); - break; - - case "required": - case "repeated": - parseField(type, token); - break; - - case "optional": - /* istanbul ignore if */ - if (isProto3) { - parseField(type, "proto3_optional"); - } else { - parseField(type, "optional"); - } - break; - - case "message": - parseType(type, token); - break; - - case "enum": - parseEnum(type, token); - break; - - /* istanbul ignore next */ - default: - throw illegal(token); // there are no groups with proto3 semantics - } - }); - parent.add(type) - .add(field); + get isCalled() { + return this._isCalled; } - - function parseMapField(parent) { - skip("<"); - var keyType = next(); - - /* istanbul ignore if */ - if (types.mapKey[keyType] === undefined) - throw illegal(keyType, "type"); - - skip(","); - var valueType = next(); - - /* istanbul ignore if */ - if (!typeRefRe.test(valueType)) - throw illegal(valueType, "type"); - - skip(">"); - var name = next(); - - /* istanbul ignore if */ - if (!nameRe.test(name)) - throw illegal(name, "name"); - - skip("="); - var field = new MapField(applyCase(name), parseId(next()), keyType, valueType); - ifBlock(field, function parseMapField_block(token) { - - /* istanbul ignore else */ - if (token === "option") { - parseOption(field, token); - skip(";"); - } else - throw illegal(token); - - }, function parseMapField_line() { - parseInlineOptions(field); - }); - parent.add(field); + get promise() { + return this._deferred.promise; } - - function parseOneOf(parent, token) { - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "name"); - - var oneof = new OneOf(applyCase(token)); - ifBlock(oneof, function parseOneOf_block(token) { - if (token === "option") { - parseOption(oneof, token); - skip(";"); - } else { - push(token); - parseField(oneof, "optional"); + call(...args) { + if (!this._isCalled) { + this._isCalled = true; + try { + Promise.resolve(this._callback.call(this._that, ...args)).then(val => this._deferred.resolve(val), err => this._deferred.reject(err)); } - }); - parent.add(oneof); - } - - function parseEnum(parent, token) { - - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "name"); - - var enm = new Enum(token); - ifBlock(enm, function parseEnum_block(token) { - switch(token) { - case "option": - parseOption(enm, token); - skip(";"); - break; - - case "reserved": - readRanges(enm.reserved || (enm.reserved = []), true); - break; - - default: - parseEnumValue(enm, token); - } - }); - parent.add(enm); + catch (err) { + this._deferred.reject(err); + } + } + return this._deferred.promise; } +} +exports.BindOnceFuture = BindOnceFuture; +//# sourceMappingURL=callback.js.map - function parseEnumValue(parent, token) { - - /* istanbul ignore if */ - if (!nameRe.test(token)) - throw illegal(token, "name"); +/***/ }), - skip("="); - var value = parseId(next(), true), - dummy = { - options: undefined - }; - dummy.setOption = function(name, value) { - if (this.options === undefined) - this.options = {}; - this.options[name] = value; - }; - ifBlock(dummy, function parseEnumValue_block(token) { +/***/ 7238: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /* istanbul ignore else */ - if (token === "option") { - parseOption(dummy, token); // skip - skip(";"); - } else - throw illegal(token); +"use strict"; - }, function parseEnumValue_line() { - parseInlineOptions(dummy); // skip - }); - parent.add(token, value, dummy.comment, dummy.options); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT = exports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0; +const api_1 = __nccwpck_require__(65163); +const sampling_1 = __nccwpck_require__(28289); +const DEFAULT_LIST_SEPARATOR = ','; +/** + * Environment interface to define all names + */ +const ENVIRONMENT_BOOLEAN_KEYS = ['OTEL_SDK_DISABLED']; +function isEnvVarABoolean(key) { + return (ENVIRONMENT_BOOLEAN_KEYS.indexOf(key) > -1); +} +const ENVIRONMENT_NUMBERS_KEYS = [ + 'OTEL_BSP_EXPORT_TIMEOUT', + 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE', + 'OTEL_BSP_MAX_QUEUE_SIZE', + 'OTEL_BSP_SCHEDULE_DELAY', + 'OTEL_BLRP_EXPORT_TIMEOUT', + 'OTEL_BLRP_MAX_EXPORT_BATCH_SIZE', + 'OTEL_BLRP_MAX_QUEUE_SIZE', + 'OTEL_BLRP_SCHEDULE_DELAY', + 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT', + 'OTEL_ATTRIBUTE_COUNT_LIMIT', + 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT', + 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT', + 'OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT', + 'OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT', + 'OTEL_SPAN_EVENT_COUNT_LIMIT', + 'OTEL_SPAN_LINK_COUNT_LIMIT', + 'OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT', + 'OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT', + 'OTEL_EXPORTER_OTLP_TIMEOUT', + 'OTEL_EXPORTER_OTLP_TRACES_TIMEOUT', + 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT', + 'OTEL_EXPORTER_OTLP_LOGS_TIMEOUT', + 'OTEL_EXPORTER_JAEGER_AGENT_PORT', +]; +function isEnvVarANumber(key) { + return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1); +} +const ENVIRONMENT_LISTS_KEYS = [ + 'OTEL_NO_PATCH_MODULES', + 'OTEL_PROPAGATORS', +]; +function isEnvVarAList(key) { + return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1; +} +exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity; +exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128; +exports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT = 128; +exports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT = 128; +/** + * Default environment variables + */ +exports.DEFAULT_ENVIRONMENT = { + OTEL_SDK_DISABLED: false, + CONTAINER_NAME: '', + ECS_CONTAINER_METADATA_URI_V4: '', + ECS_CONTAINER_METADATA_URI: '', + HOSTNAME: '', + KUBERNETES_SERVICE_HOST: '', + NAMESPACE: '', + OTEL_BSP_EXPORT_TIMEOUT: 30000, + OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512, + OTEL_BSP_MAX_QUEUE_SIZE: 2048, + OTEL_BSP_SCHEDULE_DELAY: 5000, + OTEL_BLRP_EXPORT_TIMEOUT: 30000, + OTEL_BLRP_MAX_EXPORT_BATCH_SIZE: 512, + OTEL_BLRP_MAX_QUEUE_SIZE: 2048, + OTEL_BLRP_SCHEDULE_DELAY: 5000, + OTEL_EXPORTER_JAEGER_AGENT_HOST: '', + OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832, + OTEL_EXPORTER_JAEGER_ENDPOINT: '', + OTEL_EXPORTER_JAEGER_PASSWORD: '', + OTEL_EXPORTER_JAEGER_USER: '', + OTEL_EXPORTER_OTLP_ENDPOINT: '', + OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '', + OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '', + OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: '', + OTEL_EXPORTER_OTLP_HEADERS: '', + OTEL_EXPORTER_OTLP_TRACES_HEADERS: '', + OTEL_EXPORTER_OTLP_METRICS_HEADERS: '', + OTEL_EXPORTER_OTLP_LOGS_HEADERS: '', + OTEL_EXPORTER_OTLP_TIMEOUT: 10000, + OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: 10000, + OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 10000, + OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: 10000, + OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans', + OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO, + OTEL_NO_PATCH_MODULES: [], + OTEL_PROPAGATORS: ['tracecontext', 'baggage'], + OTEL_RESOURCE_ATTRIBUTES: '', + OTEL_SERVICE_NAME: '', + OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, + OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, + OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, + OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, + OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, + OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, + OTEL_SPAN_EVENT_COUNT_LIMIT: 128, + OTEL_SPAN_LINK_COUNT_LIMIT: 128, + OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT: exports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, + OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT: exports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT, + OTEL_TRACES_EXPORTER: '', + OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn, + OTEL_TRACES_SAMPLER_ARG: '', + OTEL_LOGS_EXPORTER: '', + OTEL_EXPORTER_OTLP_INSECURE: '', + OTEL_EXPORTER_OTLP_TRACES_INSECURE: '', + OTEL_EXPORTER_OTLP_METRICS_INSECURE: '', + OTEL_EXPORTER_OTLP_LOGS_INSECURE: '', + OTEL_EXPORTER_OTLP_CERTIFICATE: '', + OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: '', + OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: '', + OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: '', + OTEL_EXPORTER_OTLP_COMPRESSION: '', + OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '', + OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '', + OTEL_EXPORTER_OTLP_LOGS_COMPRESSION: '', + OTEL_EXPORTER_OTLP_CLIENT_KEY: '', + OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY: '', + OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY: '', + OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY: '', + OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: '', + OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE: '', + OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE: '', + OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE: '', + OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf', + OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: 'http/protobuf', + OTEL_EXPORTER_OTLP_METRICS_PROTOCOL: 'http/protobuf', + OTEL_EXPORTER_OTLP_LOGS_PROTOCOL: 'http/protobuf', + OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: 'cumulative', +}; +/** + * @param key + * @param environment + * @param values + */ +function parseBoolean(key, environment, values) { + if (typeof values[key] === 'undefined') { + return; } - - function parseOption(parent, token) { - var isCustom = skip("(", true); - - /* istanbul ignore if */ - if (!typeRefRe.test(token = next())) - throw illegal(token, "name"); - - var name = token; - var option = name; - var propName; - - if (isCustom) { - skip(")"); - name = "(" + name + ")"; - option = name; - token = peek(); - if (fqTypeRefRe.test(token)) { - propName = token.slice(1); //remove '.' before property name - name += token; - next(); + const value = String(values[key]); + // support case-insensitive "true" + environment[key] = value.toLowerCase() === 'true'; +} +/** + * Parses a variable as number with number validation + * @param name + * @param environment + * @param values + * @param min + * @param max + */ +function parseNumber(name, environment, values, min = -Infinity, max = Infinity) { + if (typeof values[name] !== 'undefined') { + const value = Number(values[name]); + if (!isNaN(value)) { + if (value < min) { + environment[name] = min; + } + else if (value > max) { + environment[name] = max; + } + else { + environment[name] = value; } } - skip("="); - var optionValue = parseOptionValue(parent, name); - setParsedOption(parent, option, optionValue, propName); } - - function parseOptionValue(parent, name) { - // { a: "foo" b { c: "bar" } } - if (skip("{", true)) { - var objectResult = {}; - - while (!skip("}", true)) { - /* istanbul ignore if */ - if (!nameRe.test(token = next())) { - throw illegal(token, "name"); +} +/** + * Parses list-like strings from input into output. + * @param name + * @param environment + * @param values + * @param separator + */ +function parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) { + const givenValue = input[name]; + if (typeof givenValue === 'string') { + output[name] = givenValue.split(separator).map(v => v.trim()); + } +} +// The support string -> DiagLogLevel mappings +const logLevelMap = { + ALL: api_1.DiagLogLevel.ALL, + VERBOSE: api_1.DiagLogLevel.VERBOSE, + DEBUG: api_1.DiagLogLevel.DEBUG, + INFO: api_1.DiagLogLevel.INFO, + WARN: api_1.DiagLogLevel.WARN, + ERROR: api_1.DiagLogLevel.ERROR, + NONE: api_1.DiagLogLevel.NONE, +}; +/** + * Environmentally sets log level if valid log level string is provided + * @param key + * @param environment + * @param values + */ +function setLogLevelFromEnv(key, environment, values) { + const value = values[key]; + if (typeof value === 'string') { + const theLevel = logLevelMap[value.toUpperCase()]; + if (theLevel != null) { + environment[key] = theLevel; + } + } +} +/** + * Parses environment values + * @param values + */ +function parseEnvironment(values) { + const environment = {}; + for (const env in exports.DEFAULT_ENVIRONMENT) { + const key = env; + switch (key) { + case 'OTEL_LOG_LEVEL': + setLogLevelFromEnv(key, environment, values); + break; + default: + if (isEnvVarABoolean(key)) { + parseBoolean(key, environment, values); } - if (token === null) { - throw illegal(token, "end of input"); + else if (isEnvVarANumber(key)) { + parseNumber(key, environment, values); } - - var value; - var propName = token; - - skip(":", true); - - if (peek() === "{") - value = parseOptionValue(parent, name + "." + token); - else if (peek() === "[") { - // option (my_option) = { - // repeated_value: [ "foo", "bar" ] - // }; - value = []; - var lastValue; - if (skip("[", true)) { - do { - lastValue = readValue(true); - value.push(lastValue); - } while (skip(",", true)); - skip("]"); - if (typeof lastValue !== "undefined") { - setOption(parent, name + "." + token, lastValue); - } + else if (isEnvVarAList(key)) { + parseStringList(key, environment, values); + } + else { + const value = values[key]; + if (typeof value !== 'undefined' && value !== null) { + environment[key] = String(value); } - } else { - value = readValue(true); - setOption(parent, name + "." + token, value); } - - var prevValue = objectResult[propName]; - - if (prevValue) - value = [].concat(prevValue).concat(value); - - objectResult[propName] = value; - - // Semicolons and commas can be optional - skip(",", true); - skip(";", true); - } - - return objectResult; } - - var simpleValue = readValue(true); - setOption(parent, name, simpleValue); - return simpleValue; - // Does not enforce a delimiter to be universal } + return environment; +} +exports.parseEnvironment = parseEnvironment; +//# sourceMappingURL=environment.js.map - function setOption(parent, name, value) { - if (parent.setOption) - parent.setOption(name, value); - } +/***/ }), - function setParsedOption(parent, name, value, propName) { - if (parent.setParsedOption) - parent.setParsedOption(name, value, propName); - } +/***/ 71780: +/***/ ((__unused_webpack_module, exports) => { - function parseInlineOptions(parent) { - if (skip("[", true)) { - do { - parseOption(parent, "option"); - } while (skip(",", true)); - skip("]"); +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isPlainObject = void 0; +/* eslint-disable @typescript-eslint/no-explicit-any */ +/** + * based on lodash in order to support esm builds without esModuleInterop. + * lodash is using MIT License. + **/ +const objectTag = '[object Object]'; +const nullTag = '[object Null]'; +const undefinedTag = '[object Undefined]'; +const funcProto = Function.prototype; +const funcToString = funcProto.toString; +const objectCtorString = funcToString.call(Object); +const getPrototype = overArg(Object.getPrototypeOf, Object); +const objectProto = Object.prototype; +const hasOwnProperty = objectProto.hasOwnProperty; +const symToStringTag = Symbol ? Symbol.toStringTag : undefined; +const nativeObjectToString = objectProto.toString; +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function (arg) { + return func(transform(arg)); + }; +} +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) !== objectTag) { + return false; + } + const proto = getPrototype(value); + if (proto === null) { + return true; + } + const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && + funcToString.call(Ctor) === objectCtorString); +} +exports.isPlainObject = isPlainObject; +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) + ? getRawTag(value) + : objectToString(value); +} +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + let unmasked = false; + try { + value[symToStringTag] = undefined; + unmasked = true; + } + catch (e) { + // silence + } + const result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } + else { + delete value[symToStringTag]; } - return parent; } + return result; +} +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} +//# sourceMappingURL=lodash.merge.js.map - function parseService(parent, token) { +/***/ }), - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "service name"); +/***/ 65387: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var service = new Service(token); - ifBlock(service, function parseService_block(token) { - if (parseCommon(service, token)) - return; +"use strict"; - /* istanbul ignore else */ - if (token === "rpc") - parseMethod(service, token); - else - throw illegal(token); - }); - parent.add(service); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.merge = void 0; +/* eslint-disable @typescript-eslint/no-explicit-any */ +const lodash_merge_1 = __nccwpck_require__(71780); +const MAX_LEVEL = 20; +/** + * Merges objects together + * @param args - objects / values to be merged + */ +function merge(...args) { + let result = args.shift(); + const objects = new WeakMap(); + while (args.length > 0) { + result = mergeTwoObjects(result, args.shift(), 0, objects); + } + return result; +} +exports.merge = merge; +function takeValue(value) { + if (isArray(value)) { + return value.slice(); + } + return value; +} +/** + * Merges two objects + * @param one - first object + * @param two - second object + * @param level - current deep level + * @param objects - objects holder that has been already referenced - to prevent + * cyclic dependency + */ +function mergeTwoObjects(one, two, level = 0, objects) { + let result; + if (level > MAX_LEVEL) { + return undefined; + } + level++; + if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) { + result = takeValue(two); + } + else if (isArray(one)) { + result = one.slice(); + if (isArray(two)) { + for (let i = 0, j = two.length; i < j; i++) { + result.push(takeValue(two[i])); + } + } + else if (isObject(two)) { + const keys = Object.keys(two); + for (let i = 0, j = keys.length; i < j; i++) { + const key = keys[i]; + result[key] = takeValue(two[key]); + } + } + } + else if (isObject(one)) { + if (isObject(two)) { + if (!shouldMerge(one, two)) { + return two; + } + result = Object.assign({}, one); + const keys = Object.keys(two); + for (let i = 0, j = keys.length; i < j; i++) { + const key = keys[i]; + const twoValue = two[key]; + if (isPrimitive(twoValue)) { + if (typeof twoValue === 'undefined') { + delete result[key]; + } + else { + // result[key] = takeValue(twoValue); + result[key] = twoValue; + } + } + else { + const obj1 = result[key]; + const obj2 = twoValue; + if (wasObjectReferenced(one, key, objects) || + wasObjectReferenced(two, key, objects)) { + delete result[key]; + } + else { + if (isObject(obj1) && isObject(obj2)) { + const arr1 = objects.get(obj1) || []; + const arr2 = objects.get(obj2) || []; + arr1.push({ obj: one, key }); + arr2.push({ obj: two, key }); + objects.set(obj1, arr1); + objects.set(obj2, arr2); + } + result[key] = mergeTwoObjects(result[key], twoValue, level, objects); + } + } + } + } + else { + result = two; + } + } + return result; +} +/** + * Function to check if object has been already reference + * @param obj + * @param key + * @param objects + */ +function wasObjectReferenced(obj, key, objects) { + const arr = objects.get(obj[key]) || []; + for (let i = 0, j = arr.length; i < j; i++) { + const info = arr[i]; + if (info.key === key && info.obj === obj) { + return true; + } } + return false; +} +function isArray(value) { + return Array.isArray(value); +} +function isFunction(value) { + return typeof value === 'function'; +} +function isObject(value) { + return (!isPrimitive(value) && + !isArray(value) && + !isFunction(value) && + typeof value === 'object'); +} +function isPrimitive(value) { + return (typeof value === 'string' || + typeof value === 'number' || + typeof value === 'boolean' || + typeof value === 'undefined' || + value instanceof Date || + value instanceof RegExp || + value === null); +} +function shouldMerge(one, two) { + if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) { + return false; + } + return true; +} +//# sourceMappingURL=merge.js.map - function parseMethod(parent, token) { - // Get the comment of the preceding line now (if one exists) in case the - // method is defined across multiple lines. - var commentText = cmnt(); +/***/ }), - var type = token; +/***/ 28329: +/***/ ((__unused_webpack_module, exports) => { - /* istanbul ignore if */ - if (!nameRe.test(token = next())) - throw illegal(token, "name"); +"use strict"; - var name = token, - requestType, requestStream, - responseType, responseStream; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Deferred = void 0; +class Deferred { + constructor() { + this._promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + }); + } + get promise() { + return this._promise; + } + resolve(val) { + this._resolve(val); + } + reject(err) { + this._reject(err); + } +} +exports.Deferred = Deferred; +//# sourceMappingURL=promise.js.map - skip("("); - if (skip("stream", true)) - requestStream = true; +/***/ }), - /* istanbul ignore if */ - if (!typeRefRe.test(token = next())) - throw illegal(token); +/***/ 28289: +/***/ ((__unused_webpack_module, exports) => { - requestType = token; - skip(")"); skip("returns"); skip("("); - if (skip("stream", true)) - responseStream = true; +"use strict"; - /* istanbul ignore if */ - if (!typeRefRe.test(token = next())) - throw illegal(token); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TracesSamplerValues = void 0; +var TracesSamplerValues; +(function (TracesSamplerValues) { + TracesSamplerValues["AlwaysOff"] = "always_off"; + TracesSamplerValues["AlwaysOn"] = "always_on"; + TracesSamplerValues["ParentBasedAlwaysOff"] = "parentbased_always_off"; + TracesSamplerValues["ParentBasedAlwaysOn"] = "parentbased_always_on"; + TracesSamplerValues["ParentBasedTraceIdRatio"] = "parentbased_traceidratio"; + TracesSamplerValues["TraceIdRatio"] = "traceidratio"; +})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {})); +//# sourceMappingURL=sampling.js.map - responseType = token; - skip(")"); +/***/ }), - var method = new Method(name, type, requestType, responseType, requestStream, responseStream); - method.comment = commentText; - ifBlock(method, function parseMethod_block(token) { +/***/ 48400: +/***/ ((__unused_webpack_module, exports) => { - /* istanbul ignore else */ - if (token === "option") { - parseOption(method, token); - skip(";"); - } else - throw illegal(token); +"use strict"; - }); - parent.add(method); +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.callWithTimeout = exports.TimeoutError = void 0; +/** + * Error that is thrown on timeouts. + */ +class TimeoutError extends Error { + constructor(message) { + super(message); + // manually adjust prototype to retain `instanceof` functionality when targeting ES5, see: + // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work + Object.setPrototypeOf(this, TimeoutError.prototype); } +} +exports.TimeoutError = TimeoutError; +/** + * Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise + * rejects, and resolves if the specified promise resolves. + * + *

NOTE: this operation will continue even after it throws a {@link TimeoutError}. + * + * @param promise promise to use with timeout. + * @param timeout the timeout in milliseconds until the returned promise is rejected. + */ +function callWithTimeout(promise, timeout) { + let timeoutHandle; + const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) { + timeoutHandle = setTimeout(function timeoutHandler() { + reject(new TimeoutError('Operation timed out.')); + }, timeout); + }); + return Promise.race([promise, timeoutPromise]).then(result => { + clearTimeout(timeoutHandle); + return result; + }, reason => { + clearTimeout(timeoutHandle); + throw reason; + }); +} +exports.callWithTimeout = callWithTimeout; +//# sourceMappingURL=timeout.js.map - function parseExtension(parent, token) { - - /* istanbul ignore if */ - if (!typeRefRe.test(token = next())) - throw illegal(token, "reference"); - - var reference = token; - ifBlock(null, function parseExtension_block(token) { - switch (token) { +/***/ }), - case "required": - case "repeated": - parseField(parent, token, reference); - break; +/***/ 90839: +/***/ ((__unused_webpack_module, exports) => { - case "optional": - /* istanbul ignore if */ - if (isProto3) { - parseField(parent, "proto3_optional", reference); - } else { - parseField(parent, "optional", reference); - } - break; +"use strict"; - default: - /* istanbul ignore if */ - if (!isProto3 || !typeRefRe.test(token)) - throw illegal(token); - push(token); - parseField(parent, "optional", reference); - break; - } - }); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isUrlIgnored = exports.urlMatches = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +function urlMatches(url, urlToMatch) { + if (typeof urlToMatch === 'string') { + return url === urlToMatch; } - - var token; - while ((token = next()) !== null) { - switch (token) { - - case "package": - - /* istanbul ignore if */ - if (!head) - throw illegal(token); - - parsePackage(); - break; - - case "import": - - /* istanbul ignore if */ - if (!head) - throw illegal(token); - - parseImport(); - break; - - case "syntax": - - /* istanbul ignore if */ - if (!head) - throw illegal(token); - - parseSyntax(); - break; - - case "option": - - parseOption(ptr, token); - skip(";"); - break; - - default: - - /* istanbul ignore else */ - if (parseCommon(ptr, token)) { - head = false; - continue; - } - - /* istanbul ignore next */ - throw illegal(token); - } + else { + return !!url.match(urlToMatch); } - - parse.filename = null; - return { - "package" : pkg, - "imports" : imports, - weakImports : weakImports, - syntax : syntax, - root : root - }; } - +exports.urlMatches = urlMatches; /** - * Parses the given .proto source and returns an object with the parsed contents. - * @name parse - * @function - * @param {string} source Source contents - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {IParserResult} Parser result - * @property {string} filename=null Currently processing file name for error reporting, if known - * @property {IParseOptions} defaults Default {@link IParseOptions} - * @variation 2 + * Check if {@param url} should be ignored when comparing against {@param ignoredUrls} + * @param url + * @param ignoredUrls */ - +function isUrlIgnored(url, ignoredUrls) { + if (!ignoredUrls) { + return false; + } + for (const ignoreUrl of ignoredUrls) { + if (urlMatches(url, ignoreUrl)) { + return true; + } + } + return false; +} +exports.isUrlIgnored = isUrlIgnored; +//# sourceMappingURL=url.js.map /***/ }), -/***/ 24576: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 67226: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = Reader; - -var util = __nccwpck_require__(10329); - -var BufferReader; // cyclic - -var LongBits = util.LongBits, - utf8 = util.utf8; - -/* istanbul ignore next */ -function indexOutOfRange(reader, writeLength) { - return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); -} - +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isWrapped = void 0; /** - * Constructs a new reader instance using the specified buffer. - * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. - * @constructor - * @param {Uint8Array} buffer Buffer to read from + * Checks if certain function has been already wrapped + * @param func */ -function Reader(buffer) { - - /** - * Read buffer. - * @type {Uint8Array} - */ - this.buf = buffer; - - /** - * Read buffer position. - * @type {number} - */ - this.pos = 0; - - /** - * Read buffer length. - * @type {number} - */ - this.len = buffer.length; +function isWrapped(func) { + return (typeof func === 'function' && + typeof func.__original === 'function' && + typeof func.__unwrap === 'function' && + func.__wrapped === true); } +exports.isWrapped = isWrapped; +//# sourceMappingURL=wrap.js.map -var create_array = typeof Uint8Array !== "undefined" - ? function create_typed_array(buffer) { - if (buffer instanceof Uint8Array || Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - } - /* istanbul ignore next */ - : function create_array(buffer) { - if (Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - }; +/***/ }), -var create = function create() { - return util.Buffer - ? function create_buffer_setup(buffer) { - return (Reader.create = function create_buffer(buffer) { - return util.Buffer.isBuffer(buffer) - ? new BufferReader(buffer) - /* istanbul ignore next */ - : create_array(buffer); - })(buffer); - } - /* istanbul ignore next */ - : create_array; -}; +/***/ 55687: +/***/ ((__unused_webpack_module, exports) => { -/** - * Creates a new reader using the specified buffer. - * @function - * @param {Uint8Array|Buffer} buffer Buffer to read from - * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} - * @throws {Error} If `buffer` is not a valid buffer +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Reader.create = create(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.VERSION = void 0; +// this is autogenerated file, see scripts/version-update.js +exports.VERSION = '1.24.1'; +//# sourceMappingURL=version.js.map -Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; +/***/ }), -/** - * Reads a varint as an unsigned 32 bit value. - * @function - * @returns {number} Value read - */ -Reader.prototype.uint32 = (function read_uint32_setup() { - var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) - return function read_uint32() { - value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; +/***/ 6633: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /* istanbul ignore if */ - if ((this.pos += 5) > this.len) { - this.pos = this.len; - throw indexOutOfRange(this, 10); - } - return value; - }; -})(); +"use strict"; -/** - * Reads a varint as a signed 32 bit value. - * @returns {number} Value read +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Reader.prototype.int32 = function read_int32() { - return this.uint32() | 0; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OTLPTraceExporter = void 0; +const core_1 = __nccwpck_require__(89736); +const otlp_grpc_exporter_base_1 = __nccwpck_require__(75452); +const otlp_transformer_1 = __nccwpck_require__(74357); +const version_1 = __nccwpck_require__(37694); +const USER_AGENT = { + 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${version_1.VERSION}`, }; - /** - * Reads a zig-zag encoded varint as a signed 32 bit value. - * @returns {number} Value read + * OTLP Trace Exporter for Node */ -Reader.prototype.sint32 = function read_sint32() { - var value = this.uint32(); - return value >>> 1 ^ -(value & 1) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readLongVarint() { - // tends to deopt with local vars for octet etc. - var bits = new LongBits(0, 0); - var i = 0; - if (this.len - this.pos > 4) { // fast route (lo) - for (; i < 4; ++i) { - // 1st..4th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 5th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; - bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - i = 0; - } else { - for (; i < 3; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 1st..3th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 4th - bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; - return bits; +class OTLPTraceExporter extends otlp_grpc_exporter_base_1.OTLPGRPCExporterNodeBase { + constructor(config = {}) { + const signalSpecificMetadata = Object.assign(Object.assign({}, USER_AGENT), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS)); + super(config, signalSpecificMetadata, 'TraceExportService', '/opentelemetry.proto.collector.trace.v1.TraceService/Export', otlp_grpc_exporter_base_1.TraceSerializer); } - if (this.len - this.pos > 4) { // fast route (hi) - for (; i < 5; ++i) { - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } else { - for (; i < 5; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; + convert(spans) { + return (0, otlp_transformer_1.createExportTraceServiceRequest)(spans); + } + getDefaultUrl(config) { + return (0, otlp_grpc_exporter_base_1.validateAndNormalizeUrl)(this.getUrlFromConfig(config)); + } + getUrlFromConfig(config) { + if (typeof config.url === 'string') { + return config.url; } + return ((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT || + (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT || + otlp_grpc_exporter_base_1.DEFAULT_COLLECTOR_URL); } - /* istanbul ignore next */ - throw Error("invalid varint encoding"); } +exports.OTLPTraceExporter = OTLPTraceExporter; +//# sourceMappingURL=OTLPTraceExporter.js.map -/* eslint-enable no-invalid-this */ - -/** - * Reads a varint as a signed 64 bit value. - * @name Reader#int64 - * @function - * @returns {Long} Value read - */ +/***/ }), -/** - * Reads a varint as an unsigned 64 bit value. - * @name Reader#uint64 - * @function - * @returns {Long} Value read - */ +/***/ 60160: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -/** - * Reads a zig-zag encoded varint as a signed 64 bit value. - * @name Reader#sint64 - * @function - * @returns {Long} Value read - */ +"use strict"; -/** - * Reads a varint as a boolean. - * @returns {boolean} Value read +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Reader.prototype.bool = function read_bool() { - return this.uint32() !== 0; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(6633), exports); +//# sourceMappingURL=index.js.map -function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` - return (buf[end - 4] - | buf[end - 3] << 8 - | buf[end - 2] << 16 - | buf[end - 1] << 24) >>> 0; -} - -/** - * Reads fixed 32 bits as an unsigned 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.fixed32 = function read_fixed32() { +/***/ }), - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); +/***/ 37694: +/***/ ((__unused_webpack_module, exports) => { - return readFixed32_end(this.buf, this.pos += 4); -}; +"use strict"; -/** - * Reads fixed 32 bits as a signed 32 bit integer. - * @returns {number} Value read +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Reader.prototype.sfixed32 = function read_sfixed32() { +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.VERSION = void 0; +// this is autogenerated file, see scripts/version-update.js +exports.VERSION = '0.51.1'; +//# sourceMappingURL=version.js.map - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); +/***/ }), - return readFixed32_end(this.buf, this.pos += 4) | 0; -}; +/***/ 97859: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/* eslint-disable no-invalid-this */ +"use strict"; -function readFixed64(/* this: Reader */) { +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OTLPTraceExporter = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var platform_1 = __nccwpck_require__(2055); +Object.defineProperty(exports, "OTLPTraceExporter", ({ enumerable: true, get: function () { return platform_1.OTLPTraceExporter; } })); +//# sourceMappingURL=index.js.map - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 8); +/***/ }), - return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); -} +/***/ 2055: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/* eslint-enable no-invalid-this */ +"use strict"; -/** - * Reads fixed 64 bits. - * @name Reader#fixed64 - * @function - * @returns {Long} Value read +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OTLPTraceExporter = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ +var node_1 = __nccwpck_require__(23851); +Object.defineProperty(exports, "OTLPTraceExporter", ({ enumerable: true, get: function () { return node_1.OTLPTraceExporter; } })); +//# sourceMappingURL=index.js.map -/** - * Reads zig-zag encoded fixed 64 bits. - * @name Reader#sfixed64 - * @function - * @returns {Long} Value read - */ +/***/ }), -/** - * Reads a float (32 bit) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.float = function read_float() { +/***/ 44394: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); +"use strict"; - var value = util.float.readFloatLE(this.buf, this.pos); - this.pos += 4; - return value; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OTLPTraceExporter = void 0; +const core_1 = __nccwpck_require__(89736); +const otlp_exporter_base_1 = __nccwpck_require__(11363); +const otlp_proto_exporter_base_1 = __nccwpck_require__(61216); +const otlp_transformer_1 = __nccwpck_require__(74357); +const version_1 = __nccwpck_require__(26811); +const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces'; +const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`; +const USER_AGENT = { + 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${version_1.VERSION}`, }; - /** - * Reads a double (64 bit float) as a number. - * @function - * @returns {number} Value read + * Collector Trace Exporter for Node with protobuf */ -Reader.prototype.double = function read_double() { +class OTLPTraceExporter extends otlp_proto_exporter_base_1.OTLPProtoExporterNodeBase { + constructor(config = {}) { + super(config); + this.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, this.headers), USER_AGENT), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers)); + } + convert(spans) { + return (0, otlp_transformer_1.createExportTraceServiceRequest)(spans); + } + getDefaultUrl(config) { + return typeof config.url === 'string' + ? config.url + : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0 + ? (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) + : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0 + ? (0, otlp_exporter_base_1.appendResourcePathToUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH) + : DEFAULT_COLLECTOR_URL; + } + getServiceClientType() { + return otlp_proto_exporter_base_1.ServiceClientType.SPANS; + } +} +exports.OTLPTraceExporter = OTLPTraceExporter; +//# sourceMappingURL=OTLPTraceExporter.js.map - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 4); +/***/ }), - var value = util.float.readDoubleLE(this.buf, this.pos); - this.pos += 8; - return value; -}; +/***/ 23851: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @returns {Uint8Array} Value read +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Reader.prototype.bytes = function read_bytes() { - var length = this.uint32(), - start = this.pos, - end = this.pos + length; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OTLPTraceExporter = void 0; +var OTLPTraceExporter_1 = __nccwpck_require__(44394); +Object.defineProperty(exports, "OTLPTraceExporter", ({ enumerable: true, get: function () { return OTLPTraceExporter_1.OTLPTraceExporter; } })); +//# sourceMappingURL=index.js.map - /* istanbul ignore if */ - if (end > this.len) - throw indexOutOfRange(this, length); +/***/ }), - this.pos += length; - if (Array.isArray(this.buf)) // plain array - return this.buf.slice(start, end); +/***/ 26811: +/***/ ((__unused_webpack_module, exports) => { - if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 - var nativeBuffer = util.Buffer; - return nativeBuffer - ? nativeBuffer.alloc(0) - : new this.buf.constructor(0); - } - return this._slice.call(this.buf, start, end); -}; +"use strict"; -/** - * Reads a string preceeded by its byte length as a varint. - * @returns {string} Value read +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Reader.prototype.string = function read_string() { - var bytes = this.bytes(); - return utf8.read(bytes, 0, bytes.length); -}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.VERSION = void 0; +// this is autogenerated file, see scripts/version-update.js +exports.VERSION = '0.51.1'; +//# sourceMappingURL=version.js.map -/** - * Skips the specified number of bytes if specified, otherwise skips a varint. - * @param {number} [length] Length if known, otherwise a varint is assumed - * @returns {Reader} `this` - */ -Reader.prototype.skip = function skip(length) { - if (typeof length === "number") { - /* istanbul ignore if */ - if (this.pos + length > this.len) - throw indexOutOfRange(this, length); - this.pos += length; - } else { - do { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - } while (this.buf[this.pos++] & 128); - } - return this; -}; +/***/ }), +/***/ 67684: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OTLPExporterBase = void 0; +const api_1 = __nccwpck_require__(65163); +const core_1 = __nccwpck_require__(89736); +const util_1 = __nccwpck_require__(14425); /** - * Skips the next element of the specified wire type. - * @param {number} wireType Wire type received - * @returns {Reader} `this` + * Collector Exporter abstract base class */ -Reader.prototype.skipType = function(wireType) { - switch (wireType) { - case 0: - this.skip(); - break; - case 1: - this.skip(8); - break; - case 2: - this.skip(this.uint32()); - break; - case 3: - while ((wireType = this.uint32() & 7) !== 4) { - this.skipType(wireType); +class OTLPExporterBase { + /** + * @param config + */ + constructor(config = {}) { + this._sendingPromises = []; + this.url = this.getDefaultUrl(config); + if (typeof config.hostname === 'string') { + this.hostname = config.hostname; + } + this.shutdown = this.shutdown.bind(this); + this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this); + this._concurrencyLimit = + typeof config.concurrencyLimit === 'number' + ? config.concurrencyLimit + : 30; + this.timeoutMillis = (0, util_1.configureExporterTimeout)(config.timeoutMillis); + // platform dependent + this.onInit(config); + } + /** + * Export items. + * @param items + * @param resultCallback + */ + export(items, resultCallback) { + if (this._shutdownOnce.isCalled) { + resultCallback({ + code: core_1.ExportResultCode.FAILED, + error: new Error('Exporter has been shutdown'), + }); + return; + } + if (this._sendingPromises.length >= this._concurrencyLimit) { + resultCallback({ + code: core_1.ExportResultCode.FAILED, + error: new Error('Concurrent export limit reached'), + }); + return; + } + this._export(items) + .then(() => { + resultCallback({ code: core_1.ExportResultCode.SUCCESS }); + }) + .catch((error) => { + resultCallback({ code: core_1.ExportResultCode.FAILED, error }); + }); + } + _export(items) { + return new Promise((resolve, reject) => { + try { + api_1.diag.debug('items to be sent', items); + this.send(items, resolve, reject); } - break; - case 5: - this.skip(4); - break; - - /* istanbul ignore next */ - default: - throw Error("invalid wire type " + wireType + " at offset " + this.pos); + catch (e) { + reject(e); + } + }); } - return this; -}; - -Reader._configure = function(BufferReader_) { - BufferReader = BufferReader_; - Reader.create = create(); - BufferReader._configure(); - - var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; - util.merge(Reader.prototype, { - - int64: function read_int64() { - return readLongVarint.call(this)[fn](false); - }, - - uint64: function read_uint64() { - return readLongVarint.call(this)[fn](true); - }, + /** + * Shutdown the exporter. + */ + shutdown() { + return this._shutdownOnce.call(); + } + /** + * Exports any pending spans in the exporter + */ + forceFlush() { + return Promise.all(this._sendingPromises).then(() => { + /** ignore resolved values */ + }); + } + /** + * Called by _shutdownOnce with BindOnceFuture + */ + _shutdown() { + api_1.diag.debug('shutdown started'); + this.onShutdown(); + return this.forceFlush(); + } +} +exports.OTLPExporterBase = OTLPExporterBase; +//# sourceMappingURL=OTLPExporterBase.js.map - sint64: function read_sint64() { - return readLongVarint.call(this).zzDecode()[fn](false); - }, +/***/ }), - fixed64: function read_fixed64() { - return readFixed64.call(this)[fn](true); - }, +/***/ 11363: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - sfixed64: function read_sfixed64() { - return readFixed64.call(this)[fn](false); - } +"use strict"; - }); +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.invalidTimeout = exports.configureExporterTimeout = exports.appendRootPathToUrlIfNeeded = exports.appendResourcePathToUrl = exports.parseHeaders = exports.OTLPExporterError = exports.OTLPExporterBase = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +__exportStar(__nccwpck_require__(78959), exports); +var OTLPExporterBase_1 = __nccwpck_require__(67684); +Object.defineProperty(exports, "OTLPExporterBase", ({ enumerable: true, get: function () { return OTLPExporterBase_1.OTLPExporterBase; } })); +var types_1 = __nccwpck_require__(44111); +Object.defineProperty(exports, "OTLPExporterError", ({ enumerable: true, get: function () { return types_1.OTLPExporterError; } })); +var util_1 = __nccwpck_require__(14425); +Object.defineProperty(exports, "parseHeaders", ({ enumerable: true, get: function () { return util_1.parseHeaders; } })); +Object.defineProperty(exports, "appendResourcePathToUrl", ({ enumerable: true, get: function () { return util_1.appendResourcePathToUrl; } })); +Object.defineProperty(exports, "appendRootPathToUrlIfNeeded", ({ enumerable: true, get: function () { return util_1.appendRootPathToUrlIfNeeded; } })); +Object.defineProperty(exports, "configureExporterTimeout", ({ enumerable: true, get: function () { return util_1.configureExporterTimeout; } })); +Object.defineProperty(exports, "invalidTimeout", ({ enumerable: true, get: function () { return util_1.invalidTimeout; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 22819: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 24343: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = BufferReader; - -// extends Reader -var Reader = __nccwpck_require__(24576); -(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; - -var util = __nccwpck_require__(10329); - +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OTLPExporterBrowserBase = void 0; +const OTLPExporterBase_1 = __nccwpck_require__(67684); +const util_1 = __nccwpck_require__(14425); +const util_2 = __nccwpck_require__(29596); +const api_1 = __nccwpck_require__(65163); +const core_1 = __nccwpck_require__(89736); /** - * Constructs a new buffer reader instance. - * @classdesc Wire format reader using node buffers. - * @extends Reader - * @constructor - * @param {Buffer} buffer Buffer to read from + * Collector Metric Exporter abstract base class */ -function BufferReader(buffer) { - Reader.call(this, buffer); - +class OTLPExporterBrowserBase extends OTLPExporterBase_1.OTLPExporterBase { /** - * Read buffer. - * @name BufferReader#buf - * @type {Buffer} + * @param config */ + constructor(config = {}) { + super(config); + this._useXHR = false; + this._useXHR = + !!config.headers || typeof navigator.sendBeacon !== 'function'; + if (this._useXHR) { + this._headers = Object.assign({}, (0, util_1.parseHeaders)(config.headers), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)); + } + else { + this._headers = {}; + } + } + onInit() { } + onShutdown() { } + send(items, onSuccess, onError) { + if (this._shutdownOnce.isCalled) { + api_1.diag.debug('Shutdown already started. Cannot send objects'); + return; + } + const serviceRequest = this.convert(items); + const body = JSON.stringify(serviceRequest); + const promise = new Promise((resolve, reject) => { + if (this._useXHR) { + (0, util_2.sendWithXhr)(body, this.url, this._headers, this.timeoutMillis, resolve, reject); + } + else { + (0, util_2.sendWithBeacon)(body, this.url, { type: 'application/json' }, resolve, reject); + } + }).then(onSuccess, onError); + this._sendingPromises.push(promise); + const popPromise = () => { + const index = this._sendingPromises.indexOf(promise); + this._sendingPromises.splice(index, 1); + }; + promise.then(popPromise, popPromise); + } } +exports.OTLPExporterBrowserBase = OTLPExporterBrowserBase; +//# sourceMappingURL=OTLPExporterBrowserBase.js.map -BufferReader._configure = function () { - /* istanbul ignore else */ - if (util.Buffer) - BufferReader.prototype._slice = util.Buffer.prototype.slice; -}; +/***/ }), +/***/ 51979: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * @override - */ -BufferReader.prototype.string = function read_string_buffer() { - var len = this.uint32(); // modifies pos - return this.buf.utf8Slice - ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) - : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); -}; +"use strict"; -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @name BufferReader#bytes - * @function - * @returns {Buffer} Value read +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - -BufferReader._configure(); - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.sendWithXhr = exports.OTLPExporterBrowserBase = void 0; +var OTLPExporterBrowserBase_1 = __nccwpck_require__(24343); +Object.defineProperty(exports, "OTLPExporterBrowserBase", ({ enumerable: true, get: function () { return OTLPExporterBrowserBase_1.OTLPExporterBrowserBase; } })); +var util_1 = __nccwpck_require__(29596); +Object.defineProperty(exports, "sendWithXhr", ({ enumerable: true, get: function () { return util_1.sendWithXhr; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 38372: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 29596: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = Root; - -// extends Namespace -var Namespace = __nccwpck_require__(28131); -((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = "Root"; - -var Field = __nccwpck_require__(20577), - Enum = __nccwpck_require__(94299), - OneOf = __nccwpck_require__(51895), - util = __nccwpck_require__(93492); - -var Type, // cyclic - parse, // might be excluded - common; // " - -/** - * Constructs a new root namespace instance. - * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. - * @extends NamespaceBase - * @constructor - * @param {Object.} [options] Top level options +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.sendWithXhr = exports.sendWithBeacon = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -function Root(options) { - Namespace.call(this, "", options); - - /** - * Deferred extension fields. - * @type {Field[]} - */ - this.deferred = []; - - /** - * Resolved file names of loaded files. - * @type {string[]} - */ - this.files = []; -} - -/** - * Loads a namespace descriptor into a root namespace. - * @param {INamespace} json Nameespace descriptor - * @param {Root} [root] Root namespace, defaults to create a new one if omitted - * @returns {Root} Root namespace - */ -Root.fromJSON = function fromJSON(json, root) { - if (!root) - root = new Root(); - if (json.options) - root.setOptions(json.options); - return root.addJSON(json.nested); -}; - -/** - * Resolves the path of an imported file, relative to the importing origin. - * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories. - * @function - * @param {string} origin The file name of the importing file - * @param {string} target The file name being imported - * @returns {string|null} Resolved path to `target` or `null` to skip the file - */ -Root.prototype.resolvePath = util.path.resolve; - -/** - * Fetch content from file path or url - * This method exists so you can override it with your own logic. - * @function - * @param {string} path File path or url - * @param {FetchCallback} callback Callback function - * @returns {undefined} - */ -Root.prototype.fetch = util.fetch; - -// A symbol-like function to safely signal synchronous loading -/* istanbul ignore next */ -function SYNC() {} // eslint-disable-line no-empty-function - +const api_1 = __nccwpck_require__(65163); +const types_1 = __nccwpck_require__(44111); +const util_1 = __nccwpck_require__(14425); /** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} options Parse options - * @param {LoadCallback} callback Callback function - * @returns {undefined} + * Send metrics/spans using browser navigator.sendBeacon + * @param body + * @param url + * @param blobPropertyBag + * @param onSuccess + * @param onError */ -Root.prototype.load = function load(filename, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; +function sendWithBeacon(body, url, blobPropertyBag, onSuccess, onError) { + if (navigator.sendBeacon(url, new Blob([body], blobPropertyBag))) { + api_1.diag.debug('sendBeacon - can send', body); + onSuccess(); } - var self = this; - if (!callback) - return util.asPromise(load, self, filename, options); - - var sync = callback === SYNC; // undocumented - - // Finishes loading by calling the callback (exactly once) - function finish(err, root) { - /* istanbul ignore if */ - if (!callback) - return; - if (sync) - throw err; - var cb = callback; - callback = null; - cb(err, root); + else { + const error = new types_1.OTLPExporterError(`sendBeacon - cannot send ${body}`); + onError(error); } - - // Bundled definition existence checking - function getBundledFileName(filename) { - var idx = filename.lastIndexOf("google/protobuf/"); - if (idx > -1) { - var altname = filename.substring(idx); - if (altname in common) return altname; +} +exports.sendWithBeacon = sendWithBeacon; +/** + * function to send metrics/spans using browser XMLHttpRequest + * used when navigator.sendBeacon is not available + * @param body + * @param url + * @param headers + * @param onSuccess + * @param onError + */ +function sendWithXhr(body, url, headers, exporterTimeout, onSuccess, onError) { + let retryTimer; + let xhr; + let reqIsDestroyed = false; + const exporterTimer = setTimeout(() => { + clearTimeout(retryTimer); + reqIsDestroyed = true; + if (xhr.readyState === XMLHttpRequest.DONE) { + const err = new types_1.OTLPExporterError('Request Timeout'); + onError(err); } - return null; - } - - // Processes a single file - function process(filename, source) { - try { - if (util.isString(source) && source.charAt(0) === "{") - source = JSON.parse(source); - if (!util.isString(source)) - self.setOptions(source.options).addJSON(source.nested); - else { - parse.filename = filename; - var parsed = parse(source, self, options), - resolved, - i = 0; - if (parsed.imports) - for (; i < parsed.imports.length; ++i) - if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i])) - fetch(resolved); - if (parsed.weakImports) - for (i = 0; i < parsed.weakImports.length; ++i) - if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i])) - fetch(resolved, true); + else { + xhr.abort(); + } + }, exporterTimeout); + const sendWithRetry = (retries = util_1.DEFAULT_EXPORT_MAX_ATTEMPTS, minDelay = util_1.DEFAULT_EXPORT_INITIAL_BACKOFF) => { + xhr = new XMLHttpRequest(); + xhr.open('POST', url); + const defaultHeaders = { + Accept: 'application/json', + 'Content-Type': 'application/json', + }; + Object.entries(Object.assign(Object.assign({}, defaultHeaders), headers)).forEach(([k, v]) => { + xhr.setRequestHeader(k, v); + }); + xhr.send(body); + xhr.onreadystatechange = () => { + if (xhr.readyState === XMLHttpRequest.DONE && reqIsDestroyed === false) { + if (xhr.status >= 200 && xhr.status <= 299) { + api_1.diag.debug('xhr success', body); + onSuccess(); + clearTimeout(exporterTimer); + clearTimeout(retryTimer); + } + else if (xhr.status && (0, util_1.isExportRetryable)(xhr.status) && retries > 0) { + let retryTime; + minDelay = util_1.DEFAULT_EXPORT_BACKOFF_MULTIPLIER * minDelay; + // retry after interval specified in Retry-After header + if (xhr.getResponseHeader('Retry-After')) { + retryTime = (0, util_1.parseRetryAfterToMills)(xhr.getResponseHeader('Retry-After')); + } + else { + // exponential backoff with jitter + retryTime = Math.round(Math.random() * (util_1.DEFAULT_EXPORT_MAX_BACKOFF - minDelay) + minDelay); + } + retryTimer = setTimeout(() => { + sendWithRetry(retries - 1, minDelay); + }, retryTime); + } + else { + const error = new types_1.OTLPExporterError(`Failed to export with XHR (status: ${xhr.status})`, xhr.status); + onError(error); + clearTimeout(exporterTimer); + clearTimeout(retryTimer); + } } - } catch (err) { - finish(err); - } - if (!sync && !queued) - finish(null, self); // only once anyway - } - - // Fetches a single file - function fetch(filename, weak) { - filename = getBundledFileName(filename) || filename; - - // Skip if already loaded / attempted - if (self.files.indexOf(filename) > -1) - return; - self.files.push(filename); - - // Shortcut bundled definitions - if (filename in common) { - if (sync) - process(filename, common[filename]); - else { - ++queued; - setTimeout(function() { - --queued; - process(filename, common[filename]); - }); + }; + xhr.onabort = () => { + if (reqIsDestroyed) { + const err = new types_1.OTLPExporterError('Request Timeout'); + onError(err); } - return; - } - - // Otherwise fetch from disk or network - if (sync) { - var source; - try { - source = util.fs.readFileSync(filename).toString("utf8"); - } catch (err) { - if (!weak) - finish(err); - return; + clearTimeout(exporterTimer); + clearTimeout(retryTimer); + }; + xhr.onerror = () => { + if (reqIsDestroyed) { + const err = new types_1.OTLPExporterError('Request Timeout'); + onError(err); } - process(filename, source); - } else { - ++queued; - self.fetch(filename, function(err, source) { - --queued; - /* istanbul ignore if */ - if (!callback) - return; // terminated meanwhile - if (err) { - /* istanbul ignore else */ - if (!weak) - finish(err); - else if (!queued) // can't be covered reliably - finish(null, self); - return; - } - process(filename, source); - }); - } - } - var queued = 0; + clearTimeout(exporterTimer); + clearTimeout(retryTimer); + }; + }; + sendWithRetry(); +} +exports.sendWithXhr = sendWithXhr; +//# sourceMappingURL=util.js.map - // Assembling the root namespace doesn't require working type - // references anymore, so we can load everything in parallel - if (util.isString(filename)) - filename = [ filename ]; - for (var i = 0, resolved; i < filename.length; ++i) - if (resolved = self.resolvePath("", filename[i])) - fetch(resolved); +/***/ }), - if (sync) - return self; - if (!queued) - finish(null, self); - return undefined; -}; -// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined +/***/ 78959: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. - * @function Root#load - * @param {string|string[]} filename Names of one or multiple files to load - * @param {LoadCallback} callback Callback function - * @returns {undefined} - * @variation 2 - */ -// function load(filename:string, callback:LoadCallback):undefined +"use strict"; -/** - * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. - * @function Root#load - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {Promise} Promise - * @variation 3 +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -// function load(filename:string, [options:IParseOptions]):Promise +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.sendWithXhr = exports.OTLPExporterBrowserBase = exports.CompressionAlgorithm = exports.configureCompression = exports.createHttpAgent = exports.sendWithHttp = exports.OTLPExporterNodeBase = void 0; +var node_1 = __nccwpck_require__(22853); +Object.defineProperty(exports, "OTLPExporterNodeBase", ({ enumerable: true, get: function () { return node_1.OTLPExporterNodeBase; } })); +Object.defineProperty(exports, "sendWithHttp", ({ enumerable: true, get: function () { return node_1.sendWithHttp; } })); +Object.defineProperty(exports, "createHttpAgent", ({ enumerable: true, get: function () { return node_1.createHttpAgent; } })); +Object.defineProperty(exports, "configureCompression", ({ enumerable: true, get: function () { return node_1.configureCompression; } })); +Object.defineProperty(exports, "CompressionAlgorithm", ({ enumerable: true, get: function () { return node_1.CompressionAlgorithm; } })); +var browser_1 = __nccwpck_require__(51979); +Object.defineProperty(exports, "OTLPExporterBrowserBase", ({ enumerable: true, get: function () { return browser_1.OTLPExporterBrowserBase; } })); +Object.defineProperty(exports, "sendWithXhr", ({ enumerable: true, get: function () { return browser_1.sendWithXhr; } })); +//# sourceMappingURL=index.js.map -/** - * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). - * @function Root#loadSync - * @param {string|string[]} filename Names of one or multiple files to load - * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. - * @returns {Root} Root namespace - * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid - */ -Root.prototype.loadSync = function loadSync(filename, options) { - if (!util.isNode) - throw Error("not supported"); - return this.load(filename, options, SYNC); -}; +/***/ }), -/** - * @override - */ -Root.prototype.resolveAll = function resolveAll() { - if (this.deferred.length) - throw Error("unresolvable extensions: " + this.deferred.map(function(field) { - return "'extend " + field.extend + "' in " + field.parent.fullName; - }).join(", ")); - return Namespace.prototype.resolveAll.call(this); -}; +/***/ 75780: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// only uppercased (and thus conflict-free) children are exposed, see below -var exposeRe = /^[A-Z]/; +"use strict"; -/** - * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type. - * @param {Root} root Root instance - * @param {Field} field Declaring extension field witin the declaring type - * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise - * @inner - * @ignore +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -function tryHandleExtension(root, field) { - var extendedType = field.parent.lookup(field.extend); - if (extendedType) { - var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options); - //do not allow to extend same field twice to prevent the error - if (extendedType.get(sisterField.name)) { - return true; - } - sisterField.declaringField = field; - field.extensionField = sisterField; - extendedType.add(sisterField); - return true; - } - return false; -} - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OTLPExporterNodeBase = void 0; +const OTLPExporterBase_1 = __nccwpck_require__(67684); +const util_1 = __nccwpck_require__(14425); +const util_2 = __nccwpck_require__(58926); +const api_1 = __nccwpck_require__(65163); +const core_1 = __nccwpck_require__(89736); /** - * Called when any object is added to this root or its sub-namespaces. - * @param {ReflectionObject} object Object added - * @returns {undefined} - * @private + * Collector Metric Exporter abstract base class */ -Root.prototype._handleAdd = function _handleAdd(object) { - if (object instanceof Field) { - - if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField) - if (!tryHandleExtension(this, object)) - this.deferred.push(object); - - } else if (object instanceof Enum) { - - if (exposeRe.test(object.name)) - object.parent[object.name] = object.values; // expose enum values as property of its parent - - } else if (!(object instanceof OneOf)) /* everything else is a namespace */ { - - if (object instanceof Type) // Try to handle any deferred extensions - for (var i = 0; i < this.deferred.length;) - if (tryHandleExtension(this, this.deferred[i])) - this.deferred.splice(i, 1); - else - ++i; - for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace - this._handleAdd(object._nestedArray[j]); - if (exposeRe.test(object.name)) - object.parent[object.name] = object; // expose namespace as property of its parent +class OTLPExporterNodeBase extends OTLPExporterBase_1.OTLPExporterBase { + constructor(config = {}) { + super(config); + this.DEFAULT_HEADERS = {}; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (config.metadata) { + api_1.diag.warn('Metadata cannot be set when using http'); + } + this.headers = Object.assign(this.DEFAULT_HEADERS, (0, util_1.parseHeaders)(config.headers), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)); + this.agent = (0, util_2.createHttpAgent)(config); + this.compression = (0, util_2.configureCompression)(config.compression); } - - // The above also adds uppercased (and thus conflict-free) nested types, services and enums as - // properties of namespaces just like static code does. This allows using a .d.ts generated for - // a static module with reflection-based solutions where the condition is met. -}; - -/** - * Called when any object is removed from this root or its sub-namespaces. - * @param {ReflectionObject} object Object removed - * @returns {undefined} - * @private - */ -Root.prototype._handleRemove = function _handleRemove(object) { - if (object instanceof Field) { - - if (/* an extension field */ object.extend !== undefined) { - if (/* already handled */ object.extensionField) { // remove its sister field - object.extensionField.parent.remove(object.extensionField); - object.extensionField = null; - } else { // cancel the extension - var index = this.deferred.indexOf(object); - /* istanbul ignore else */ - if (index > -1) - this.deferred.splice(index, 1); - } + onInit(_config) { } + send(objects, onSuccess, onError) { + if (this._shutdownOnce.isCalled) { + api_1.diag.debug('Shutdown already started. Cannot send objects'); + return; } - - } else if (object instanceof Enum) { - - if (exposeRe.test(object.name)) - delete object.parent[object.name]; // unexpose enum values - - } else if (object instanceof Namespace) { - - for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace - this._handleRemove(object._nestedArray[i]); - - if (exposeRe.test(object.name)) - delete object.parent[object.name]; // unexpose namespaces - + const serviceRequest = this.convert(objects); + const promise = new Promise((resolve, reject) => { + (0, util_2.sendWithHttp)(this, JSON.stringify(serviceRequest), 'application/json', resolve, reject); + }).then(onSuccess, onError); + this._sendingPromises.push(promise); + const popPromise = () => { + const index = this._sendingPromises.indexOf(promise); + this._sendingPromises.splice(index, 1); + }; + promise.then(popPromise, popPromise); } -}; - -// Sets up cyclic dependencies (called in index-light) -Root._configure = function(Type_, parse_, common_) { - Type = Type_; - parse = parse_; - common = common_; -}; - + onShutdown() { } +} +exports.OTLPExporterNodeBase = OTLPExporterNodeBase; +//# sourceMappingURL=OTLPExporterNodeBase.js.map /***/ }), -/***/ 1878: -/***/ ((module) => { +/***/ 22853: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = {}; - -/** - * Named roots. - * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). - * Can also be used manually to make roots available across modules. - * @name roots - * @type {Object.} - * @example - * // pbjs -r myroot -o compiled.js ... +/* + * Copyright The OpenTelemetry Authors * - * // in another module: - * require("./compiled.js"); + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * // in any subsequent module: - * var root = protobuf.roots["myroot"]; + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CompressionAlgorithm = exports.configureCompression = exports.createHttpAgent = exports.sendWithHttp = exports.OTLPExporterNodeBase = void 0; +var OTLPExporterNodeBase_1 = __nccwpck_require__(75780); +Object.defineProperty(exports, "OTLPExporterNodeBase", ({ enumerable: true, get: function () { return OTLPExporterNodeBase_1.OTLPExporterNodeBase; } })); +var util_1 = __nccwpck_require__(58926); +Object.defineProperty(exports, "sendWithHttp", ({ enumerable: true, get: function () { return util_1.sendWithHttp; } })); +Object.defineProperty(exports, "createHttpAgent", ({ enumerable: true, get: function () { return util_1.createHttpAgent; } })); +Object.defineProperty(exports, "configureCompression", ({ enumerable: true, get: function () { return util_1.configureCompression; } })); +var types_1 = __nccwpck_require__(96572); +Object.defineProperty(exports, "CompressionAlgorithm", ({ enumerable: true, get: function () { return types_1.CompressionAlgorithm; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 56967: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 96572: +/***/ ((__unused_webpack_module, exports) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CompressionAlgorithm = void 0; +var CompressionAlgorithm; +(function (CompressionAlgorithm) { + CompressionAlgorithm["NONE"] = "none"; + CompressionAlgorithm["GZIP"] = "gzip"; +})(CompressionAlgorithm = exports.CompressionAlgorithm || (exports.CompressionAlgorithm = {})); +//# sourceMappingURL=types.js.map -/** - * Streaming RPC helpers. - * @namespace - */ -var rpc = exports; +/***/ }), -/** - * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. - * @typedef RPCImpl - * @type {function} - * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called - * @param {Uint8Array} requestData Request data - * @param {RPCImplCallback} callback Callback function - * @returns {undefined} - * @example - * function rpcImpl(method, requestData, callback) { - * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code - * throw Error("no such method"); - * asynchronouslyObtainAResponse(requestData, function(err, responseData) { - * callback(err, responseData); - * }); - * } - */ - -/** - * Node-style callback as used by {@link RPCImpl}. - * @typedef RPCImplCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error - * @returns {undefined} - */ - -rpc.Service = __nccwpck_require__(18113); - - -/***/ }), - -/***/ 18113: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 58926: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = Service; - -var util = __nccwpck_require__(10329); - -// Extends EventEmitter -(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; - -/** - * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.configureCompression = exports.createHttpAgent = exports.sendWithHttp = void 0; +/* + * Copyright The OpenTelemetry Authors * - * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. - * @typedef rpc.ServiceMethodCallback - * @template TRes extends Message - * @type {function} - * @param {Error|null} error Error, if any - * @param {TRes} [response] Response message - * @returns {undefined} - */ - -/** - * A service method part of a {@link rpc.Service} as created by {@link Service.create}. - * @typedef rpc.ServiceMethod - * @template TReq extends Message - * @template TRes extends Message - * @type {function} - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message - * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` - */ - -/** - * Constructs a new RPC service instance. - * @classdesc An RPC service as returned by {@link Service#create}. - * @exports rpc.Service - * @extends util.EventEmitter - * @constructor - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -function Service(rpcImpl, requestDelimited, responseDelimited) { - - if (typeof rpcImpl !== "function") - throw TypeError("rpcImpl must be a function"); - - util.EventEmitter.call(this); - - /** - * RPC implementation. Becomes `null` once the service is ended. - * @type {RPCImpl|null} - */ - this.rpcImpl = rpcImpl; - - /** - * Whether requests are length-delimited. - * @type {boolean} - */ - this.requestDelimited = Boolean(requestDelimited); - - /** - * Whether responses are length-delimited. - * @type {boolean} - */ - this.responseDelimited = Boolean(responseDelimited); -} - +const url = __nccwpck_require__(57310); +const http = __nccwpck_require__(13685); +const https = __nccwpck_require__(95687); +const zlib = __nccwpck_require__(59796); +const stream_1 = __nccwpck_require__(12781); +const api_1 = __nccwpck_require__(65163); +const types_1 = __nccwpck_require__(96572); +const core_1 = __nccwpck_require__(89736); +const types_2 = __nccwpck_require__(44111); +const util_1 = __nccwpck_require__(14425); /** - * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. - * @param {Method|rpc.ServiceMethod} method Reflected or static method - * @param {Constructor} requestCtor Request constructor - * @param {Constructor} responseCtor Response constructor - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} callback Service callback - * @returns {undefined} - * @template TReq extends Message - * @template TRes extends Message + * Sends data using http + * @param collector + * @param data + * @param contentType + * @param onSuccess + * @param onError */ -Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { - - if (!request) - throw TypeError("request must be specified"); - - var self = this; - if (!callback) - return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); - - if (!self.rpcImpl) { - setTimeout(function() { callback(Error("already ended")); }, 0); - return undefined; - } - - try { - return self.rpcImpl( - method, - requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), - function rpcCallback(err, response) { - - if (err) { - self.emit("error", err, method); - return callback(err); - } - - if (response === null) { - self.end(/* endedByRPC */ true); - return undefined; +function sendWithHttp(collector, data, contentType, onSuccess, onError) { + const exporterTimeout = collector.timeoutMillis; + const parsedUrl = new url.URL(collector.url); + const nodeVersion = Number(process.versions.node.split('.')[0]); + let retryTimer; + let req; + let reqIsDestroyed = false; + const exporterTimer = setTimeout(() => { + clearTimeout(retryTimer); + reqIsDestroyed = true; + if (req.destroyed) { + const err = new types_2.OTLPExporterError('Request Timeout'); + onError(err); + } + else { + // req.abort() was deprecated since v14 + nodeVersion >= 14 ? req.destroy() : req.abort(); + } + }, exporterTimeout); + const options = { + hostname: parsedUrl.hostname, + port: parsedUrl.port, + path: parsedUrl.pathname, + method: 'POST', + headers: Object.assign({ 'Content-Type': contentType }, collector.headers), + agent: collector.agent, + }; + const request = parsedUrl.protocol === 'http:' ? http.request : https.request; + const sendWithRetry = (retries = util_1.DEFAULT_EXPORT_MAX_ATTEMPTS, minDelay = util_1.DEFAULT_EXPORT_INITIAL_BACKOFF) => { + req = request(options, (res) => { + let responseData = ''; + res.on('data', chunk => (responseData += chunk)); + res.on('aborted', () => { + if (reqIsDestroyed) { + const err = new types_2.OTLPExporterError('Request Timeout'); + onError(err); } - - if (!(response instanceof responseCtor)) { - try { - response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); - } catch (err) { - self.emit("error", err, method); - return callback(err); + }); + res.on('end', () => { + if (reqIsDestroyed === false) { + if (res.statusCode && res.statusCode < 299) { + api_1.diag.debug(`statusCode: ${res.statusCode}`, responseData); + onSuccess(); + // clear all timers since request was completed and promise was resolved + clearTimeout(exporterTimer); + clearTimeout(retryTimer); + } + else if (res.statusCode && + (0, util_1.isExportRetryable)(res.statusCode) && + retries > 0) { + let retryTime; + minDelay = util_1.DEFAULT_EXPORT_BACKOFF_MULTIPLIER * minDelay; + // retry after interval specified in Retry-After header + if (res.headers['retry-after']) { + retryTime = (0, util_1.parseRetryAfterToMills)(res.headers['retry-after']); + } + else { + // exponential backoff with jitter + retryTime = Math.round(Math.random() * (util_1.DEFAULT_EXPORT_MAX_BACKOFF - minDelay) + + minDelay); + } + retryTimer = setTimeout(() => { + sendWithRetry(retries - 1, minDelay); + }, retryTime); + } + else { + const error = new types_2.OTLPExporterError(res.statusMessage, res.statusCode, responseData); + onError(error); + // clear all timers since request was completed and promise was resolved + clearTimeout(exporterTimer); + clearTimeout(retryTimer); } } - - self.emit("data", response, method); - return callback(null, response); + }); + }); + req.on('error', (error) => { + if (reqIsDestroyed) { + const err = new types_2.OTLPExporterError('Request Timeout', error.code); + onError(err); } - ); - } catch (err) { - self.emit("error", err, method); - setTimeout(function() { callback(err); }, 0); + else { + onError(error); + } + clearTimeout(exporterTimer); + clearTimeout(retryTimer); + }); + req.on('abort', () => { + if (reqIsDestroyed) { + const err = new types_2.OTLPExporterError('Request Timeout'); + onError(err); + } + clearTimeout(exporterTimer); + clearTimeout(retryTimer); + }); + switch (collector.compression) { + case types_1.CompressionAlgorithm.GZIP: { + req.setHeader('Content-Encoding', 'gzip'); + const dataStream = readableFromBuffer(data); + dataStream + .on('error', onError) + .pipe(zlib.createGzip()) + .on('error', onError) + .pipe(req); + break; + } + default: + req.end(data); + break; + } + }; + sendWithRetry(); +} +exports.sendWithHttp = sendWithHttp; +function readableFromBuffer(buff) { + const readable = new stream_1.Readable(); + readable.push(buff); + readable.push(null); + return readable; +} +function createHttpAgent(config) { + if (config.httpAgentOptions && config.keepAlive === false) { + api_1.diag.warn('httpAgentOptions is used only when keepAlive is true'); return undefined; } -}; - -/** - * Ends this service and emits the `end` event. - * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. - * @returns {rpc.Service} `this` - */ -Service.prototype.end = function end(endedByRPC) { - if (this.rpcImpl) { - if (!endedByRPC) // signal end to rpcImpl - this.rpcImpl(null, null, null); - this.rpcImpl = null; - this.emit("end").off(); + if (config.keepAlive === false || !config.url) + return undefined; + try { + const parsedUrl = new url.URL(config.url); + const Agent = parsedUrl.protocol === 'http:' ? http.Agent : https.Agent; + return new Agent(Object.assign({ keepAlive: true }, config.httpAgentOptions)); } - return this; -}; - + catch (err) { + api_1.diag.error(`collector exporter failed to create http agent. err: ${err.message}`); + return undefined; + } +} +exports.createHttpAgent = createHttpAgent; +function configureCompression(compression) { + if (compression) { + return compression; + } + else { + const definedCompression = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION || + (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION; + return definedCompression === types_1.CompressionAlgorithm.GZIP + ? types_1.CompressionAlgorithm.GZIP + : types_1.CompressionAlgorithm.NONE; + } +} +exports.configureCompression = configureCompression; +//# sourceMappingURL=util.js.map /***/ }), -/***/ 86269: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 44111: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = Service; - -// extends Namespace -var Namespace = __nccwpck_require__(28131); -((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = "Service"; - -var Method = __nccwpck_require__(86814), - util = __nccwpck_require__(93492), - rpc = __nccwpck_require__(56967); - +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OTLPExporterError = void 0; /** - * Constructs a new service instance. - * @classdesc Reflected service. - * @extends NamespaceBase - * @constructor - * @param {string} name Service name - * @param {Object.} [options] Service options - * @throws {TypeError} If arguments are invalid + * Interface for handling error */ -function Service(name, options) { - Namespace.call(this, name, options); +class OTLPExporterError extends Error { + constructor(message, code, data) { + super(message); + this.name = 'OTLPExporterError'; + this.data = data; + this.code = code; + } +} +exports.OTLPExporterError = OTLPExporterError; +//# sourceMappingURL=types.js.map - /** - * Service methods. - * @type {Object.} - */ - this.methods = {}; // toJSON, marker +/***/ }), - /** - * Cached methods as an array. - * @type {Method[]|null} - * @private - */ - this._methodsArray = null; -} +/***/ 14425: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Service descriptor. - * @interface IService - * @extends INamespace - * @property {Object.} methods Method descriptors - */ +"use strict"; -/** - * Constructs a service from a service descriptor. - * @param {string} name Service name - * @param {IService} json Service descriptor - * @returns {Service} Created service - * @throws {TypeError} If arguments are invalid +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -Service.fromJSON = function fromJSON(name, json) { - var service = new Service(name, json.options); - /* istanbul ignore else */ - if (json.methods) - for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i) - service.add(Method.fromJSON(names[i], json.methods[names[i]])); - if (json.nested) - service.addJSON(json.nested); - service.comment = json.comment; - return service; -}; - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseRetryAfterToMills = exports.isExportRetryable = exports.invalidTimeout = exports.configureExporterTimeout = exports.appendRootPathToUrlIfNeeded = exports.appendResourcePathToUrl = exports.parseHeaders = exports.DEFAULT_EXPORT_BACKOFF_MULTIPLIER = exports.DEFAULT_EXPORT_MAX_BACKOFF = exports.DEFAULT_EXPORT_INITIAL_BACKOFF = exports.DEFAULT_EXPORT_MAX_ATTEMPTS = void 0; +const api_1 = __nccwpck_require__(65163); +const core_1 = __nccwpck_require__(89736); +const DEFAULT_TRACE_TIMEOUT = 10000; +exports.DEFAULT_EXPORT_MAX_ATTEMPTS = 5; +exports.DEFAULT_EXPORT_INITIAL_BACKOFF = 1000; +exports.DEFAULT_EXPORT_MAX_BACKOFF = 5000; +exports.DEFAULT_EXPORT_BACKOFF_MULTIPLIER = 1.5; /** - * Converts this service to a service descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IService} Service descriptor + * Parses headers from config leaving only those that have defined values + * @param partialHeaders */ -Service.prototype.toJSON = function toJSON(toJSONOptions) { - var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "options" , inherited && inherited.options || undefined, - "methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {}, - "nested" , inherited && inherited.nested || undefined, - "comment" , keepComments ? this.comment : undefined - ]); -}; - +function parseHeaders(partialHeaders = {}) { + const headers = {}; + Object.entries(partialHeaders).forEach(([key, value]) => { + if (typeof value !== 'undefined') { + headers[key] = String(value); + } + else { + api_1.diag.warn(`Header "${key}" has invalid value (${value}) and will be ignored`); + } + }); + return headers; +} +exports.parseHeaders = parseHeaders; /** - * Methods of this service as an array for iteration. - * @name Service#methodsArray - * @type {Method[]} - * @readonly + * Adds path (version + signal) to a no per-signal endpoint + * @param url + * @param path + * @returns url + path */ -Object.defineProperty(Service.prototype, "methodsArray", { - get: function() { - return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); +function appendResourcePathToUrl(url, path) { + if (!url.endsWith('/')) { + url = url + '/'; } -}); - -function clearCache(service) { - service._methodsArray = null; - return service; + return url + path; } - -/** - * @override - */ -Service.prototype.get = function get(name) { - return this.methods[name] - || Namespace.prototype.get.call(this, name); -}; - -/** - * @override - */ -Service.prototype.resolveAll = function resolveAll() { - var methods = this.methodsArray; - for (var i = 0; i < methods.length; ++i) - methods[i].resolve(); - return Namespace.prototype.resolve.call(this); -}; - +exports.appendResourcePathToUrl = appendResourcePathToUrl; /** - * @override + * Adds root path to signal specific endpoint when endpoint contains no path part and no root path + * @param url + * @returns url */ -Service.prototype.add = function add(object) { - - /* istanbul ignore if */ - if (this.get(object.name)) - throw Error("duplicate name '" + object.name + "' in " + this); - - if (object instanceof Method) { - this.methods[object.name] = object; - object.parent = this; - return clearCache(this); +function appendRootPathToUrlIfNeeded(url) { + try { + const parsedUrl = new URL(url); + if (parsedUrl.pathname === '') { + parsedUrl.pathname = parsedUrl.pathname + '/'; + } + return parsedUrl.toString(); } - return Namespace.prototype.add.call(this, object); -}; - -/** - * @override - */ -Service.prototype.remove = function remove(object) { - if (object instanceof Method) { - - /* istanbul ignore if */ - if (this.methods[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.methods[object.name]; - object.parent = null; - return clearCache(this); + catch (_a) { + api_1.diag.warn(`Could not parse export URL: '${url}'`); + return url; } - return Namespace.prototype.remove.call(this, object); -}; - +} +exports.appendRootPathToUrlIfNeeded = appendRootPathToUrlIfNeeded; /** - * Creates a runtime service using the specified rpc implementation. - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed. + * Configure exporter trace timeout value from passed in value or environment variables + * @param timeoutMillis + * @returns timeout value in milliseconds */ -Service.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) { - var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited); - for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) { - var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, ""); - rpcService[methodName] = util.codegen(["r","c"], util.isReserved(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({ - m: method, - q: method.resolvedRequestType.ctor, - s: method.resolvedResponseType.ctor - }); +function configureExporterTimeout(timeoutMillis) { + if (typeof timeoutMillis === 'number') { + if (timeoutMillis <= 0) { + // OTLP exporter configured timeout - using default value of 10000ms + return invalidTimeout(timeoutMillis, DEFAULT_TRACE_TIMEOUT); + } + return timeoutMillis; } - return rpcService; -}; - + else { + return getExporterTimeoutFromEnv(); + } +} +exports.configureExporterTimeout = configureExporterTimeout; +function getExporterTimeoutFromEnv() { + var _a; + const definedTimeout = Number((_a = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT) !== null && _a !== void 0 ? _a : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT); + if (definedTimeout <= 0) { + // OTLP exporter configured timeout - using default value of 10000ms + return invalidTimeout(definedTimeout, DEFAULT_TRACE_TIMEOUT); + } + else { + return definedTimeout; + } +} +// OTLP exporter configured timeout - using default value of 10000ms +function invalidTimeout(timeout, defaultTimeout) { + api_1.diag.warn('Timeout must be greater than 0', timeout); + return defaultTimeout; +} +exports.invalidTimeout = invalidTimeout; +function isExportRetryable(statusCode) { + const retryCodes = [429, 502, 503, 504]; + return retryCodes.includes(statusCode); +} +exports.isExportRetryable = isExportRetryable; +function parseRetryAfterToMills(retryAfter) { + if (retryAfter == null) { + return -1; + } + const seconds = Number.parseInt(retryAfter, 10); + if (Number.isInteger(seconds)) { + return seconds > 0 ? seconds * 1000 : -1; + } + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After#directives + const delay = new Date(retryAfter).getTime() - Date.now(); + if (delay >= 0) { + return delay; + } + return 0; +} +exports.parseRetryAfterToMills = parseRetryAfterToMills; +//# sourceMappingURL=util.js.map /***/ }), -/***/ 68857: -/***/ ((module) => { +/***/ 5255: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = tokenize; - -var delimRe = /[\s{}=;:[\],'"()<>]/g, - stringDoubleRe = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, - stringSingleRe = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g; - -var setCommentRe = /^ *[*/]+ */, - setCommentAltRe = /^\s*\*?\/*/, - setCommentSplitRe = /\n/g, - whitespaceRe = /\s/, - unescapeRe = /\\(.?)/g; - -var unescapeMap = { - "0": "\0", - "r": "\r", - "n": "\n", - "t": "\t" -}; - -/** - * Unescapes a string. - * @param {string} str String to unescape - * @returns {string} Unescaped string - * @property {Object.} map Special characters map - * @memberof tokenize - */ -function unescape(str) { - return str.replace(unescapeRe, function($0, $1) { - switch ($1) { - case "\\": - case "": - return $1; - default: - return unescapeMap[$1] || ""; - } - }); -} - -tokenize.unescape = unescape; - -/** - * Gets the next token and advances. - * @typedef TokenizerHandleNext - * @type {function} - * @returns {string|null} Next token or `null` on eof - */ - -/** - * Peeks for the next token. - * @typedef TokenizerHandlePeek - * @type {function} - * @returns {string|null} Next token or `null` on eof - */ - -/** - * Pushes a token back to the stack. - * @typedef TokenizerHandlePush - * @type {function} - * @param {string} token Token - * @returns {undefined} - */ - -/** - * Skips the next token. - * @typedef TokenizerHandleSkip - * @type {function} - * @param {string} expected Expected token - * @param {boolean} [optional=false] If optional - * @returns {boolean} Whether the token matched - * @throws {Error} If the token didn't match and is not optional - */ - -/** - * Gets the comment on the previous line or, alternatively, the line comment on the specified line. - * @typedef TokenizerHandleCmnt - * @type {function} - * @param {number} [line] Line number - * @returns {string|null} Comment text or `null` if none - */ - -/** - * Handle object returned from {@link tokenize}. - * @interface ITokenizerHandle - * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof) - * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof) - * @property {TokenizerHandlePush} push Pushes a token back to the stack - * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws - * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any - * @property {number} line Current line number +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OTLPGRPCExporterNodeBase = void 0; +const api_1 = __nccwpck_require__(65163); +const core_1 = __nccwpck_require__(89736); +const otlp_exporter_base_1 = __nccwpck_require__(11363); +const grpc_exporter_transport_1 = __nccwpck_require__(2418); +const util_1 = __nccwpck_require__(66394); /** - * Tokenizes the given .proto source and returns an object with useful utility functions. - * @param {string} source Source contents - * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode. - * @returns {ITokenizerHandle} Tokenizer handle + * OTLP Exporter abstract base class */ -function tokenize(source, alternateCommentMode) { - /* eslint-disable callback-return */ - source = source.toString(); - - var offset = 0, - length = source.length, - line = 1, - lastCommentLine = 0, - comments = {}; - - var stack = []; - - var stringDelim = null; - - /* istanbul ignore next */ - /** - * Creates an error for illegal syntax. - * @param {string} subject Subject - * @returns {Error} Error created - * @inner - */ - function illegal(subject) { - return Error("illegal " + subject + " (line " + line + ")"); - } - - /** - * Reads a string till its end. - * @returns {string} String read - * @inner - */ - function readString() { - var re = stringDelim === "'" ? stringSingleRe : stringDoubleRe; - re.lastIndex = offset - 1; - var match = re.exec(source); - if (!match) - throw illegal("string"); - offset = re.lastIndex; - push(stringDelim); - stringDelim = null; - return unescape(match[1]); - } - - /** - * Gets the character at `pos` within the source. - * @param {number} pos Position - * @returns {string} Character - * @inner - */ - function charAt(pos) { - return source.charAt(pos); - } - - /** - * Sets the current comment text. - * @param {number} start Start offset - * @param {number} end End offset - * @param {boolean} isLeading set if a leading comment - * @returns {undefined} - * @inner - */ - function setComment(start, end, isLeading) { - var comment = { - type: source.charAt(start++), - lineEmpty: false, - leading: isLeading, - }; - var lookback; - if (alternateCommentMode) { - lookback = 2; // alternate comment parsing: "//" or "/*" - } else { - lookback = 3; // "///" or "/**" +class OTLPGRPCExporterNodeBase extends otlp_exporter_base_1.OTLPExporterBase { + constructor(config = {}, signalSpecificMetadata, grpcName, grpcPath, serializer) { + var _a; + super(config); + this.grpcQueue = []; + this._serializer = serializer; + if (config.headers) { + api_1.diag.warn('Headers cannot be set when using grpc'); } - var commentOffset = start - lookback, - c; - do { - if (--commentOffset < 0 || - (c = source.charAt(commentOffset)) === "\n") { - comment.lineEmpty = true; - break; - } - } while (c === " " || c === "\t"); - var lines = source - .substring(start, end) - .split(setCommentSplitRe); - for (var i = 0; i < lines.length; ++i) - lines[i] = lines[i] - .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, "") - .trim(); - comment.text = lines - .join("\n") - .trim(); - - comments[line] = comment; - lastCommentLine = line; - } - - function isDoubleSlashCommentLine(startOffset) { - var endOffset = findEndOfLine(startOffset); - - // see if remaining line matches comment pattern - var lineText = source.substring(startOffset, endOffset); - var isComment = /^\s*\/\//.test(lineText); - return isComment; - } - - function findEndOfLine(cursor) { - // find end of cursor's line - var endOffset = cursor; - while (endOffset < length && charAt(endOffset) !== "\n") { - endOffset++; + const nonSignalSpecificMetadata = core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS); + const rawMetadata = Object.assign({}, nonSignalSpecificMetadata, signalSpecificMetadata); + let credentialProvider = () => { + return (0, util_1.configureCredentials)(undefined, this.getUrlFromConfig(config)); + }; + if (config.credentials != null) { + const credentials = config.credentials; + credentialProvider = () => { + return credentials; + }; } - return endOffset; - } - - /** - * Obtains the next token. - * @returns {string|null} Next token or `null` on eof - * @inner - */ - function next() { - if (stack.length > 0) - return stack.shift(); - if (stringDelim) - return readString(); - var repeat, - prev, - curr, - start, - isDoc, - isLeadingComment = offset === 0; - do { - if (offset === length) - return null; - repeat = false; - while (whitespaceRe.test(curr = charAt(offset))) { - if (curr === "\n") { - isLeadingComment = true; - ++line; - } - if (++offset === length) - return null; - } - - if (charAt(offset) === "/") { - if (++offset === length) { - throw illegal("comment"); - } - if (charAt(offset) === "/") { // Line - if (!alternateCommentMode) { - // check for triple-slash comment - isDoc = charAt(start = offset + 1) === "/"; - - while (charAt(++offset) !== "\n") { - if (offset === length) { - return null; - } - } - ++offset; - if (isDoc) { - setComment(start, offset - 1, isLeadingComment); - // Trailing comment cannot not be multi-line, - // so leading comment state should be reset to handle potential next comments - isLeadingComment = true; - } - ++line; - repeat = true; - } else { - // check for double-slash comments, consolidating consecutive lines - start = offset; - isDoc = false; - if (isDoubleSlashCommentLine(offset - 1)) { - isDoc = true; - do { - offset = findEndOfLine(offset); - if (offset === length) { - break; - } - offset++; - if (!isLeadingComment) { - // Trailing comment cannot not be multi-line - break; - } - } while (isDoubleSlashCommentLine(offset)); - } else { - offset = Math.min(length, findEndOfLine(offset) + 1); - } - if (isDoc) { - setComment(start, offset, isLeadingComment); - isLeadingComment = true; - } - line++; - repeat = true; - } - } else if ((curr = charAt(offset)) === "*") { /* Block */ - // check for /** (regular comment mode) or /* (alternate comment mode) - start = offset + 1; - isDoc = alternateCommentMode || charAt(start) === "*"; - do { - if (curr === "\n") { - ++line; - } - if (++offset === length) { - throw illegal("comment"); - } - prev = curr; - curr = charAt(offset); - } while (prev !== "*" || curr !== "/"); - ++offset; - if (isDoc) { - setComment(start, offset - 2, isLeadingComment); - isLeadingComment = true; - } - repeat = true; - } else { - return "/"; + // Ensure we don't modify the original. + const configMetadata = (_a = config.metadata) === null || _a === void 0 ? void 0 : _a.clone(); + const metadataProvider = () => { + const metadata = configMetadata !== null && configMetadata !== void 0 ? configMetadata : (0, grpc_exporter_transport_1.createEmptyMetadata)(); + for (const [key, value] of Object.entries(rawMetadata)) { + // only override with env var data if the key has no values. + // not using Metadata.merge() as it will keep both values. + if (metadata.get(key).length < 1) { + metadata.set(key, value); } } - } while (repeat); - - // offset !== length if we got here - - var end = offset; - delimRe.lastIndex = 0; - var delim = delimRe.test(charAt(end++)); - if (!delim) - while (end < length && !delimRe.test(charAt(end))) - ++end; - var token = source.substring(offset, offset = end); - if (token === "\"" || token === "'") - stringDelim = token; - return token; + return metadata; + }; + this.compression = (0, util_1.configureCompression)(config.compression); + this._transport = new grpc_exporter_transport_1.GrpcExporterTransport({ + address: this.getDefaultUrl(config), + compression: this.compression, + credentials: credentialProvider, + grpcName: grpcName, + grpcPath: grpcPath, + metadata: metadataProvider, + timeoutMillis: this.timeoutMillis, + }); } - - /** - * Pushes a token back to the stack. - * @param {string} token Token - * @returns {undefined} - * @inner - */ - function push(token) { - stack.push(token); + onInit() { + // Intentionally left empty; nothing to do. } - - /** - * Peeks for the next token. - * @returns {string|null} Token or `null` on eof - * @inner - */ - function peek() { - if (!stack.length) { - var token = next(); - if (token === null) - return null; - push(token); - } - return stack[0]; + onShutdown() { + this._transport.shutdown(); } - - /** - * Skips a token. - * @param {string} expected Expected token - * @param {boolean} [optional=false] Whether the token is optional - * @returns {boolean} `true` when skipped, `false` if not - * @throws {Error} When a required token is not present - * @inner - */ - function skip(expected, optional) { - var actual = peek(), - equals = actual === expected; - if (equals) { - next(); - return true; + send(objects, onSuccess, onError) { + if (this._shutdownOnce.isCalled) { + api_1.diag.debug('Shutdown already started. Cannot send objects'); + return; } - if (!optional) - throw illegal("token '" + actual + "', '" + expected + "' expected"); - return false; - } - - /** - * Gets a comment. - * @param {number} [trailingLine] Line number if looking for a trailing comment - * @returns {string|null} Comment text - * @inner - */ - function cmnt(trailingLine) { - var ret = null; - var comment; - if (trailingLine === undefined) { - comment = comments[line - 1]; - delete comments[line - 1]; - if (comment && (alternateCommentMode || comment.type === "*" || comment.lineEmpty)) { - ret = comment.leading ? comment.text : null; - } - } else { - /* istanbul ignore else */ - if (lastCommentLine < trailingLine) { - peek(); + const converted = this.convert(objects); + const data = this._serializer.serializeRequest(converted); + if (data == null) { + onError(new Error('Could not serialize message')); + return; + } + const promise = this._transport.send(data).then(response => { + if (response.status === 'success') { + onSuccess(); + return; } - comment = comments[trailingLine]; - delete comments[trailingLine]; - if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === "/")) { - ret = comment.leading ? null : comment.text; + if (response.status === 'failure' && response.error) { + onError(response.error); } - } - return ret; + onError(new otlp_exporter_base_1.OTLPExporterError('Export failed with unknown error')); + }, onError); + this._sendingPromises.push(promise); + const popPromise = () => { + const index = this._sendingPromises.indexOf(promise); + this._sendingPromises.splice(index, 1); + }; + promise.then(popPromise, popPromise); } - - return Object.defineProperty({ - next: next, - peek: peek, - push: push, - skip: skip, - cmnt: cmnt - }, "line", { - get: function() { return line; } - }); - /* eslint-enable callback-return */ } - +exports.OTLPGRPCExporterNodeBase = OTLPGRPCExporterNodeBase; +//# sourceMappingURL=OTLPGRPCExporterNodeBase.js.map /***/ }), -/***/ 26301: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 55525: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = Type; - -// extends Namespace -var Namespace = __nccwpck_require__(28131); -((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = "Type"; - -var Enum = __nccwpck_require__(94299), - OneOf = __nccwpck_require__(51895), - Field = __nccwpck_require__(20577), - MapField = __nccwpck_require__(86663), - Service = __nccwpck_require__(86269), - Message = __nccwpck_require__(63036), - Reader = __nccwpck_require__(24576), - Writer = __nccwpck_require__(86287), - util = __nccwpck_require__(93492), - encoder = __nccwpck_require__(61469), - decoder = __nccwpck_require__(17128), - verifier = __nccwpck_require__(23759), - converter = __nccwpck_require__(98548), - wrappers = __nccwpck_require__(7281); - +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createServiceClientConstructor = void 0; +const grpc = __nccwpck_require__(7025); /** - * Constructs a new reflected message type instance. - * @classdesc Reflected message type. - * @extends NamespaceBase - * @constructor - * @param {string} name Message name - * @param {Object.} [options] Declared options + * Creates a unary service client constructor that, when instantiated, does not serialize/deserialize anything. + * Allows for passing in {@link Buffer} directly, serialization can be handled via protobufjs or custom implementations. + * + * @param path service path + * @param name service name */ -function Type(name, options) { - Namespace.call(this, name, options); - - /** - * Message fields. - * @type {Object.} - */ - this.fields = {}; // toJSON, marker - - /** - * Oneofs declared within this namespace, if any. - * @type {Object.} - */ - this.oneofs = undefined; // toJSON - - /** - * Extension ranges, if any. - * @type {number[][]} - */ - this.extensions = undefined; // toJSON - - /** - * Reserved ranges, if any. - * @type {Array.} - */ - this.reserved = undefined; // toJSON +function createServiceClientConstructor(path, name) { + const serviceDefinition = { + export: { + path: path, + requestStream: false, + responseStream: false, + requestSerialize: (arg) => { + return arg; + }, + requestDeserialize: (arg) => { + return arg; + }, + responseSerialize: (arg) => { + return arg; + }, + responseDeserialize: (arg) => { + return arg; + }, + }, + }; + return grpc.makeGenericClientConstructor(serviceDefinition, name); +} +exports.createServiceClientConstructor = createServiceClientConstructor; +//# sourceMappingURL=create-service-client-constructor.js.map - /*? - * Whether this type is a legacy group. - * @type {boolean|undefined} - */ - this.group = undefined; // toJSON +/***/ }), - /** - * Cached fields by id. - * @type {Object.|null} - * @private - */ - this._fieldsById = null; +/***/ 75398: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Cached fields as an array. - * @type {Field[]|null} - * @private - */ - this._fieldsArray = null; +"use strict"; +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +var $protobuf = __nccwpck_require__(96916); +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; +// Exported root namespace +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); +$root.opentelemetry = (function () { /** - * Cached oneofs as an array. - * @type {OneOf[]|null} - * @private + * Namespace opentelemetry. + * @exports opentelemetry + * @namespace */ - this._oneofsArray = null; - - /** - * Cached constructor. - * @type {Constructor<{}>} - * @private - */ - this._ctor = null; -} - -Object.defineProperties(Type.prototype, { - - /** - * Message fields by id. - * @name Type#fieldsById - * @type {Object.} - * @readonly - */ - fieldsById: { - get: function() { - - /* istanbul ignore if */ - if (this._fieldsById) - return this._fieldsById; - - this._fieldsById = {}; - for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) { - var field = this.fields[names[i]], - id = field.id; - - /* istanbul ignore if */ - if (this._fieldsById[id]) - throw Error("duplicate id " + id + " in " + this); - - this._fieldsById[id] = field; - } - return this._fieldsById; - } - }, - - /** - * Fields of this message as an array for iteration. - * @name Type#fieldsArray - * @type {Field[]} - * @readonly - */ - fieldsArray: { - get: function() { - return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields)); - } - }, - - /** - * Oneofs of this message as an array for iteration. - * @name Type#oneofsArray - * @type {OneOf[]} - * @readonly - */ - oneofsArray: { - get: function() { - return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs)); - } - }, - - /** - * The registered constructor, if any registered, otherwise a generic constructor. - * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor. - * @name Type#ctor - * @type {Constructor<{}>} - */ - ctor: { - get: function() { - return this._ctor || (this.ctor = Type.generateConstructor(this)()); - }, - set: function(ctor) { - - // Ensure proper prototype - var prototype = ctor.prototype; - if (!(prototype instanceof Message)) { - (ctor.prototype = new Message()).constructor = ctor; - util.merge(ctor.prototype, prototype); - } - - // Classes and messages reference their reflected type - ctor.$type = ctor.prototype.$type = this; - - // Mix in static methods - util.merge(ctor, Message, true); - - this._ctor = ctor; - - // Messages have non-enumerable default values on their prototype - var i = 0; - for (; i < /* initializes */ this.fieldsArray.length; ++i) - this._fieldsArray[i].resolve(); // ensures a proper value - - // Messages have non-enumerable getters and setters for each virtual oneof field - var ctorProperties = {}; - for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i) - ctorProperties[this._oneofsArray[i].resolve().name] = { - get: util.oneOfGetter(this._oneofsArray[i].oneof), - set: util.oneOfSetter(this._oneofsArray[i].oneof) - }; - if (i) - Object.defineProperties(ctor.prototype, ctorProperties); - } - } -}); - -/** - * Generates a constructor function for the specified type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -Type.generateConstructor = function generateConstructor(mtype) { - /* eslint-disable no-unexpected-multiline */ - var gen = util.codegen(["p"], mtype.name); - // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype - for (var i = 0, field; i < mtype.fieldsArray.length; ++i) - if ((field = mtype._fieldsArray[i]).map) gen - ("this%s={}", util.safeProp(field.name)); - else if (field.repeated) gen - ("this%s=[]", util.safeProp(field.name)); - return gen - ("if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors - * @property {Object.} fields Field descriptors - * @property {number[][]} [extensions] Extension ranges - * @property {number[][]} [reserved] Reserved ranges - * @property {boolean} [group=false] Whether a legacy group or not - */ - -/** - * Creates a message type from a message type descriptor. - * @param {string} name Message name - * @param {IType} json Message type descriptor - * @returns {Type} Created message type - */ -Type.fromJSON = function fromJSON(name, json) { - var type = new Type(name, json.options); - type.extensions = json.extensions; - type.reserved = json.reserved; - var names = Object.keys(json.fields), - i = 0; - for (; i < names.length; ++i) - type.add( - ( typeof json.fields[names[i]].keyType !== "undefined" - ? MapField.fromJSON - : Field.fromJSON )(names[i], json.fields[names[i]]) - ); - if (json.oneofs) - for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i) - type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]])); - if (json.nested) - for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) { - var nested = json.nested[names[i]]; - type.add( // most to least likely - ( nested.id !== undefined - ? Field.fromJSON - : nested.fields !== undefined - ? Type.fromJSON - : nested.values !== undefined - ? Enum.fromJSON - : nested.methods !== undefined - ? Service.fromJSON - : Namespace.fromJSON )(names[i], nested) - ); - } - if (json.extensions && json.extensions.length) - type.extensions = json.extensions; - if (json.reserved && json.reserved.length) - type.reserved = json.reserved; - if (json.group) - type.group = true; - if (json.comment) - type.comment = json.comment; - return type; -}; - -/** - * Converts this message type to a message type descriptor. - * @param {IToJSONOptions} [toJSONOptions] JSON conversion options - * @returns {IType} Message type descriptor - */ -Type.prototype.toJSON = function toJSON(toJSONOptions) { - var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); - var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; - return util.toObject([ - "options" , inherited && inherited.options || undefined, - "oneofs" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions), - "fields" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {}, - "extensions" , this.extensions && this.extensions.length ? this.extensions : undefined, - "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, - "group" , this.group || undefined, - "nested" , inherited && inherited.nested || undefined, - "comment" , keepComments ? this.comment : undefined - ]); -}; - -/** - * @override - */ -Type.prototype.resolveAll = function resolveAll() { - var fields = this.fieldsArray, i = 0; - while (i < fields.length) - fields[i++].resolve(); - var oneofs = this.oneofsArray; i = 0; - while (i < oneofs.length) - oneofs[i++].resolve(); - return Namespace.prototype.resolveAll.call(this); -}; - -/** - * @override - */ -Type.prototype.get = function get(name) { - return this.fields[name] - || this.oneofs && this.oneofs[name] - || this.nested && this.nested[name] - || null; -}; - -/** - * Adds a nested object to this type. - * @param {ReflectionObject} object Nested object to add - * @returns {Type} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id - */ -Type.prototype.add = function add(object) { - - if (this.get(object.name)) - throw Error("duplicate name '" + object.name + "' in " + this); - - if (object instanceof Field && object.extend === undefined) { - // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects. - // The root object takes care of adding distinct sister-fields to the respective extended - // type instead. - - // avoids calling the getter if not absolutely necessary because it's called quite frequently - if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id]) - throw Error("duplicate id " + object.id + " in " + this); - if (this.isReservedId(object.id)) - throw Error("id " + object.id + " is reserved in " + this); - if (this.isReservedName(object.name)) - throw Error("name '" + object.name + "' is reserved in " + this); - - if (object.parent) - object.parent.remove(object); - this.fields[object.name] = object; - object.message = this; - object.onAdd(this); - return clearCache(this); - } - if (object instanceof OneOf) { - if (!this.oneofs) - this.oneofs = {}; - this.oneofs[object.name] = object; - object.onAdd(this); - return clearCache(this); - } - return Namespace.prototype.add.call(this, object); -}; - -/** - * Removes a nested object from this type. - * @param {ReflectionObject} object Nested object to remove - * @returns {Type} `this` - * @throws {TypeError} If arguments are invalid - * @throws {Error} If `object` is not a member of this type - */ -Type.prototype.remove = function remove(object) { - if (object instanceof Field && object.extend === undefined) { - // See Type#add for the reason why extension fields are excluded here. - - /* istanbul ignore if */ - if (!this.fields || this.fields[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.fields[object.name]; - object.parent = null; - object.onRemove(this); - return clearCache(this); - } - if (object instanceof OneOf) { - - /* istanbul ignore if */ - if (!this.oneofs || this.oneofs[object.name] !== object) - throw Error(object + " is not a member of " + this); - - delete this.oneofs[object.name]; - object.parent = null; - object.onRemove(this); - return clearCache(this); - } - return Namespace.prototype.remove.call(this, object); -}; - -/** - * Tests if the specified id is reserved. - * @param {number} id Id to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Type.prototype.isReservedId = function isReservedId(id) { - return Namespace.isReservedId(this.reserved, id); -}; - -/** - * Tests if the specified name is reserved. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -Type.prototype.isReservedName = function isReservedName(name) { - return Namespace.isReservedName(this.reserved, name); -}; - -/** - * Creates a new message of this type using the specified properties. - * @param {Object.} [properties] Properties to set - * @returns {Message<{}>} Message instance - */ -Type.prototype.create = function create(properties) { - return new this.ctor(properties); -}; - -/** - * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. - * @returns {Type} `this` - */ -Type.prototype.setup = function setup() { - // Sets up everything at once so that the prototype chain does not have to be re-evaluated - // multiple times (V8, soft-deopt prototype-check). - - var fullName = this.fullName, - types = []; - for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i) - types.push(this._fieldsArray[i].resolve().resolvedType); - - // Replace setup methods with type-specific generated functions - this.encode = encoder(this)({ - Writer : Writer, - types : types, - util : util - }); - this.decode = decoder(this)({ - Reader : Reader, - types : types, - util : util - }); - this.verify = verifier(this)({ - types : types, - util : util - }); - this.fromObject = converter.fromObject(this)({ - types : types, - util : util - }); - this.toObject = converter.toObject(this)({ - types : types, - util : util - }); - - // Inject custom wrappers for common types - var wrapper = wrappers[fullName]; - if (wrapper) { - var originalThis = Object.create(this); - // if (wrapper.fromObject) { - originalThis.fromObject = this.fromObject; - this.fromObject = wrapper.fromObject.bind(originalThis); - // } - // if (wrapper.toObject) { - originalThis.toObject = this.toObject; - this.toObject = wrapper.toObject.bind(originalThis); - // } - } - - return this; -}; - -/** - * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. - * @param {Message<{}>|Object.} message Message instance or plain object - * @param {Writer} [writer] Writer to encode to - * @returns {Writer} writer - */ -Type.prototype.encode = function encode_setup(message, writer) { - return this.setup().encode(message, writer); // overrides this method -}; - -/** - * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. - * @param {Message<{}>|Object.} message Message instance or plain object - * @param {Writer} [writer] Writer to encode to - * @returns {Writer} writer - */ -Type.prototype.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); -}; - -/** - * Decodes a message of this type. - * @param {Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Length of the message, if known beforehand - * @returns {Message<{}>} Decoded message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {util.ProtocolError<{}>} If required fields are missing - */ -Type.prototype.decode = function decode_setup(reader, length) { - return this.setup().decode(reader, length); // overrides this method -}; - -/** - * Decodes a message of this type preceeded by its byte length as a varint. - * @param {Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {Message<{}>} Decoded message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {util.ProtocolError} If required fields are missing - */ -Type.prototype.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof Reader)) - reader = Reader.create(reader); - return this.decode(reader, reader.uint32()); -}; - -/** - * Verifies that field values are valid and that required fields are present. - * @param {Object.} message Plain object to verify - * @returns {null|string} `null` if valid, otherwise the reason why it is not - */ -Type.prototype.verify = function verify_setup(message) { - return this.setup().verify(message); // overrides this method -}; - -/** - * Creates a new message of this type from a plain object. Also converts values to their respective internal types. - * @param {Object.} object Plain object to convert - * @returns {Message<{}>} Message instance - */ -Type.prototype.fromObject = function fromObject(object) { - return this.setup().fromObject(object); -}; - -/** - * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}. - * @interface IConversionOptions - * @property {Function} [longs] Long conversion type. - * Valid values are `String` and `Number` (the global types). - * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library. - * @property {Function} [enums] Enum value conversion type. - * Only valid value is `String` (the global type). - * Defaults to copy the present value, which is the numeric id. - * @property {Function} [bytes] Bytes value conversion type. - * Valid values are `Array` and (a base64 encoded) `String` (the global types). - * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser. - * @property {boolean} [defaults=false] Also sets default values on the resulting object - * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false` - * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false` - * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any - * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings - */ - -/** - * Creates a plain object from a message of this type. Also converts values to other types if specified. - * @param {Message<{}>} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ -Type.prototype.toObject = function toObject(message, options) { - return this.setup().toObject(message, options); -}; - -/** - * Decorator function as returned by {@link Type.d} (TypeScript). - * @typedef TypeDecorator - * @type {function} - * @param {Constructor} target Target constructor - * @returns {undefined} - * @template T extends Message - */ - -/** - * Type decorator (TypeScript). - * @param {string} [typeName] Type name, defaults to the constructor's name - * @returns {TypeDecorator} Decorator function - * @template T extends Message - */ -Type.d = function decorateType(typeName) { - return function typeDecorator(target) { - util.decorateType(target, typeName); - }; -}; - - -/***/ }), - -/***/ 98887: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -/** - * Common type constants. - * @namespace - */ -var types = exports; - -var util = __nccwpck_require__(93492); - -var s = [ - "double", // 0 - "float", // 1 - "int32", // 2 - "uint32", // 3 - "sint32", // 4 - "fixed32", // 5 - "sfixed32", // 6 - "int64", // 7 - "uint64", // 8 - "sint64", // 9 - "fixed64", // 10 - "sfixed64", // 11 - "bool", // 12 - "string", // 13 - "bytes" // 14 -]; - -function bake(values, offset) { - var i = 0, o = {}; - offset |= 0; - while (i < values.length) o[s[i + offset]] = values[i++]; - return o; -} - -/** - * Basic type wire types. - * @type {Object.} - * @const - * @property {number} double=1 Fixed64 wire type - * @property {number} float=5 Fixed32 wire type - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - * @property {number} string=2 Ldelim wire type - * @property {number} bytes=2 Ldelim wire type - */ -types.basic = bake([ - /* double */ 1, - /* float */ 5, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0, - /* string */ 2, - /* bytes */ 2 -]); - -/** - * Basic type defaults. - * @type {Object.} - * @const - * @property {number} double=0 Double default - * @property {number} float=0 Float default - * @property {number} int32=0 Int32 default - * @property {number} uint32=0 Uint32 default - * @property {number} sint32=0 Sint32 default - * @property {number} fixed32=0 Fixed32 default - * @property {number} sfixed32=0 Sfixed32 default - * @property {number} int64=0 Int64 default - * @property {number} uint64=0 Uint64 default - * @property {number} sint64=0 Sint32 default - * @property {number} fixed64=0 Fixed64 default - * @property {number} sfixed64=0 Sfixed64 default - * @property {boolean} bool=false Bool default - * @property {string} string="" String default - * @property {Array.} bytes=Array(0) Bytes default - * @property {null} message=null Message default - */ -types.defaults = bake([ - /* double */ 0, - /* float */ 0, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 0, - /* sfixed32 */ 0, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 0, - /* sfixed64 */ 0, - /* bool */ false, - /* string */ "", - /* bytes */ util.emptyArray, - /* message */ null -]); - -/** - * Basic long type wire types. - * @type {Object.} - * @const - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - */ -types.long = bake([ - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1 -], 7); - -/** - * Allowed types for map keys with their associated wire type. - * @type {Object.} - * @const - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - * @property {number} string=2 Ldelim wire type - */ -types.mapKey = bake([ - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0, - /* string */ 2 -], 2); - -/** - * Allowed types for packed repeated fields with their associated wire type. - * @type {Object.} - * @const - * @property {number} double=1 Fixed64 wire type - * @property {number} float=5 Fixed32 wire type - * @property {number} int32=0 Varint wire type - * @property {number} uint32=0 Varint wire type - * @property {number} sint32=0 Varint wire type - * @property {number} fixed32=5 Fixed32 wire type - * @property {number} sfixed32=5 Fixed32 wire type - * @property {number} int64=0 Varint wire type - * @property {number} uint64=0 Varint wire type - * @property {number} sint64=0 Varint wire type - * @property {number} fixed64=1 Fixed64 wire type - * @property {number} sfixed64=1 Fixed64 wire type - * @property {number} bool=0 Varint wire type - */ -types.packed = bake([ - /* double */ 1, - /* float */ 5, - /* int32 */ 0, - /* uint32 */ 0, - /* sint32 */ 0, - /* fixed32 */ 5, - /* sfixed32 */ 5, - /* int64 */ 0, - /* uint64 */ 0, - /* sint64 */ 0, - /* fixed64 */ 1, - /* sfixed64 */ 1, - /* bool */ 0 -]); - - -/***/ }), - -/***/ 93492: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/** - * Various utility functions. - * @namespace - */ -var util = module.exports = __nccwpck_require__(10329); - -var roots = __nccwpck_require__(1878); - -var Type, // cyclic - Enum; - -util.codegen = __nccwpck_require__(58882); -util.fetch = __nccwpck_require__(50663); -util.path = __nccwpck_require__(24761); - -/** - * Node's fs module if available. - * @type {Object.} - */ -util.fs = util.inquire("fs"); - -/** - * Converts an object's values to an array. - * @param {Object.} object Object to convert - * @returns {Array.<*>} Converted array - */ -util.toArray = function toArray(object) { - if (object) { - var keys = Object.keys(object), - array = new Array(keys.length), - index = 0; - while (index < keys.length) - array[index] = object[keys[index++]]; - return array; - } - return []; -}; - -/** - * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values. - * @param {Array.<*>} array Array to convert - * @returns {Object.} Converted object - */ -util.toObject = function toObject(array) { - var object = {}, - index = 0; - while (index < array.length) { - var key = array[index++], - val = array[index++]; - if (val !== undefined) - object[key] = val; - } - return object; -}; - -var safePropBackslashRe = /\\/g, - safePropQuoteRe = /"/g; - -/** - * Tests whether the specified name is a reserved word in JS. - * @param {string} name Name to test - * @returns {boolean} `true` if reserved, otherwise `false` - */ -util.isReserved = function isReserved(name) { - return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name); -}; - -/** - * Returns a safe property accessor for the specified property name. - * @param {string} prop Property name - * @returns {string} Safe accessor - */ -util.safeProp = function safeProp(prop) { - if (!/^[$\w_]+$/.test(prop) || util.isReserved(prop)) - return "[\"" + prop.replace(safePropBackslashRe, "\\\\").replace(safePropQuoteRe, "\\\"") + "\"]"; - return "." + prop; -}; - -/** - * Converts the first character of a string to upper case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.ucFirst = function ucFirst(str) { - return str.charAt(0).toUpperCase() + str.substring(1); -}; - -var camelCaseRe = /_([a-z])/g; - -/** - * Converts a string to camel case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.camelCase = function camelCase(str) { - return str.substring(0, 1) - + str.substring(1) - .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); }); -}; - -/** - * Compares reflected fields by id. - * @param {Field} a First field - * @param {Field} b Second field - * @returns {number} Comparison value - */ -util.compareFieldsById = function compareFieldsById(a, b) { - return a.id - b.id; -}; - -/** - * Decorator helper for types (TypeScript). - * @param {Constructor} ctor Constructor function - * @param {string} [typeName] Type name, defaults to the constructor's name - * @returns {Type} Reflected type - * @template T extends Message - * @property {Root} root Decorators root - */ -util.decorateType = function decorateType(ctor, typeName) { - - /* istanbul ignore if */ - if (ctor.$type) { - if (typeName && ctor.$type.name !== typeName) { - util.decorateRoot.remove(ctor.$type); - ctor.$type.name = typeName; - util.decorateRoot.add(ctor.$type); - } - return ctor.$type; - } - - /* istanbul ignore next */ - if (!Type) - Type = __nccwpck_require__(26301); - - var type = new Type(typeName || ctor.name); - util.decorateRoot.add(type); - type.ctor = ctor; // sets up .encode, .decode etc. - Object.defineProperty(ctor, "$type", { value: type, enumerable: false }); - Object.defineProperty(ctor.prototype, "$type", { value: type, enumerable: false }); - return type; -}; - -var decorateEnumIndex = 0; - -/** - * Decorator helper for enums (TypeScript). - * @param {Object} object Enum object - * @returns {Enum} Reflected enum - */ -util.decorateEnum = function decorateEnum(object) { - - /* istanbul ignore if */ - if (object.$type) - return object.$type; - - /* istanbul ignore next */ - if (!Enum) - Enum = __nccwpck_require__(94299); - - var enm = new Enum("Enum" + decorateEnumIndex++, object); - util.decorateRoot.add(enm); - Object.defineProperty(object, "$type", { value: enm, enumerable: false }); - return enm; -}; - - -/** - * Sets the value of a property by property path. If a value already exists, it is turned to an array - * @param {Object.} dst Destination object - * @param {string} path dot '.' delimited path of the property to set - * @param {Object} value the value to set - * @returns {Object.} Destination object - */ -util.setProperty = function setProperty(dst, path, value) { - function setProp(dst, path, value) { - var part = path.shift(); - if (part === "__proto__" || part === "prototype") { - return dst; - } - if (path.length > 0) { - dst[part] = setProp(dst[part] || {}, path, value); - } else { - var prevValue = dst[part]; - if (prevValue) - value = [].concat(prevValue).concat(value); - dst[part] = value; - } - return dst; - } - - if (typeof dst !== "object") - throw TypeError("dst must be an object"); - if (!path) - throw TypeError("path must be specified"); - - path = path.split("."); - return setProp(dst, path, value); -}; - -/** - * Decorator root (TypeScript). - * @name util.decorateRoot - * @type {Root} - * @readonly - */ -Object.defineProperty(util, "decorateRoot", { - get: function() { - return roots["decorated"] || (roots["decorated"] = new (__nccwpck_require__(38372))()); - } -}); - - -/***/ }), - -/***/ 20622: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = LongBits; - -var util = __nccwpck_require__(10329); - -/** - * Constructs new long bits. - * @classdesc Helper class for working with the low and high bits of a 64 bit value. - * @memberof util - * @constructor - * @param {number} lo Low 32 bits, unsigned - * @param {number} hi High 32 bits, unsigned - */ -function LongBits(lo, hi) { - - // note that the casts below are theoretically unnecessary as of today, but older statically - // generated converter code might still call the ctor with signed 32bits. kept for compat. - - /** - * Low bits. - * @type {number} - */ - this.lo = lo >>> 0; - - /** - * High bits. - * @type {number} - */ - this.hi = hi >>> 0; -} - -/** - * Zero bits. - * @memberof util.LongBits - * @type {util.LongBits} - */ -var zero = LongBits.zero = new LongBits(0, 0); - -zero.toNumber = function() { return 0; }; -zero.zzEncode = zero.zzDecode = function() { return this; }; -zero.length = function() { return 1; }; - -/** - * Zero hash. - * @memberof util.LongBits - * @type {string} - */ -var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; - -/** - * Constructs new long bits from the specified number. - * @param {number} value Value - * @returns {util.LongBits} Instance - */ -LongBits.fromNumber = function fromNumber(value) { - if (value === 0) - return zero; - var sign = value < 0; - if (sign) - value = -value; - var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; - if (sign) { - hi = ~hi >>> 0; - lo = ~lo >>> 0; - if (++lo > 4294967295) { - lo = 0; - if (++hi > 4294967295) - hi = 0; - } - } - return new LongBits(lo, hi); -}; - -/** - * Constructs new long bits from a number, long or string. - * @param {Long|number|string} value Value - * @returns {util.LongBits} Instance - */ -LongBits.from = function from(value) { - if (typeof value === "number") - return LongBits.fromNumber(value); - if (util.isString(value)) { - /* istanbul ignore else */ - if (util.Long) - value = util.Long.fromString(value); - else - return LongBits.fromNumber(parseInt(value, 10)); - } - return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; -}; - -/** - * Converts this long bits to a possibly unsafe JavaScript number. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {number} Possibly unsafe number - */ -LongBits.prototype.toNumber = function toNumber(unsigned) { - if (!unsigned && this.hi >>> 31) { - var lo = ~this.lo + 1 >>> 0, - hi = ~this.hi >>> 0; - if (!lo) - hi = hi + 1 >>> 0; - return -(lo + hi * 4294967296); - } - return this.lo + this.hi * 4294967296; -}; - -/** - * Converts this long bits to a long. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long} Long - */ -LongBits.prototype.toLong = function toLong(unsigned) { - return util.Long - ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) - /* istanbul ignore next */ - : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; -}; - -var charCodeAt = String.prototype.charCodeAt; - -/** - * Constructs new long bits from the specified 8 characters long hash. - * @param {string} hash Hash - * @returns {util.LongBits} Bits - */ -LongBits.fromHash = function fromHash(hash) { - if (hash === zeroHash) - return zero; - return new LongBits( - ( charCodeAt.call(hash, 0) - | charCodeAt.call(hash, 1) << 8 - | charCodeAt.call(hash, 2) << 16 - | charCodeAt.call(hash, 3) << 24) >>> 0 - , - ( charCodeAt.call(hash, 4) - | charCodeAt.call(hash, 5) << 8 - | charCodeAt.call(hash, 6) << 16 - | charCodeAt.call(hash, 7) << 24) >>> 0 - ); -}; - -/** - * Converts this long bits to a 8 characters long hash. - * @returns {string} Hash - */ -LongBits.prototype.toHash = function toHash() { - return String.fromCharCode( - this.lo & 255, - this.lo >>> 8 & 255, - this.lo >>> 16 & 255, - this.lo >>> 24 , - this.hi & 255, - this.hi >>> 8 & 255, - this.hi >>> 16 & 255, - this.hi >>> 24 - ); -}; - -/** - * Zig-zag encodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzEncode = function zzEncode() { - var mask = this.hi >> 31; - this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; - this.lo = ( this.lo << 1 ^ mask) >>> 0; - return this; -}; - -/** - * Zig-zag decodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzDecode = function zzDecode() { - var mask = -(this.lo & 1); - this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; - this.hi = ( this.hi >>> 1 ^ mask) >>> 0; - return this; -}; - -/** - * Calculates the length of this longbits when encoded as a varint. - * @returns {number} Length - */ -LongBits.prototype.length = function length() { - var part0 = this.lo, - part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, - part2 = this.hi >>> 24; - return part2 === 0 - ? part1 === 0 - ? part0 < 16384 - ? part0 < 128 ? 1 : 2 - : part0 < 2097152 ? 3 : 4 - : part1 < 16384 - ? part1 < 128 ? 5 : 6 - : part1 < 2097152 ? 7 : 8 - : part2 < 128 ? 9 : 10; -}; - - -/***/ }), - -/***/ 10329: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var util = exports; - -// used to return a Promise where callback is omitted -util.asPromise = __nccwpck_require__(252); - -// converts to / from base64 encoded strings -util.base64 = __nccwpck_require__(26718); - -// base class of rpc.Service -util.EventEmitter = __nccwpck_require__(86850); - -// float handling accross browsers -util.float = __nccwpck_require__(21843); - -// requires modules optionally and hides the call from bundlers -util.inquire = __nccwpck_require__(60094); - -// converts to / from utf8 encoded strings -util.utf8 = __nccwpck_require__(99049); - -// provides a node-like buffer pool in the browser -util.pool = __nccwpck_require__(47743); - -// utility to work with the low and high bits of a 64 bit value -util.LongBits = __nccwpck_require__(20622); - -/** - * Whether running within node or not. - * @memberof util - * @type {boolean} - */ -util.isNode = Boolean(typeof global !== "undefined" - && global - && global.process - && global.process.versions - && global.process.versions.node); - -/** - * Global object reference. - * @memberof util - * @type {Object} - */ -util.global = util.isNode && global - || typeof window !== "undefined" && window - || typeof self !== "undefined" && self - || this; // eslint-disable-line no-invalid-this - -/** - * An immuable empty array. - * @memberof util - * @type {Array.<*>} - * @const - */ -util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes - -/** - * An immutable empty object. - * @type {Object} - * @const - */ -util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes - -/** - * Tests if the specified value is an integer. - * @function - * @param {*} value Value to test - * @returns {boolean} `true` if the value is an integer - */ -util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { - return typeof value === "number" && isFinite(value) && Math.floor(value) === value; -}; - -/** - * Tests if the specified value is a string. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a string - */ -util.isString = function isString(value) { - return typeof value === "string" || value instanceof String; -}; - -/** - * Tests if the specified value is a non-null object. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a non-null object - */ -util.isObject = function isObject(value) { - return value && typeof value === "object"; -}; - -/** - * Checks if a property on a message is considered to be present. - * This is an alias of {@link util.isSet}. - * @function - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isset = - -/** - * Checks if a property on a message is considered to be present. - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isSet = function isSet(obj, prop) { - var value = obj[prop]; - if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins - return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; - return false; -}; - -/** - * Any compatible Buffer instance. - * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. - * @interface Buffer - * @extends Uint8Array - */ - -/** - * Node's Buffer class if available. - * @type {Constructor} - */ -util.Buffer = (function() { - try { - var Buffer = util.inquire("buffer").Buffer; - // refuse to use non-node buffers if not explicitly assigned (perf reasons): - return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; - } catch (e) { - /* istanbul ignore next */ - return null; - } -})(); - -// Internal alias of or polyfull for Buffer.from. -util._Buffer_from = null; - -// Internal alias of or polyfill for Buffer.allocUnsafe. -util._Buffer_allocUnsafe = null; - -/** - * Creates a new buffer of whatever type supported by the environment. - * @param {number|number[]} [sizeOrArray=0] Buffer size or number array - * @returns {Uint8Array|Buffer} Buffer - */ -util.newBuffer = function newBuffer(sizeOrArray) { - /* istanbul ignore next */ - return typeof sizeOrArray === "number" - ? util.Buffer - ? util._Buffer_allocUnsafe(sizeOrArray) - : new util.Array(sizeOrArray) - : util.Buffer - ? util._Buffer_from(sizeOrArray) - : typeof Uint8Array === "undefined" - ? sizeOrArray - : new Uint8Array(sizeOrArray); -}; - -/** - * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. - * @type {Constructor} - */ -util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; - -/** - * Any compatible Long instance. - * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. - * @interface Long - * @property {number} low Low bits - * @property {number} high High bits - * @property {boolean} unsigned Whether unsigned or not - */ - -/** - * Long.js's Long class if available. - * @type {Constructor} - */ -util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long - || /* istanbul ignore next */ util.global.Long - || util.inquire("long"); - -/** - * Regular expression used to verify 2 bit (`bool`) map keys. - * @type {RegExp} - * @const - */ -util.key2Re = /^true|false|0|1$/; - -/** - * Regular expression used to verify 32 bit (`int32` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; - -/** - * Regular expression used to verify 64 bit (`int64` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; - -/** - * Converts a number or long to an 8 characters long hash string. - * @param {Long|number} value Value to convert - * @returns {string} Hash - */ -util.longToHash = function longToHash(value) { - return value - ? util.LongBits.from(value).toHash() - : util.LongBits.zeroHash; -}; - -/** - * Converts an 8 characters long hash string to a long or number. - * @param {string} hash Hash - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long|number} Original value - */ -util.longFromHash = function longFromHash(hash, unsigned) { - var bits = util.LongBits.fromHash(hash); - if (util.Long) - return util.Long.fromBits(bits.lo, bits.hi, unsigned); - return bits.toNumber(Boolean(unsigned)); -}; - -/** - * Merges the properties of the source object into the destination object. - * @memberof util - * @param {Object.} dst Destination object - * @param {Object.} src Source object - * @param {boolean} [ifNotSet=false] Merges only if the key is not already set - * @returns {Object.} Destination object - */ -function merge(dst, src, ifNotSet) { // used by converters - for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) - if (dst[keys[i]] === undefined || !ifNotSet) - dst[keys[i]] = src[keys[i]]; - return dst; -} - -util.merge = merge; - -/** - * Converts the first character of a string to lower case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.lcFirst = function lcFirst(str) { - return str.charAt(0).toLowerCase() + str.substring(1); -}; - -/** - * Creates a custom error constructor. - * @memberof util - * @param {string} name Error name - * @returns {Constructor} Custom error constructor - */ -function newError(name) { - - function CustomError(message, properties) { - - if (!(this instanceof CustomError)) - return new CustomError(message, properties); - - // Error.call(this, message); - // ^ just returns a new error instance because the ctor can be called as a function - - Object.defineProperty(this, "message", { get: function() { return message; } }); - - /* istanbul ignore next */ - if (Error.captureStackTrace) // node - Error.captureStackTrace(this, CustomError); - else - Object.defineProperty(this, "stack", { value: new Error().stack || "" }); - - if (properties) - merge(this, properties); - } - - CustomError.prototype = Object.create(Error.prototype, { - constructor: { - value: CustomError, - writable: true, - enumerable: false, - configurable: true, - }, - name: { - get: function get() { return name; }, - set: undefined, - enumerable: false, - // configurable: false would accurately preserve the behavior of - // the original, but I'm guessing that was not intentional. - // For an actual error subclass, this property would - // be configurable. - configurable: true, - }, - toString: { - value: function value() { return this.name + ": " + this.message; }, - writable: true, - enumerable: false, - configurable: true, - }, - }); - - return CustomError; -} - -util.newError = newError; - -/** - * Constructs a new protocol error. - * @classdesc Error subclass indicating a protocol specifc error. - * @memberof util - * @extends Error - * @template T extends Message - * @constructor - * @param {string} message Error message - * @param {Object.} [properties] Additional properties - * @example - * try { - * MyMessage.decode(someBuffer); // throws if required fields are missing - * } catch (e) { - * if (e instanceof ProtocolError && e.instance) - * console.log("decoded so far: " + JSON.stringify(e.instance)); - * } - */ -util.ProtocolError = newError("ProtocolError"); - -/** - * So far decoded message instance. - * @name util.ProtocolError#instance - * @type {Message} - */ - -/** - * A OneOf getter as returned by {@link util.oneOfGetter}. - * @typedef OneOfGetter - * @type {function} - * @returns {string|undefined} Set field name, if any - */ - -/** - * Builds a getter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfGetter} Unbound getter - */ -util.oneOfGetter = function getOneOf(fieldNames) { - var fieldMap = {}; - for (var i = 0; i < fieldNames.length; ++i) - fieldMap[fieldNames[i]] = 1; - - /** - * @returns {string|undefined} Set field name, if any - * @this Object - * @ignore - */ - return function() { // eslint-disable-line consistent-return - for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) - if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) - return keys[i]; - }; -}; - -/** - * A OneOf setter as returned by {@link util.oneOfSetter}. - * @typedef OneOfSetter - * @type {function} - * @param {string|undefined} value Field name - * @returns {undefined} - */ - -/** - * Builds a setter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfSetter} Unbound setter - */ -util.oneOfSetter = function setOneOf(fieldNames) { - - /** - * @param {string} name Field name - * @returns {undefined} - * @this Object - * @ignore - */ - return function(name) { - for (var i = 0; i < fieldNames.length; ++i) - if (fieldNames[i] !== name) - delete this[fieldNames[i]]; - }; -}; - -/** - * Default conversion options used for {@link Message#toJSON} implementations. - * - * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: - * - * - Longs become strings - * - Enums become string keys - * - Bytes become base64 encoded strings - * - (Sub-)Messages become plain objects - * - Maps become plain objects with all string keys - * - Repeated fields become arrays - * - NaN and Infinity for float and double fields become strings - * - * @type {IConversionOptions} - * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json - */ -util.toJSONOptions = { - longs: String, - enums: String, - bytes: String, - json: true -}; - -// Sets up buffer utility according to the environment (called in index-minimal) -util._configure = function() { - var Buffer = util.Buffer; - /* istanbul ignore if */ - if (!Buffer) { - util._Buffer_from = util._Buffer_allocUnsafe = null; - return; - } - // because node 4.x buffers are incompatible & immutable - // see: https://github.com/dcodeIO/protobuf.js/pull/665 - util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || - /* istanbul ignore next */ - function Buffer_from(value, encoding) { - return new Buffer(value, encoding); - }; - util._Buffer_allocUnsafe = Buffer.allocUnsafe || - /* istanbul ignore next */ - function Buffer_allocUnsafe(size) { - return new Buffer(size); - }; -}; - - -/***/ }), - -/***/ 23759: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = verifier; - -var Enum = __nccwpck_require__(94299), - util = __nccwpck_require__(93492); - -function invalid(field, expected) { - return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected"; -} - -/** - * Generates a partial value verifier. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {number} fieldIndex Field index - * @param {string} ref Variable reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genVerifyValue(gen, field, fieldIndex, ref) { - /* eslint-disable no-unexpected-multiline */ - if (field.resolvedType) { - if (field.resolvedType instanceof Enum) { gen - ("switch(%s){", ref) - ("default:") - ("return%j", invalid(field, "enum value")); - for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen - ("case %i:", field.resolvedType.values[keys[j]]); - gen - ("break") - ("}"); - } else { - gen - ("{") - ("var e=types[%i].verify(%s);", fieldIndex, ref) - ("if(e)") - ("return%j+e", field.name + ".") - ("}"); - } - } else { - switch (field.type) { - case "int32": - case "uint32": - case "sint32": - case "fixed32": - case "sfixed32": gen - ("if(!util.isInteger(%s))", ref) - ("return%j", invalid(field, "integer")); - break; - case "int64": - case "uint64": - case "sint64": - case "fixed64": - case "sfixed64": gen - ("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", ref, ref, ref, ref) - ("return%j", invalid(field, "integer|Long")); - break; - case "float": - case "double": gen - ("if(typeof %s!==\"number\")", ref) - ("return%j", invalid(field, "number")); - break; - case "bool": gen - ("if(typeof %s!==\"boolean\")", ref) - ("return%j", invalid(field, "boolean")); - break; - case "string": gen - ("if(!util.isString(%s))", ref) - ("return%j", invalid(field, "string")); - break; - case "bytes": gen - ("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))", ref, ref, ref) - ("return%j", invalid(field, "buffer")); - break; - } - } - return gen; - /* eslint-enable no-unexpected-multiline */ -} - -/** - * Generates a partial key verifier. - * @param {Codegen} gen Codegen instance - * @param {Field} field Reflected field - * @param {string} ref Variable reference - * @returns {Codegen} Codegen instance - * @ignore - */ -function genVerifyKey(gen, field, ref) { - /* eslint-disable no-unexpected-multiline */ - switch (field.keyType) { - case "int32": - case "uint32": - case "sint32": - case "fixed32": - case "sfixed32": gen - ("if(!util.key32Re.test(%s))", ref) - ("return%j", invalid(field, "integer key")); - break; - case "int64": - case "uint64": - case "sint64": - case "fixed64": - case "sfixed64": gen - ("if(!util.key64Re.test(%s))", ref) // see comment above: x is ok, d is not - ("return%j", invalid(field, "integer|Long key")); - break; - case "bool": gen - ("if(!util.key2Re.test(%s))", ref) - ("return%j", invalid(field, "boolean key")); - break; - } - return gen; - /* eslint-enable no-unexpected-multiline */ -} - -/** - * Generates a verifier specific to the specified message type. - * @param {Type} mtype Message type - * @returns {Codegen} Codegen instance - */ -function verifier(mtype) { - /* eslint-disable no-unexpected-multiline */ - - var gen = util.codegen(["m"], mtype.name + "$verify") - ("if(typeof m!==\"object\"||m===null)") - ("return%j", "object expected"); - var oneofs = mtype.oneofsArray, - seenFirstField = {}; - if (oneofs.length) gen - ("var p={}"); - - for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) { - var field = mtype._fieldsArray[i].resolve(), - ref = "m" + util.safeProp(field.name); - - if (field.optional) gen - ("if(%s!=null&&m.hasOwnProperty(%j)){", ref, field.name); // !== undefined && !== null - - // map fields - if (field.map) { gen - ("if(!util.isObject(%s))", ref) - ("return%j", invalid(field, "object")) - ("var k=Object.keys(%s)", ref) - ("for(var i=0;i { - -"use strict"; - - -/** - * Wrappers for common types. - * @type {Object.} - * @const - */ -var wrappers = exports; - -var Message = __nccwpck_require__(63036); - -/** - * From object converter part of an {@link IWrapper}. - * @typedef WrapperFromObjectConverter - * @type {function} - * @param {Object.} object Plain object - * @returns {Message<{}>} Message instance - * @this Type - */ - -/** - * To object converter part of an {@link IWrapper}. - * @typedef WrapperToObjectConverter - * @type {function} - * @param {Message<{}>} message Message instance - * @param {IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - * @this Type - */ - -/** - * Common type wrapper part of {@link wrappers}. - * @interface IWrapper - * @property {WrapperFromObjectConverter} [fromObject] From object converter - * @property {WrapperToObjectConverter} [toObject] To object converter - */ - -// Custom wrapper for Any -wrappers[".google.protobuf.Any"] = { - - fromObject: function(object) { - - // unwrap value type if mapped - if (object && object["@type"]) { - // Only use fully qualified type name after the last '/' - var name = object["@type"].substring(object["@type"].lastIndexOf("/") + 1); - var type = this.lookup(name); - /* istanbul ignore else */ - if (type) { - // type_url does not accept leading "." - var type_url = object["@type"].charAt(0) === "." ? - object["@type"].slice(1) : object["@type"]; - // type_url prefix is optional, but path seperator is required - if (type_url.indexOf("/") === -1) { - type_url = "/" + type_url; - } - return this.create({ - type_url: type_url, - value: type.encode(type.fromObject(object)).finish() - }); - } - } - - return this.fromObject(object); - }, - - toObject: function(message, options) { - - // Default prefix - var googleApi = "type.googleapis.com/"; - var prefix = ""; - var name = ""; - - // decode value if requested and unmapped - if (options && options.json && message.type_url && message.value) { - // Only use fully qualified type name after the last '/' - name = message.type_url.substring(message.type_url.lastIndexOf("/") + 1); - // Separate the prefix used - prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1); - var type = this.lookup(name); - /* istanbul ignore else */ - if (type) - message = type.decode(message.value); - } - - // wrap value if unmapped - if (!(message instanceof this.ctor) && message instanceof Message) { - var object = message.$type.toObject(message, options); - var messageName = message.$type.fullName[0] === "." ? - message.$type.fullName.slice(1) : message.$type.fullName; - // Default to type.googleapis.com prefix if no prefix is used - if (prefix === "") { - prefix = googleApi; - } - name = prefix + messageName; - object["@type"] = name; - return object; - } - - return this.toObject(message, options); - } -}; - - -/***/ }), - -/***/ 86287: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = Writer; - -var util = __nccwpck_require__(10329); - -var BufferWriter; // cyclic - -var LongBits = util.LongBits, - base64 = util.base64, - utf8 = util.utf8; - -/** - * Constructs a new writer operation instance. - * @classdesc Scheduled writer operation. - * @constructor - * @param {function(*, Uint8Array, number)} fn Function to call - * @param {number} len Value byte length - * @param {*} val Value to write - * @ignore - */ -function Op(fn, len, val) { - - /** - * Function to call. - * @type {function(Uint8Array, number, *)} - */ - this.fn = fn; - - /** - * Value byte length. - * @type {number} - */ - this.len = len; - - /** - * Next operation. - * @type {Writer.Op|undefined} - */ - this.next = undefined; - - /** - * Value to write. - * @type {*} - */ - this.val = val; // type varies -} - -/* istanbul ignore next */ -function noop() {} // eslint-disable-line no-empty-function - -/** - * Constructs a new writer state instance. - * @classdesc Copied writer state. - * @memberof Writer - * @constructor - * @param {Writer} writer Writer to copy state from - * @ignore - */ -function State(writer) { - - /** - * Current head. - * @type {Writer.Op} - */ - this.head = writer.head; - - /** - * Current tail. - * @type {Writer.Op} - */ - this.tail = writer.tail; - - /** - * Current buffer length. - * @type {number} - */ - this.len = writer.len; - - /** - * Next state. - * @type {State|null} - */ - this.next = writer.states; -} - -/** - * Constructs a new writer instance. - * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. - * @constructor - */ -function Writer() { - - /** - * Current length. - * @type {number} - */ - this.len = 0; - - /** - * Operations head. - * @type {Object} - */ - this.head = new Op(noop, 0, 0); - - /** - * Operations tail - * @type {Object} - */ - this.tail = this.head; - - /** - * Linked forked states. - * @type {Object|null} - */ - this.states = null; - - // When a value is written, the writer calculates its byte length and puts it into a linked - // list of operations to perform when finish() is called. This both allows us to allocate - // buffers of the exact required size and reduces the amount of work we have to do compared - // to first calculating over objects and then encoding over objects. In our case, the encoding - // part is just a linked list walk calling operations with already prepared values. -} - -var create = function create() { - return util.Buffer - ? function create_buffer_setup() { - return (Writer.create = function create_buffer() { - return new BufferWriter(); - })(); - } - /* istanbul ignore next */ - : function create_array() { - return new Writer(); - }; -}; - -/** - * Creates a new writer. - * @function - * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} - */ -Writer.create = create(); - -/** - * Allocates a buffer of the specified size. - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ -Writer.alloc = function alloc(size) { - return new util.Array(size); -}; - -// Use Uint8Array buffer pool in the browser, just like node does with buffers -/* istanbul ignore else */ -if (util.Array !== Array) - Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); - -/** - * Pushes a new operation to the queue. - * @param {function(Uint8Array, number, *)} fn Function to call - * @param {number} len Value byte length - * @param {number} val Value to write - * @returns {Writer} `this` - * @private - */ -Writer.prototype._push = function push(fn, len, val) { - this.tail = this.tail.next = new Op(fn, len, val); - this.len += len; - return this; -}; - -function writeByte(val, buf, pos) { - buf[pos] = val & 255; -} - -function writeVarint32(val, buf, pos) { - while (val > 127) { - buf[pos++] = val & 127 | 128; - val >>>= 7; - } - buf[pos] = val; -} - -/** - * Constructs a new varint writer operation instance. - * @classdesc Scheduled varint writer operation. - * @extends Op - * @constructor - * @param {number} len Value byte length - * @param {number} val Value to write - * @ignore - */ -function VarintOp(len, val) { - this.len = len; - this.next = undefined; - this.val = val; -} - -VarintOp.prototype = Object.create(Op.prototype); -VarintOp.prototype.fn = writeVarint32; - -/** - * Writes an unsigned 32 bit value as a varint. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.uint32 = function write_uint32(value) { - // here, the call to this.push has been inlined and a varint specific Op subclass is used. - // uint32 is by far the most frequently used operation and benefits significantly from this. - this.len += (this.tail = this.tail.next = new VarintOp( - (value = value >>> 0) - < 128 ? 1 - : value < 16384 ? 2 - : value < 2097152 ? 3 - : value < 268435456 ? 4 - : 5, - value)).len; - return this; -}; - -/** - * Writes a signed 32 bit value as a varint. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.int32 = function write_int32(value) { - return value < 0 - ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec - : this.uint32(value); -}; - -/** - * Writes a 32 bit value as a varint, zig-zag encoded. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sint32 = function write_sint32(value) { - return this.uint32((value << 1 ^ value >> 31) >>> 0); -}; - -function writeVarint64(val, buf, pos) { - while (val.hi) { - buf[pos++] = val.lo & 127 | 128; - val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; - val.hi >>>= 7; - } - while (val.lo > 127) { - buf[pos++] = val.lo & 127 | 128; - val.lo = val.lo >>> 7; - } - buf[pos++] = val.lo; -} - -/** - * Writes an unsigned 64 bit value as a varint. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.uint64 = function write_uint64(value) { - var bits = LongBits.from(value); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a signed 64 bit value as a varint. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.int64 = Writer.prototype.uint64; - -/** - * Writes a signed 64 bit value as a varint, zig-zag encoded. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sint64 = function write_sint64(value) { - var bits = LongBits.from(value).zzEncode(); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a boolish value as a varint. - * @param {boolean} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.bool = function write_bool(value) { - return this._push(writeByte, 1, value ? 1 : 0); -}; - -function writeFixed32(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -/** - * Writes an unsigned 32 bit value as fixed 32 bits. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.fixed32 = function write_fixed32(value) { - return this._push(writeFixed32, 4, value >>> 0); -}; - -/** - * Writes a signed 32 bit value as fixed 32 bits. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sfixed32 = Writer.prototype.fixed32; - -/** - * Writes an unsigned 64 bit value as fixed 64 bits. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.fixed64 = function write_fixed64(value) { - var bits = LongBits.from(value); - return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); -}; - -/** - * Writes a signed 64 bit value as fixed 64 bits. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sfixed64 = Writer.prototype.fixed64; - -/** - * Writes a float (32 bit). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.float = function write_float(value) { - return this._push(util.float.writeFloatLE, 4, value); -}; - -/** - * Writes a double (64 bit float). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.double = function write_double(value) { - return this._push(util.float.writeDoubleLE, 8, value); -}; - -var writeBytes = util.Array.prototype.set - ? function writeBytes_set(val, buf, pos) { - buf.set(val, pos); // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytes_for(val, buf, pos) { - for (var i = 0; i < val.length; ++i) - buf[pos + i] = val[i]; - }; - -/** - * Writes a sequence of bytes. - * @param {Uint8Array|string} value Buffer or base64 encoded string to write - * @returns {Writer} `this` - */ -Writer.prototype.bytes = function write_bytes(value) { - var len = value.length >>> 0; - if (!len) - return this._push(writeByte, 1, 0); - if (util.isString(value)) { - var buf = Writer.alloc(len = base64.length(value)); - base64.decode(value, buf, 0); - value = buf; - } - return this.uint32(len)._push(writeBytes, len, value); -}; - -/** - * Writes a string. - * @param {string} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.string = function write_string(value) { - var len = utf8.length(value); - return len - ? this.uint32(len)._push(utf8.write, len, value) - : this._push(writeByte, 1, 0); -}; - -/** - * Forks this writer's state by pushing it to a stack. - * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. - * @returns {Writer} `this` - */ -Writer.prototype.fork = function fork() { - this.states = new State(this); - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - return this; -}; - -/** - * Resets this instance to the last state. - * @returns {Writer} `this` - */ -Writer.prototype.reset = function reset() { - if (this.states) { - this.head = this.states.head; - this.tail = this.states.tail; - this.len = this.states.len; - this.states = this.states.next; - } else { - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - } - return this; -}; - -/** - * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. - * @returns {Writer} `this` - */ -Writer.prototype.ldelim = function ldelim() { - var head = this.head, - tail = this.tail, - len = this.len; - this.reset().uint32(len); - if (len) { - this.tail.next = head.next; // skip noop - this.tail = tail; - this.len += len; - } - return this; -}; - -/** - * Finishes the write operation. - * @returns {Uint8Array} Finished buffer - */ -Writer.prototype.finish = function finish() { - var head = this.head.next, // skip noop - buf = this.constructor.alloc(this.len), - pos = 0; - while (head) { - head.fn(head.val, buf, pos); - pos += head.len; - head = head.next; - } - // this.head = this.tail = null; - return buf; -}; - -Writer._configure = function(BufferWriter_) { - BufferWriter = BufferWriter_; - Writer.create = create(); - BufferWriter._configure(); -}; - - -/***/ }), - -/***/ 35740: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = BufferWriter; - -// extends Writer -var Writer = __nccwpck_require__(86287); -(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; - -var util = __nccwpck_require__(10329); - -/** - * Constructs a new buffer writer instance. - * @classdesc Wire format writer using node buffers. - * @extends Writer - * @constructor - */ -function BufferWriter() { - Writer.call(this); -} - -BufferWriter._configure = function () { - /** - * Allocates a buffer of the specified size. - * @function - * @param {number} size Buffer size - * @returns {Buffer} Buffer - */ - BufferWriter.alloc = util._Buffer_allocUnsafe; - - BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" - ? function writeBytesBuffer_set(val, buf, pos) { - buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) - // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytesBuffer_copy(val, buf, pos) { - if (val.copy) // Buffer values - val.copy(buf, pos, 0, val.length); - else for (var i = 0; i < val.length;) // plain array values - buf[pos++] = val[i++]; - }; -}; - - -/** - * @override - */ -BufferWriter.prototype.bytes = function write_bytes_buffer(value) { - if (util.isString(value)) - value = util._Buffer_from(value, "base64"); - var len = value.length >>> 0; - this.uint32(len); - if (len) - this._push(BufferWriter.writeBytesBuffer, len, value); - return this; -}; - -function writeStringBuffer(val, buf, pos) { - if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) - util.utf8.write(val, buf, pos); - else if (buf.utf8Write) - buf.utf8Write(val, pos); - else - buf.write(val, pos); -} - -/** - * @override - */ -BufferWriter.prototype.string = function write_string_buffer(value) { - var len = util.Buffer.byteLength(value); - this.uint32(len); - if (len) - this._push(writeStringBuffer, len, value); - return this; -}; - - -/** - * Finishes the write operation. - * @name BufferWriter#finish - * @function - * @returns {Buffer} Finished buffer - */ - -BufferWriter._configure(); - - -/***/ }), - -/***/ 98171: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * @license - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -const camelCase = __nccwpck_require__(7994); -const Protobuf = __nccwpck_require__(85881); -const descriptor = __nccwpck_require__(21629); -const util_1 = __nccwpck_require__(13245); -function isAnyExtension(obj) { - return ('@type' in obj) && (typeof obj['@type'] === 'string'); -} -exports.isAnyExtension = isAnyExtension; -const descriptorOptions = { - longs: String, - enums: String, - bytes: String, - defaults: true, - oneofs: true, - json: true, -}; -function joinName(baseName, name) { - if (baseName === '') { - return name; - } - else { - return baseName + '.' + name; - } -} -function isHandledReflectionObject(obj) { - return (obj instanceof Protobuf.Service || - obj instanceof Protobuf.Type || - obj instanceof Protobuf.Enum); -} -function isNamespaceBase(obj) { - return obj instanceof Protobuf.Namespace || obj instanceof Protobuf.Root; -} -function getAllHandledReflectionObjects(obj, parentName) { - const objName = joinName(parentName, obj.name); - if (isHandledReflectionObject(obj)) { - return [[objName, obj]]; - } - else { - if (isNamespaceBase(obj) && typeof obj.nested !== 'undefined') { - return Object.keys(obj.nested) - .map(name => { - return getAllHandledReflectionObjects(obj.nested[name], objName); - }) - .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []); - } - } - return []; -} -function createDeserializer(cls, options) { - return function deserialize(argBuf) { - return cls.toObject(cls.decode(argBuf), options); - }; -} -function createSerializer(cls) { - return function serialize(arg) { - if (Array.isArray(arg)) { - throw new Error(`Failed to serialize message: expected object with ${cls.name} structure, got array instead`); - } - const message = cls.fromObject(arg); - return cls.encode(message).finish(); - }; -} -function createMethodDefinition(method, serviceName, options, fileDescriptors) { - /* This is only ever called after the corresponding root.resolveAll(), so we - * can assume that the resolved request and response types are non-null */ - const requestType = method.resolvedRequestType; - const responseType = method.resolvedResponseType; - return { - path: '/' + serviceName + '/' + method.name, - requestStream: !!method.requestStream, - responseStream: !!method.responseStream, - requestSerialize: createSerializer(requestType), - requestDeserialize: createDeserializer(requestType, options), - responseSerialize: createSerializer(responseType), - responseDeserialize: createDeserializer(responseType, options), - // TODO(murgatroid99): Find a better way to handle this - originalName: camelCase(method.name), - requestType: createMessageDefinition(requestType, fileDescriptors), - responseType: createMessageDefinition(responseType, fileDescriptors), - }; -} -function createServiceDefinition(service, name, options, fileDescriptors) { - const def = {}; - for (const method of service.methodsArray) { - def[method.name] = createMethodDefinition(method, name, options, fileDescriptors); - } - return def; -} -function createMessageDefinition(message, fileDescriptors) { - const messageDescriptor = message.toDescriptor('proto3'); - return { - format: 'Protocol Buffer 3 DescriptorProto', - type: messageDescriptor.$type.toObject(messageDescriptor, descriptorOptions), - fileDescriptorProtos: fileDescriptors, - }; -} -function createEnumDefinition(enumType, fileDescriptors) { - const enumDescriptor = enumType.toDescriptor('proto3'); - return { - format: 'Protocol Buffer 3 EnumDescriptorProto', - type: enumDescriptor.$type.toObject(enumDescriptor, descriptorOptions), - fileDescriptorProtos: fileDescriptors, - }; -} -/** - * function createDefinition(obj: Protobuf.Service, name: string, options: - * Options): ServiceDefinition; function createDefinition(obj: Protobuf.Type, - * name: string, options: Options): MessageTypeDefinition; function - * createDefinition(obj: Protobuf.Enum, name: string, options: Options): - * EnumTypeDefinition; - */ -function createDefinition(obj, name, options, fileDescriptors) { - if (obj instanceof Protobuf.Service) { - return createServiceDefinition(obj, name, options, fileDescriptors); - } - else if (obj instanceof Protobuf.Type) { - return createMessageDefinition(obj, fileDescriptors); - } - else if (obj instanceof Protobuf.Enum) { - return createEnumDefinition(obj, fileDescriptors); - } - else { - throw new Error('Type mismatch in reflection object handling'); - } -} -function createPackageDefinition(root, options) { - const def = {}; - root.resolveAll(); - const descriptorList = root.toDescriptor('proto3').file; - const bufferList = descriptorList.map(value => Buffer.from(descriptor.FileDescriptorProto.encode(value).finish())); - for (const [name, obj] of getAllHandledReflectionObjects(root, '')) { - def[name] = createDefinition(obj, name, options, bufferList); - } - return def; -} -function createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options) { - options = options || {}; - const root = Protobuf.Root.fromDescriptor(decodedDescriptorSet); - root.resolveAll(); - return createPackageDefinition(root, options); -} -/** - * Load a .proto file with the specified options. - * @param filename One or multiple file paths to load. Can be an absolute path - * or relative to an include path. - * @param options.keepCase Preserve field names. The default is to change them - * to camel case. - * @param options.longs The type that should be used to represent `long` values. - * Valid options are `Number` and `String`. Defaults to a `Long` object type - * from a library. - * @param options.enums The type that should be used to represent `enum` values. - * The only valid option is `String`. Defaults to the numeric value. - * @param options.bytes The type that should be used to represent `bytes` - * values. Valid options are `Array` and `String`. The default is to use - * `Buffer`. - * @param options.defaults Set default values on output objects. Defaults to - * `false`. - * @param options.arrays Set empty arrays for missing array values even if - * `defaults` is `false`. Defaults to `false`. - * @param options.objects Set empty objects for missing object values even if - * `defaults` is `false`. Defaults to `false`. - * @param options.oneofs Set virtual oneof properties to the present field's - * name - * @param options.json Represent Infinity and NaN as strings in float fields, - * and automatically decode google.protobuf.Any values. - * @param options.includeDirs Paths to search for imported `.proto` files. - */ -function load(filename, options) { - return util_1.loadProtosWithOptions(filename, options).then(loadedRoot => { - return createPackageDefinition(loadedRoot, options); - }); -} -exports.load = load; -function loadSync(filename, options) { - const loadedRoot = util_1.loadProtosWithOptionsSync(filename, options); - return createPackageDefinition(loadedRoot, options); -} -exports.loadSync = loadSync; -function fromJSON(json, options) { - options = options || {}; - const loadedRoot = Protobuf.Root.fromJSON(json); - loadedRoot.resolveAll(); - return createPackageDefinition(loadedRoot, options); -} -exports.fromJSON = fromJSON; -function loadFileDescriptorSetFromBuffer(descriptorSet, options) { - const decodedDescriptorSet = descriptor.FileDescriptorSet.decode(descriptorSet); - return createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options); -} -exports.loadFileDescriptorSetFromBuffer = loadFileDescriptorSetFromBuffer; -function loadFileDescriptorSetFromObject(descriptorSet, options) { - const decodedDescriptorSet = descriptor.FileDescriptorSet.fromObject(descriptorSet); - return createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options); -} -exports.loadFileDescriptorSetFromObject = loadFileDescriptorSetFromObject; -util_1.addCommonProtos(); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 13245: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * @license - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fs = __nccwpck_require__(57147); -const path = __nccwpck_require__(71017); -const Protobuf = __nccwpck_require__(85881); -function addIncludePathResolver(root, includePaths) { - const originalResolvePath = root.resolvePath; - root.resolvePath = (origin, target) => { - if (path.isAbsolute(target)) { - return target; - } - for (const directory of includePaths) { - const fullPath = path.join(directory, target); - try { - fs.accessSync(fullPath, fs.constants.R_OK); - return fullPath; - } - catch (err) { - continue; - } - } - process.emitWarning(`${target} not found in any of the include paths ${includePaths}`); - return originalResolvePath(origin, target); - }; -} -async function loadProtosWithOptions(filename, options) { - const root = new Protobuf.Root(); - options = options || {}; - if (!!options.includeDirs) { - if (!Array.isArray(options.includeDirs)) { - return Promise.reject(new Error('The includeDirs option must be an array')); - } - addIncludePathResolver(root, options.includeDirs); - } - const loadedRoot = await root.load(filename, options); - loadedRoot.resolveAll(); - return loadedRoot; -} -exports.loadProtosWithOptions = loadProtosWithOptions; -function loadProtosWithOptionsSync(filename, options) { - const root = new Protobuf.Root(); - options = options || {}; - if (!!options.includeDirs) { - if (!Array.isArray(options.includeDirs)) { - throw new Error('The includeDirs option must be an array'); - } - addIncludePathResolver(root, options.includeDirs); - } - const loadedRoot = root.loadSync(filename, options); - loadedRoot.resolveAll(); - return loadedRoot; -} -exports.loadProtosWithOptionsSync = loadProtosWithOptionsSync; -/** - * Load Google's well-known proto files that aren't exposed by Protobuf.js. - */ -function addCommonProtos() { - // Protobuf.js exposes: any, duration, empty, field_mask, struct, timestamp, - // and wrappers. compiler/plugin is excluded in Protobuf.js and here. - // Using constant strings for compatibility with tools like Webpack - const apiDescriptor = __nccwpck_require__(44784); - const descriptorDescriptor = __nccwpck_require__(43571); - const sourceContextDescriptor = __nccwpck_require__(73342); - const typeDescriptor = __nccwpck_require__(58783); - Protobuf.common('api', apiDescriptor.nested.google.nested.protobuf.nested); - Protobuf.common('descriptor', descriptorDescriptor.nested.google.nested.protobuf.nested); - Protobuf.common('source_context', sourceContextDescriptor.nested.google.nested.protobuf.nested); - Protobuf.common('type', typeDescriptor.nested.google.nested.protobuf.nested); -} -exports.addCommonProtos = addCommonProtos; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 12592: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "t", ({ - value: true -})); - -class TreeNode { - constructor(t, e, s = 1) { - this.i = undefined; - this.h = undefined; - this.o = undefined; - this.u = t; - this.l = e; - this.p = s; - } - I() { - let t = this; - const e = t.o.o === t; - if (e && t.p === 1) { - t = t.h; - } else if (t.i) { - t = t.i; - while (t.h) { - t = t.h; - } - } else { - if (e) { - return t.o; - } - let s = t.o; - while (s.i === t) { - t = s; - s = t.o; - } - t = s; - } - return t; - } - B() { - let t = this; - if (t.h) { - t = t.h; - while (t.i) { - t = t.i; - } - return t; - } else { - let e = t.o; - while (e.h === t) { - t = e; - e = t.o; - } - if (t.h !== e) { - return e; - } else return t; - } - } - _() { - const t = this.o; - const e = this.h; - const s = e.i; - if (t.o === this) t.o = e; else if (t.i === this) t.i = e; else t.h = e; - e.o = t; - e.i = this; - this.o = e; - this.h = s; - if (s) s.o = this; - return e; - } - g() { - const t = this.o; - const e = this.i; - const s = e.h; - if (t.o === this) t.o = e; else if (t.i === this) t.i = e; else t.h = e; - e.o = t; - e.h = this; - this.o = e; - this.i = s; - if (s) s.o = this; - return e; - } -} - -class TreeNodeEnableIndex extends TreeNode { - constructor() { - super(...arguments); - this.M = 1; - } - _() { - const t = super._(); - this.O(); - t.O(); - return t; - } - g() { - const t = super.g(); - this.O(); - t.O(); - return t; - } - O() { - this.M = 1; - if (this.i) { - this.M += this.i.M; - } - if (this.h) { - this.M += this.h.M; - } - } -} - -class ContainerIterator { - constructor(t = 0) { - this.iteratorType = t; - } - equals(t) { - return this.T === t.T; - } -} - -class Base { - constructor() { - this.m = 0; - } - get length() { - return this.m; - } - size() { - return this.m; - } - empty() { - return this.m === 0; - } -} - -class Container extends Base {} - -function throwIteratorAccessError() { - throw new RangeError("Iterator access denied!"); -} - -class TreeContainer extends Container { - constructor(t = function(t, e) { - if (t < e) return -1; - if (t > e) return 1; - return 0; - }, e = false) { - super(); - this.v = undefined; - this.A = t; - this.enableIndex = e; - this.N = e ? TreeNodeEnableIndex : TreeNode; - this.C = new this.N; - } - R(t, e) { - let s = this.C; - while (t) { - const i = this.A(t.u, e); - if (i < 0) { - t = t.h; - } else if (i > 0) { - s = t; - t = t.i; - } else return t; - } - return s; - } - K(t, e) { - let s = this.C; - while (t) { - const i = this.A(t.u, e); - if (i <= 0) { - t = t.h; - } else { - s = t; - t = t.i; - } - } - return s; - } - L(t, e) { - let s = this.C; - while (t) { - const i = this.A(t.u, e); - if (i < 0) { - s = t; - t = t.h; - } else if (i > 0) { - t = t.i; - } else return t; - } - return s; - } - k(t, e) { - let s = this.C; - while (t) { - const i = this.A(t.u, e); - if (i < 0) { - s = t; - t = t.h; - } else { - t = t.i; - } - } - return s; - } - P(t) { - while (true) { - const e = t.o; - if (e === this.C) return; - if (t.p === 1) { - t.p = 0; - return; - } - if (t === e.i) { - const s = e.h; - if (s.p === 1) { - s.p = 0; - e.p = 1; - if (e === this.v) { - this.v = e._(); - } else e._(); - } else { - if (s.h && s.h.p === 1) { - s.p = e.p; - e.p = 0; - s.h.p = 0; - if (e === this.v) { - this.v = e._(); - } else e._(); - return; - } else if (s.i && s.i.p === 1) { - s.p = 1; - s.i.p = 0; - s.g(); - } else { - s.p = 1; - t = e; - } - } - } else { - const s = e.i; - if (s.p === 1) { - s.p = 0; - e.p = 1; - if (e === this.v) { - this.v = e.g(); - } else e.g(); - } else { - if (s.i && s.i.p === 1) { - s.p = e.p; - e.p = 0; - s.i.p = 0; - if (e === this.v) { - this.v = e.g(); - } else e.g(); - return; - } else if (s.h && s.h.p === 1) { - s.p = 1; - s.h.p = 0; - s._(); - } else { - s.p = 1; - t = e; - } - } - } - } - } - S(t) { - if (this.m === 1) { - this.clear(); - return; - } - let e = t; - while (e.i || e.h) { - if (e.h) { - e = e.h; - while (e.i) e = e.i; - } else { - e = e.i; - } - const s = t.u; - t.u = e.u; - e.u = s; - const i = t.l; - t.l = e.l; - e.l = i; - t = e; - } - if (this.C.i === e) { - this.C.i = e.o; - } else if (this.C.h === e) { - this.C.h = e.o; - } - this.P(e); - let s = e.o; - if (e === s.i) { - s.i = undefined; - } else s.h = undefined; - this.m -= 1; - this.v.p = 0; - if (this.enableIndex) { - while (s !== this.C) { - s.M -= 1; - s = s.o; - } - } - } - U(t) { - const e = typeof t === "number" ? t : undefined; - const s = typeof t === "function" ? t : undefined; - const i = typeof t === "undefined" ? [] : undefined; - let r = 0; - let n = this.v; - const h = []; - while (h.length || n) { - if (n) { - h.push(n); - n = n.i; - } else { - n = h.pop(); - if (r === e) return n; - i && i.push(n); - s && s(n, r, this); - r += 1; - n = n.h; - } - } - return i; - } - j(t) { - while (true) { - const e = t.o; - if (e.p === 0) return; - const s = e.o; - if (e === s.i) { - const i = s.h; - if (i && i.p === 1) { - i.p = e.p = 0; - if (s === this.v) return; - s.p = 1; - t = s; - continue; - } else if (t === e.h) { - t.p = 0; - if (t.i) { - t.i.o = e; - } - if (t.h) { - t.h.o = s; - } - e.h = t.i; - s.i = t.h; - t.i = e; - t.h = s; - if (s === this.v) { - this.v = t; - this.C.o = t; - } else { - const e = s.o; - if (e.i === s) { - e.i = t; - } else e.h = t; - } - t.o = s.o; - e.o = t; - s.o = t; - s.p = 1; - } else { - e.p = 0; - if (s === this.v) { - this.v = s.g(); - } else s.g(); - s.p = 1; - return; - } - } else { - const i = s.i; - if (i && i.p === 1) { - i.p = e.p = 0; - if (s === this.v) return; - s.p = 1; - t = s; - continue; - } else if (t === e.i) { - t.p = 0; - if (t.i) { - t.i.o = s; - } - if (t.h) { - t.h.o = e; - } - s.h = t.i; - e.i = t.h; - t.i = s; - t.h = e; - if (s === this.v) { - this.v = t; - this.C.o = t; - } else { - const e = s.o; - if (e.i === s) { - e.i = t; - } else e.h = t; - } - t.o = s.o; - e.o = t; - s.o = t; - s.p = 1; - } else { - e.p = 0; - if (s === this.v) { - this.v = s._(); - } else s._(); - s.p = 1; - return; - } - } - if (this.enableIndex) { - e.O(); - s.O(); - t.O(); - } - return; - } - } - q(t, e, s) { - if (this.v === undefined) { - this.m += 1; - this.v = new this.N(t, e, 0); - this.v.o = this.C; - this.C.o = this.C.i = this.C.h = this.v; - return this.m; - } - let i; - const r = this.C.i; - const n = this.A(r.u, t); - if (n === 0) { - r.l = e; - return this.m; - } else if (n > 0) { - r.i = new this.N(t, e); - r.i.o = r; - i = r.i; - this.C.i = i; - } else { - const r = this.C.h; - const n = this.A(r.u, t); - if (n === 0) { - r.l = e; - return this.m; - } else if (n < 0) { - r.h = new this.N(t, e); - r.h.o = r; - i = r.h; - this.C.h = i; - } else { - if (s !== undefined) { - const r = s.T; - if (r !== this.C) { - const s = this.A(r.u, t); - if (s === 0) { - r.l = e; - return this.m; - } else if (s > 0) { - const s = r.I(); - const n = this.A(s.u, t); - if (n === 0) { - s.l = e; - return this.m; - } else if (n < 0) { - i = new this.N(t, e); - if (s.h === undefined) { - s.h = i; - i.o = s; - } else { - r.i = i; - i.o = r; - } - } - } - } - } - if (i === undefined) { - i = this.v; - while (true) { - const s = this.A(i.u, t); - if (s > 0) { - if (i.i === undefined) { - i.i = new this.N(t, e); - i.i.o = i; - i = i.i; - break; - } - i = i.i; - } else if (s < 0) { - if (i.h === undefined) { - i.h = new this.N(t, e); - i.h.o = i; - i = i.h; - break; - } - i = i.h; - } else { - i.l = e; - return this.m; - } - } - } - } - } - if (this.enableIndex) { - let t = i.o; - while (t !== this.C) { - t.M += 1; - t = t.o; - } - } - this.j(i); - this.m += 1; - return this.m; - } - H(t, e) { - while (t) { - const s = this.A(t.u, e); - if (s < 0) { - t = t.h; - } else if (s > 0) { - t = t.i; - } else return t; - } - return t || this.C; - } - clear() { - this.m = 0; - this.v = undefined; - this.C.o = undefined; - this.C.i = this.C.h = undefined; - } - updateKeyByIterator(t, e) { - const s = t.T; - if (s === this.C) { - throwIteratorAccessError(); - } - if (this.m === 1) { - s.u = e; - return true; - } - const i = s.B().u; - if (s === this.C.i) { - if (this.A(i, e) > 0) { - s.u = e; - return true; - } - return false; - } - const r = s.I().u; - if (s === this.C.h) { - if (this.A(r, e) < 0) { - s.u = e; - return true; - } - return false; - } - if (this.A(r, e) >= 0 || this.A(i, e) <= 0) return false; - s.u = e; - return true; - } - eraseElementByPos(t) { - if (t < 0 || t > this.m - 1) { - throw new RangeError; - } - const e = this.U(t); - this.S(e); - return this.m; - } - eraseElementByKey(t) { - if (this.m === 0) return false; - const e = this.H(this.v, t); - if (e === this.C) return false; - this.S(e); - return true; - } - eraseElementByIterator(t) { - const e = t.T; - if (e === this.C) { - throwIteratorAccessError(); - } - const s = e.h === undefined; - const i = t.iteratorType === 0; - if (i) { - if (s) t.next(); - } else { - if (!s || e.i === undefined) t.next(); - } - this.S(e); - return t; - } - getHeight() { - if (this.m === 0) return 0; - function traversal(t) { - if (!t) return 0; - return Math.max(traversal(t.i), traversal(t.h)) + 1; - } - return traversal(this.v); - } -} - -class TreeIterator extends ContainerIterator { - constructor(t, e, s) { - super(s); - this.T = t; - this.C = e; - if (this.iteratorType === 0) { - this.pre = function() { - if (this.T === this.C.i) { - throwIteratorAccessError(); - } - this.T = this.T.I(); - return this; - }; - this.next = function() { - if (this.T === this.C) { - throwIteratorAccessError(); - } - this.T = this.T.B(); - return this; - }; - } else { - this.pre = function() { - if (this.T === this.C.h) { - throwIteratorAccessError(); - } - this.T = this.T.B(); - return this; - }; - this.next = function() { - if (this.T === this.C) { - throwIteratorAccessError(); - } - this.T = this.T.I(); - return this; - }; - } - } - get index() { - let t = this.T; - const e = this.C.o; - if (t === this.C) { - if (e) { - return e.M - 1; - } - return 0; - } - let s = 0; - if (t.i) { - s += t.i.M; - } - while (t !== e) { - const e = t.o; - if (t === e.h) { - s += 1; - if (e.i) { - s += e.i.M; - } - } - t = e; - } - return s; - } - isAccessible() { - return this.T !== this.C; - } -} - -class OrderedMapIterator extends TreeIterator { - constructor(t, e, s, i) { - super(t, e, i); - this.container = s; - } - get pointer() { - if (this.T === this.C) { - throwIteratorAccessError(); - } - const t = this; - return new Proxy([], { - get(e, s) { - if (s === "0") return t.T.u; else if (s === "1") return t.T.l; - e[0] = t.T.u; - e[1] = t.T.l; - return e[s]; - }, - set(e, s, i) { - if (s !== "1") { - throw new TypeError("prop must be 1"); - } - t.T.l = i; - return true; - } - }); - } - copy() { - return new OrderedMapIterator(this.T, this.C, this.container, this.iteratorType); - } -} - -class OrderedMap extends TreeContainer { - constructor(t = [], e, s) { - super(e, s); - const i = this; - t.forEach((function(t) { - i.setElement(t[0], t[1]); - })); - } - begin() { - return new OrderedMapIterator(this.C.i || this.C, this.C, this); - } - end() { - return new OrderedMapIterator(this.C, this.C, this); - } - rBegin() { - return new OrderedMapIterator(this.C.h || this.C, this.C, this, 1); - } - rEnd() { - return new OrderedMapIterator(this.C, this.C, this, 1); - } - front() { - if (this.m === 0) return; - const t = this.C.i; - return [ t.u, t.l ]; - } - back() { - if (this.m === 0) return; - const t = this.C.h; - return [ t.u, t.l ]; - } - lowerBound(t) { - const e = this.R(this.v, t); - return new OrderedMapIterator(e, this.C, this); - } - upperBound(t) { - const e = this.K(this.v, t); - return new OrderedMapIterator(e, this.C, this); - } - reverseLowerBound(t) { - const e = this.L(this.v, t); - return new OrderedMapIterator(e, this.C, this); - } - reverseUpperBound(t) { - const e = this.k(this.v, t); - return new OrderedMapIterator(e, this.C, this); - } - forEach(t) { - this.U((function(e, s, i) { - t([ e.u, e.l ], s, i); - })); - } - setElement(t, e, s) { - return this.q(t, e, s); - } - getElementByPos(t) { - if (t < 0 || t > this.m - 1) { - throw new RangeError; - } - const e = this.U(t); - return [ e.u, e.l ]; - } - find(t) { - const e = this.H(this.v, t); - return new OrderedMapIterator(e, this.C, this); - } - getElementByKey(t) { - const e = this.H(this.v, t); - return e.l; - } - union(t) { - const e = this; - t.forEach((function(t) { - e.setElement(t[0], t[1]); - })); - return this.m; - } - * [Symbol.iterator]() { - const t = this.m; - const e = this.U(); - for (let s = 0; s < t; ++s) { - const t = e[s]; - yield [ t.u, t.l ]; - } - } -} - -exports.OrderedMap = OrderedMap; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 40334: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createTokenAuth: () => createTokenAuth -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/auth.js -var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; -var REGEX_IS_INSTALLATION = /^ghs_/; -var REGEX_IS_USER_TO_SERVER = /^ghu_/; -async function auth(token) { - const isApp = token.split(/\./).length === 3; - const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); - const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); - const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; - return { - type: "token", - token, - tokenType - }; -} - -// pkg/dist-src/with-authorization-prefix.js -function withAuthorizationPrefix(token) { - if (token.split(/\./).length === 3) { - return `bearer ${token}`; - } - return `token ${token}`; -} - -// pkg/dist-src/hook.js -async function hook(token, request, route, parameters) { - const endpoint = request.endpoint.merge( - route, - parameters - ); - endpoint.headers.authorization = withAuthorizationPrefix(token); - return request(endpoint); -} - -// pkg/dist-src/index.js -var createTokenAuth = function createTokenAuth2(token) { - if (!token) { - throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); - } - if (typeof token !== "string") { - throw new Error( - "[@octokit/auth-token] Token passed to createTokenAuth is not a string" - ); - } - token = token.replace(/^(token|bearer) +/i, ""); - return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) - }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 76762: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - Octokit: () => Octokit -}); -module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(45030); -var import_before_after_hook = __nccwpck_require__(83682); -var import_request = __nccwpck_require__(36234); -var import_graphql = __nccwpck_require__(88467); -var import_auth_token = __nccwpck_require__(40334); - -// pkg/dist-src/version.js -var VERSION = "5.2.0"; - -// pkg/dist-src/index.js -var noop = () => { -}; -var consoleWarn = console.warn.bind(console); -var consoleError = console.error.bind(console); -var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var Octokit = class { - static { - this.VERSION = VERSION; - } - static defaults(defaults) { - const OctokitWithDefaults = class extends this { - constructor(...args) { - const options = args[0] || {}; - if (typeof defaults === "function") { - super(defaults(options)); - return; - } - super( - Object.assign( - {}, - defaults, - options, - options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` - } : null - ) - ); - } - }; - return OctokitWithDefaults; - } - static { - this.plugins = []; - } - /** - * Attach a plugin (or many) to your Octokit instance. - * - * @example - * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) - */ - static plugin(...newPlugins) { - const currentPlugins = this.plugins; - const NewOctokit = class extends this { - static { - this.plugins = currentPlugins.concat( - newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) - ); - } - }; - return NewOctokit; - } - constructor(options = {}) { - const hook = new import_before_after_hook.Collection(); - const requestDefaults = { - baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, - headers: {}, - request: Object.assign({}, options.request, { - // @ts-ignore internal usage only, no need to type - hook: hook.bind(null, "request") - }), - mediaType: { - previews: [], - format: "" - } - }; - requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; - if (options.baseUrl) { - requestDefaults.baseUrl = options.baseUrl; - } - if (options.previews) { - requestDefaults.mediaType.previews = options.previews; - } - if (options.timeZone) { - requestDefaults.headers["time-zone"] = options.timeZone; - } - this.request = import_request.request.defaults(requestDefaults); - this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); - this.log = Object.assign( - { - debug: noop, - info: noop, - warn: consoleWarn, - error: consoleError - }, - options.log - ); - this.hook = hook; - if (!options.authStrategy) { - if (!options.auth) { - this.auth = async () => ({ - type: "unauthenticated" - }); - } else { - const auth = (0, import_auth_token.createTokenAuth)(options.auth); - hook.wrap("request", auth.hook); - this.auth = auth; - } - } else { - const { authStrategy, ...otherOptions } = options; - const auth = authStrategy( - Object.assign( - { - request: this.request, - log: this.log, - // we pass the current octokit instance as well as its constructor options - // to allow for authentication strategies that return a new octokit instance - // that shares the same internal state as the current one. The original - // requirement for this was the "event-octokit" authentication strategy - // of https://github.com/probot/octokit-auth-probot. - octokit: this, - octokitOptions: otherOptions - }, - options.auth - ) - ); - hook.wrap("request", auth.hook); - this.auth = auth; - } - const classConstructor = this.constructor; - for (let i = 0; i < classConstructor.plugins.length; ++i) { - Object.assign(this, classConstructor.plugins[i](this, options)); - } - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 59440: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - endpoint: () => endpoint -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/defaults.js -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "9.0.5"; - -// pkg/dist-src/defaults.js -var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "" - } -}; - -// pkg/dist-src/util/lowercase-keys.js -function lowercaseKeys(object) { - if (!object) { - return {}; - } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} - -// pkg/dist-src/util/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} - -// pkg/dist-src/util/merge-deep.js -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach((key) => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) - Object.assign(result, { [key]: options[key] }); - else - result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { [key]: options[key] }); - } - }); - return result; -} - -// pkg/dist-src/util/remove-undefined-properties.js -function removeUndefinedProperties(obj) { - for (const key in obj) { - if (obj[key] === void 0) { - delete obj[key]; - } - } - return obj; -} - -// pkg/dist-src/merge.js -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); - } else { - options = Object.assign({}, route); - } - options.headers = lowercaseKeys(options.headers); - removeUndefinedProperties(options); - removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); - if (options.url === "/graphql") { - if (defaults && defaults.mediaType.previews?.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( - (preview) => !mergedOptions.mediaType.previews.includes(preview) - ).concat(mergedOptions.mediaType.previews); - } - mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); - } - return mergedOptions; -} - -// pkg/dist-src/util/add-query-parameters.js -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url; - } - return url + separator + names.map((name) => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); - } - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} - -// pkg/dist-src/util/extract-url-variable-names.js -var urlVariableRegex = /\{[^}]+\}/g; -function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); -} -function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); - if (!matches) { - return []; - } - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); -} - -// pkg/dist-src/util/omit.js -function omit(object, keysToOmit) { - const result = { __proto__: null }; - for (const key of Object.keys(object)) { - if (keysToOmit.indexOf(key) === -1) { - result[key] = object[key]; - } - } - return result; -} - -// pkg/dist-src/util/url-template.js -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - return part; - }).join(""); -} -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; - } -} -function isDefined(value) { - return value !== void 0 && value !== null; -} -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues(context, operator, key, modifier) { - var value = context[key], result = []; - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push( - encodeValue(operator, value, isKeyOperator(operator) ? key : "") - ); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - result.push( - encodeValue(operator, value2, isKeyOperator(operator) ? key : "") - ); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - tmp.push(encodeValue(operator, value2)); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); - } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); - } - } - return result; -} -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - template = template.replace( - /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - expression.split(/,/g).forEach(function(variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; - } - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); - } - } else { - return encodeReserved(literal); - } - } - ); - if (template === "/") { - return template; - } else { - return template.replace(/\/$/, ""); - } -} - -// pkg/dist-src/parse.js -function parse(options) { - let method = options.method.toUpperCase(); - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { - if (options.mediaType.format) { - headers.accept = headers.accept.split(/,/).map( - (format) => format.replace( - /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, - `application/vnd$1$2.${options.mediaType.format}` - ) - ).join(","); - } - if (url.endsWith("/graphql")) { - if (options.mediaType.previews?.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); - } - } - } - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } - } - } - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - return Object.assign( - { method, url, headers }, - typeof body !== "undefined" ? { body } : null, - options.request ? { request: options.request } : null - ); -} - -// pkg/dist-src/endpoint-with-defaults.js -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS2 = merge(oldDefaults, newDefaults); - const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); - return Object.assign(endpoint2, { - DEFAULTS: DEFAULTS2, - defaults: withDefaults.bind(null, DEFAULTS2), - merge: merge.bind(null, DEFAULTS2), - parse - }); -} - -// pkg/dist-src/index.js -var endpoint = withDefaults(null, DEFAULTS); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 88467: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - GraphqlResponseError: () => GraphqlResponseError, - graphql: () => graphql2, - withCustomRequest: () => withCustomRequest -}); -module.exports = __toCommonJS(dist_src_exports); -var import_request3 = __nccwpck_require__(36234); -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "7.1.0"; - -// pkg/dist-src/with-defaults.js -var import_request2 = __nccwpck_require__(36234); - -// pkg/dist-src/graphql.js -var import_request = __nccwpck_require__(36234); - -// pkg/dist-src/error.js -function _buildMessageForResponseErrors(data) { - return `Request failed due to following response errors: -` + data.errors.map((e) => ` - ${e.message}`).join("\n"); -} -var GraphqlResponseError = class extends Error { - constructor(request2, headers, response) { - super(_buildMessageForResponseErrors(response)); - this.request = request2; - this.headers = headers; - this.response = response; - this.name = "GraphqlResponseError"; - this.errors = response.errors; - this.data = response.data; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - } -}; - -// pkg/dist-src/graphql.js -var NON_VARIABLE_OPTIONS = [ - "method", - "baseUrl", - "url", - "headers", - "request", - "query", - "mediaType" -]; -var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; -var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; -function graphql(request2, query, options) { - if (options) { - if (typeof query === "string" && "query" in options) { - return Promise.reject( - new Error(`[@octokit/graphql] "query" cannot be used as variable name`) - ); - } - for (const key in options) { - if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) - continue; - return Promise.reject( - new Error( - `[@octokit/graphql] "${key}" cannot be used as variable name` - ) - ); - } - } - const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; - const requestOptions = Object.keys( - parsedOptions - ).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = parsedOptions[key]; - return result; - } - if (!result.variables) { - result.variables = {}; - } - result.variables[key] = parsedOptions[key]; - return result; - }, {}); - const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; - if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { - requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); - } - return request2(requestOptions).then((response) => { - if (response.data.errors) { - const headers = {}; - for (const key of Object.keys(response.headers)) { - headers[key] = response.headers[key]; - } - throw new GraphqlResponseError( - requestOptions, - headers, - response.data - ); - } - return response.data.data; - }); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(request2, newDefaults) { - const newRequest = request2.defaults(newDefaults); - const newApi = (query, options) => { - return graphql(newRequest, query, options); - }; - return Object.assign(newApi, { - defaults: withDefaults.bind(null, newRequest), - endpoint: newRequest.endpoint - }); -} - -// pkg/dist-src/index.js -var graphql2 = withDefaults(import_request3.request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - }, - method: "POST", - url: "/graphql" -}); -function withCustomRequest(customRequest) { - return withDefaults(customRequest, { - method: "POST", - url: "/graphql" - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 10537: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - RequestError: () => RequestError -}); -module.exports = __toCommonJS(dist_src_exports); -var import_deprecation = __nccwpck_require__(58932); -var import_once = __toESM(__nccwpck_require__(1223)); -var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var RequestError = class extends Error { - constructor(message, statusCode, options) { - super(message); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = "HttpError"; - this.status = statusCode; - let headers; - if ("headers" in options && typeof options.headers !== "undefined") { - headers = options.headers; - } - if ("response" in options) { - this.response = options.response; - headers = options.response.headers; - } - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - / .*$/, - " [REDACTED]" - ) - }); - } - requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - Object.defineProperty(this, "code", { - get() { - logOnceCode( - new import_deprecation.Deprecation( - "[@octokit/request-error] `error.code` is deprecated, use `error.status`." - ) - ); - return statusCode; - } - }); - Object.defineProperty(this, "headers", { - get() { - logOnceHeaders( - new import_deprecation.Deprecation( - "[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`." - ) - ); - return headers || {}; - } - }); - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 36234: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - request: () => request -}); -module.exports = __toCommonJS(dist_src_exports); -var import_endpoint = __nccwpck_require__(59440); -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "8.4.0"; - -// pkg/dist-src/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} - -// pkg/dist-src/fetch-wrapper.js -var import_request_error = __nccwpck_require__(10537); - -// pkg/dist-src/get-buffer-response.js -function getBufferResponse(response) { - return response.arrayBuffer(); -} - -// pkg/dist-src/fetch-wrapper.js -function fetchWrapper(requestOptions) { - var _a, _b, _c, _d; - const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; - if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - let headers = {}; - let status; - let url; - let { fetch } = globalThis; - if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { - fetch = requestOptions.request.fetch; - } - if (!fetch) { - throw new Error( - "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" - ); - } - return fetch(requestOptions.url, { - method: requestOptions.method, - body: requestOptions.body, - redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, - headers: requestOptions.headers, - signal: (_d = requestOptions.request) == null ? void 0 : _d.signal, - // duplex must be set if request.body is ReadableStream or Async Iterables. - // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. - ...requestOptions.body && { duplex: "half" } - }).then(async (response) => { - url = response.url; - status = response.status; - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - if ("deprecation" in headers) { - const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn( - `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); - } - if (status === 204 || status === 205) { - return; - } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; - } - throw new import_request_error.RequestError(response.statusText, status, { - response: { - url, - status, - headers, - data: void 0 - }, - request: requestOptions - }); - } - if (status === 304) { - throw new import_request_error.RequestError("Not modified", status, { - response: { - url, - status, - headers, - data: await getResponseData(response) - }, - request: requestOptions - }); - } - if (status >= 400) { - const data = await getResponseData(response); - const error = new import_request_error.RequestError(toErrorMessage(data), status, { - response: { - url, - status, - headers, - data - }, - request: requestOptions - }); - throw error; - } - return parseSuccessResponseBody ? await getResponseData(response) : response.body; - }).then((data) => { - return { - status, - url, - headers, - data - }; - }).catch((error) => { - if (error instanceof import_request_error.RequestError) - throw error; - else if (error.name === "AbortError") - throw error; - let message = error.message; - if (error.name === "TypeError" && "cause" in error) { - if (error.cause instanceof Error) { - message = error.cause.message; - } else if (typeof error.cause === "string") { - message = error.cause; - } - } - throw new import_request_error.RequestError(message, 500, { - request: requestOptions - }); - }); -} -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json().catch(() => response.text()).catch(() => ""); - } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - return getBufferResponse(response); -} -function toErrorMessage(data) { - if (typeof data === "string") - return data; - let suffix; - if ("documentation_url" in data) { - suffix = ` - ${data.documentation_url}`; - } else { - suffix = ""; - } - if ("message" in data) { - if (Array.isArray(data.errors)) { - return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; - } - return `${data.message}${suffix}`; - } - return `Unknown error: ${JSON.stringify(data)}`; -} - -// pkg/dist-src/with-defaults.js -function withDefaults(oldEndpoint, newDefaults) { - const endpoint2 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { - const endpointOptions = endpoint2.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint2.parse(endpointOptions)); - } - const request2 = (route2, parameters2) => { - return fetchWrapper( - endpoint2.parse(endpoint2.merge(route2, parameters2)) - ); - }; - Object.assign(request2, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); - return endpointOptions.request.hook(request2, endpointOptions); - }; - return Object.assign(newApi, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); -} - -// pkg/dist-src/index.js -var request = withDefaults(import_endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 57171: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ContextAPI = void 0; -var NoopContextManager_1 = __nccwpck_require__(54118); -var global_utils_1 = __nccwpck_require__(85135); -var diag_1 = __nccwpck_require__(11877); -var API_NAME = 'context'; -var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager(); -/** - * Singleton object which represents the entry point to the OpenTelemetry Context API - */ -var ContextAPI = /** @class */ (function () { - /** Empty private constructor prevents end users from constructing a new instance of the API */ - function ContextAPI() { - } - /** Get the singleton instance of the Context API */ - ContextAPI.getInstance = function () { - if (!this._instance) { - this._instance = new ContextAPI(); - } - return this._instance; - }; - /** - * Set the current context manager. - * - * @returns true if the context manager was successfully registered, else false - */ - ContextAPI.prototype.setGlobalContextManager = function (contextManager) { - return global_utils_1.registerGlobal(API_NAME, contextManager, diag_1.DiagAPI.instance()); - }; - /** - * Get the currently active context - */ - ContextAPI.prototype.active = function () { - return this._getContextManager().active(); - }; - /** - * Execute a function with an active context - * - * @param context context to be active during function execution - * @param fn function to execute in a context - * @param thisArg optional receiver to be used for calling fn - * @param args optional arguments forwarded to fn - */ - ContextAPI.prototype.with = function (context, fn, thisArg) { - var _a; - var args = []; - for (var _i = 3; _i < arguments.length; _i++) { - args[_i - 3] = arguments[_i]; - } - return (_a = this._getContextManager()).with.apply(_a, __spreadArray([context, fn, thisArg], args)); - }; - /** - * Bind a context to a target function or event emitter - * - * @param context context to bind to the event emitter or function. Defaults to the currently active context - * @param target function or event emitter to bind - */ - ContextAPI.prototype.bind = function (context, target) { - return this._getContextManager().bind(context, target); - }; - ContextAPI.prototype._getContextManager = function () { - return global_utils_1.getGlobal(API_NAME) || NOOP_CONTEXT_MANAGER; - }; - /** Disable and remove the global context manager */ - ContextAPI.prototype.disable = function () { - this._getContextManager().disable(); - global_utils_1.unregisterGlobal(API_NAME, diag_1.DiagAPI.instance()); - }; - return ContextAPI; -}()); -exports.ContextAPI = ContextAPI; -//# sourceMappingURL=context.js.map - -/***/ }), - -/***/ 11877: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiagAPI = void 0; -var ComponentLogger_1 = __nccwpck_require__(17978); -var logLevelLogger_1 = __nccwpck_require__(99639); -var types_1 = __nccwpck_require__(78077); -var global_utils_1 = __nccwpck_require__(85135); -var API_NAME = 'diag'; -/** - * Singleton object which represents the entry point to the OpenTelemetry internal - * diagnostic API - */ -var DiagAPI = /** @class */ (function () { - /** - * Private internal constructor - * @private - */ - function DiagAPI() { - function _logProxy(funcName) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var logger = global_utils_1.getGlobal('diag'); - // shortcut if logger not set - if (!logger) - return; - return logger[funcName].apply(logger, args); - }; - } - // Using self local variable for minification purposes as 'this' cannot be minified - var self = this; - // DiagAPI specific functions - self.setLogger = function (logger, logLevel) { - var _a, _b; - if (logLevel === void 0) { logLevel = types_1.DiagLogLevel.INFO; } - if (logger === self) { - // There isn't much we can do here. - // Logging to the console might break the user application. - // Try to log to self. If a logger was previously registered it will receive the log. - var err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation'); - self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message); - return false; - } - var oldLogger = global_utils_1.getGlobal('diag'); - var newLogger = logLevelLogger_1.createLogLevelDiagLogger(logLevel, logger); - // There already is an logger registered. We'll let it know before overwriting it. - if (oldLogger) { - var stack = (_b = new Error().stack) !== null && _b !== void 0 ? _b : ''; - oldLogger.warn("Current logger will be overwritten from " + stack); - newLogger.warn("Current logger will overwrite one already registered from " + stack); - } - return global_utils_1.registerGlobal('diag', newLogger, self, true); - }; - self.disable = function () { - global_utils_1.unregisterGlobal(API_NAME, self); - }; - self.createComponentLogger = function (options) { - return new ComponentLogger_1.DiagComponentLogger(options); - }; - self.verbose = _logProxy('verbose'); - self.debug = _logProxy('debug'); - self.info = _logProxy('info'); - self.warn = _logProxy('warn'); - self.error = _logProxy('error'); - } - /** Get the singleton instance of the DiagAPI API */ - DiagAPI.instance = function () { - if (!this._instance) { - this._instance = new DiagAPI(); - } - return this._instance; - }; - return DiagAPI; -}()); -exports.DiagAPI = DiagAPI; -//# sourceMappingURL=diag.js.map - -/***/ }), - -/***/ 89909: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PropagationAPI = void 0; -var global_utils_1 = __nccwpck_require__(85135); -var NoopTextMapPropagator_1 = __nccwpck_require__(72368); -var TextMapPropagator_1 = __nccwpck_require__(80865); -var context_helpers_1 = __nccwpck_require__(37682); -var utils_1 = __nccwpck_require__(28136); -var diag_1 = __nccwpck_require__(11877); -var API_NAME = 'propagation'; -var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator(); -/** - * Singleton object which represents the entry point to the OpenTelemetry Propagation API - */ -var PropagationAPI = /** @class */ (function () { - /** Empty private constructor prevents end users from constructing a new instance of the API */ - function PropagationAPI() { - this.createBaggage = utils_1.createBaggage; - this.getBaggage = context_helpers_1.getBaggage; - this.setBaggage = context_helpers_1.setBaggage; - this.deleteBaggage = context_helpers_1.deleteBaggage; - } - /** Get the singleton instance of the Propagator API */ - PropagationAPI.getInstance = function () { - if (!this._instance) { - this._instance = new PropagationAPI(); - } - return this._instance; - }; - /** - * Set the current propagator. - * - * @returns true if the propagator was successfully registered, else false - */ - PropagationAPI.prototype.setGlobalPropagator = function (propagator) { - return global_utils_1.registerGlobal(API_NAME, propagator, diag_1.DiagAPI.instance()); - }; - /** - * Inject context into a carrier to be propagated inter-process - * - * @param context Context carrying tracing data to inject - * @param carrier carrier to inject context into - * @param setter Function used to set values on the carrier - */ - PropagationAPI.prototype.inject = function (context, carrier, setter) { - if (setter === void 0) { setter = TextMapPropagator_1.defaultTextMapSetter; } - return this._getGlobalPropagator().inject(context, carrier, setter); - }; - /** - * Extract context from a carrier - * - * @param context Context which the newly created context will inherit from - * @param carrier Carrier to extract context from - * @param getter Function used to extract keys from a carrier - */ - PropagationAPI.prototype.extract = function (context, carrier, getter) { - if (getter === void 0) { getter = TextMapPropagator_1.defaultTextMapGetter; } - return this._getGlobalPropagator().extract(context, carrier, getter); - }; - /** - * Return a list of all fields which may be used by the propagator. - */ - PropagationAPI.prototype.fields = function () { - return this._getGlobalPropagator().fields(); - }; - /** Remove the global propagator */ - PropagationAPI.prototype.disable = function () { - global_utils_1.unregisterGlobal(API_NAME, diag_1.DiagAPI.instance()); - }; - PropagationAPI.prototype._getGlobalPropagator = function () { - return global_utils_1.getGlobal(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR; - }; - return PropagationAPI; -}()); -exports.PropagationAPI = PropagationAPI; -//# sourceMappingURL=propagation.js.map - -/***/ }), - -/***/ 81539: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceAPI = void 0; -var global_utils_1 = __nccwpck_require__(85135); -var ProxyTracerProvider_1 = __nccwpck_require__(2285); -var spancontext_utils_1 = __nccwpck_require__(49745); -var context_utils_1 = __nccwpck_require__(23326); -var diag_1 = __nccwpck_require__(11877); -var API_NAME = 'trace'; -/** - * Singleton object which represents the entry point to the OpenTelemetry Tracing API - */ -var TraceAPI = /** @class */ (function () { - /** Empty private constructor prevents end users from constructing a new instance of the API */ - function TraceAPI() { - this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider(); - this.wrapSpanContext = spancontext_utils_1.wrapSpanContext; - this.isSpanContextValid = spancontext_utils_1.isSpanContextValid; - this.deleteSpan = context_utils_1.deleteSpan; - this.getSpan = context_utils_1.getSpan; - this.getSpanContext = context_utils_1.getSpanContext; - this.setSpan = context_utils_1.setSpan; - this.setSpanContext = context_utils_1.setSpanContext; - } - /** Get the singleton instance of the Trace API */ - TraceAPI.getInstance = function () { - if (!this._instance) { - this._instance = new TraceAPI(); - } - return this._instance; - }; - /** - * Set the current global tracer. - * - * @returns true if the tracer provider was successfully registered, else false - */ - TraceAPI.prototype.setGlobalTracerProvider = function (provider) { - var success = global_utils_1.registerGlobal(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance()); - if (success) { - this._proxyTracerProvider.setDelegate(provider); - } - return success; - }; - /** - * Returns the global tracer provider. - */ - TraceAPI.prototype.getTracerProvider = function () { - return global_utils_1.getGlobal(API_NAME) || this._proxyTracerProvider; - }; - /** - * Returns a tracer from the global tracer provider. - */ - TraceAPI.prototype.getTracer = function (name, version) { - return this.getTracerProvider().getTracer(name, version); - }; - /** Remove the global tracer provider */ - TraceAPI.prototype.disable = function () { - global_utils_1.unregisterGlobal(API_NAME, diag_1.DiagAPI.instance()); - this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider(); - }; - return TraceAPI; -}()); -exports.TraceAPI = TraceAPI; -//# sourceMappingURL=trace.js.map - -/***/ }), - -/***/ 37682: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.deleteBaggage = exports.setBaggage = exports.getBaggage = void 0; -var context_1 = __nccwpck_require__(78242); -/** - * Baggage key - */ -var BAGGAGE_KEY = context_1.createContextKey('OpenTelemetry Baggage Key'); -/** - * Retrieve the current baggage from the given context - * - * @param {Context} Context that manage all context values - * @returns {Baggage} Extracted baggage from the context - */ -function getBaggage(context) { - return context.getValue(BAGGAGE_KEY) || undefined; -} -exports.getBaggage = getBaggage; -/** - * Store a baggage in the given context - * - * @param {Context} Context that manage all context values - * @param {Baggage} baggage that will be set in the actual context - */ -function setBaggage(context, baggage) { - return context.setValue(BAGGAGE_KEY, baggage); -} -exports.setBaggage = setBaggage; -/** - * Delete the baggage stored in the given context - * - * @param {Context} Context that manage all context values - */ -function deleteBaggage(context) { - return context.deleteValue(BAGGAGE_KEY); -} -exports.deleteBaggage = deleteBaggage; -//# sourceMappingURL=context-helpers.js.map - -/***/ }), - -/***/ 84811: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BaggageImpl = void 0; -var BaggageImpl = /** @class */ (function () { - function BaggageImpl(entries) { - this._entries = entries ? new Map(entries) : new Map(); - } - BaggageImpl.prototype.getEntry = function (key) { - var entry = this._entries.get(key); - if (!entry) { - return undefined; - } - return Object.assign({}, entry); - }; - BaggageImpl.prototype.getAllEntries = function () { - return Array.from(this._entries.entries()).map(function (_a) { - var k = _a[0], v = _a[1]; - return [k, v]; - }); - }; - BaggageImpl.prototype.setEntry = function (key, entry) { - var newBaggage = new BaggageImpl(this._entries); - newBaggage._entries.set(key, entry); - return newBaggage; - }; - BaggageImpl.prototype.removeEntry = function (key) { - var newBaggage = new BaggageImpl(this._entries); - newBaggage._entries.delete(key); - return newBaggage; - }; - BaggageImpl.prototype.removeEntries = function () { - var keys = []; - for (var _i = 0; _i < arguments.length; _i++) { - keys[_i] = arguments[_i]; - } - var newBaggage = new BaggageImpl(this._entries); - for (var _a = 0, keys_1 = keys; _a < keys_1.length; _a++) { - var key = keys_1[_a]; - newBaggage._entries.delete(key); - } - return newBaggage; - }; - BaggageImpl.prototype.clear = function () { - return new BaggageImpl(); - }; - return BaggageImpl; -}()); -exports.BaggageImpl = BaggageImpl; -//# sourceMappingURL=baggage-impl.js.map - -/***/ }), - -/***/ 23542: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.baggageEntryMetadataSymbol = void 0; -/** - * Symbol used to make BaggageEntryMetadata an opaque type - */ -exports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata'); -//# sourceMappingURL=symbol.js.map - -/***/ }), - -/***/ 91508: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 28136: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.baggageEntryMetadataFromString = exports.createBaggage = void 0; -var diag_1 = __nccwpck_require__(11877); -var baggage_impl_1 = __nccwpck_require__(84811); -var symbol_1 = __nccwpck_require__(23542); -var diag = diag_1.DiagAPI.instance(); -/** - * Create a new Baggage with optional entries - * - * @param entries An array of baggage entries the new baggage should contain - */ -function createBaggage(entries) { - if (entries === void 0) { entries = {}; } - return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries))); -} -exports.createBaggage = createBaggage; -/** - * Create a serializable BaggageEntryMetadata object from a string. - * - * @param str string metadata. Format is currently not defined by the spec and has no special meaning. - * - */ -function baggageEntryMetadataFromString(str) { - if (typeof str !== 'string') { - diag.error("Cannot create baggage metadata from unknown type: " + typeof str); - str = ''; - } - return { - __TYPE__: symbol_1.baggageEntryMetadataSymbol, - toString: function () { - return str; - }, - }; -} -exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 1109: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=Attributes.js.map - -/***/ }), - -/***/ 14447: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=Exception.js.map - -/***/ }), - -/***/ 92358: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=Time.js.map - -/***/ }), - -/***/ 54118: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoopContextManager = void 0; -var context_1 = __nccwpck_require__(78242); -var NoopContextManager = /** @class */ (function () { - function NoopContextManager() { - } - NoopContextManager.prototype.active = function () { - return context_1.ROOT_CONTEXT; - }; - NoopContextManager.prototype.with = function (_context, fn, thisArg) { - var args = []; - for (var _i = 3; _i < arguments.length; _i++) { - args[_i - 3] = arguments[_i]; - } - return fn.call.apply(fn, __spreadArray([thisArg], args)); - }; - NoopContextManager.prototype.bind = function (_context, target) { - return target; - }; - NoopContextManager.prototype.enable = function () { - return this; - }; - NoopContextManager.prototype.disable = function () { - return this; - }; - return NoopContextManager; -}()); -exports.NoopContextManager = NoopContextManager; -//# sourceMappingURL=NoopContextManager.js.map - -/***/ }), - -/***/ 78242: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ROOT_CONTEXT = exports.createContextKey = void 0; -/** Get a key to uniquely identify a context value */ -function createContextKey(description) { - // The specification states that for the same input, multiple calls should - // return different keys. Due to the nature of the JS dependency management - // system, this creates problems where multiple versions of some package - // could hold different keys for the same property. - // - // Therefore, we use Symbol.for which returns the same key for the same input. - return Symbol.for(description); -} -exports.createContextKey = createContextKey; -var BaseContext = /** @class */ (function () { - /** - * Construct a new context which inherits values from an optional parent context. - * - * @param parentContext a context from which to inherit values - */ - function BaseContext(parentContext) { - // for minification - var self = this; - self._currentContext = parentContext ? new Map(parentContext) : new Map(); - self.getValue = function (key) { return self._currentContext.get(key); }; - self.setValue = function (key, value) { - var context = new BaseContext(self._currentContext); - context._currentContext.set(key, value); - return context; - }; - self.deleteValue = function (key) { - var context = new BaseContext(self._currentContext); - context._currentContext.delete(key); - return context; - }; - } - return BaseContext; -}()); -/** The root context is used as the default parent context when there is no active context */ -exports.ROOT_CONTEXT = new BaseContext(); -//# sourceMappingURL=context.js.map - -/***/ }), - -/***/ 36504: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 17978: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiagComponentLogger = void 0; -var global_utils_1 = __nccwpck_require__(85135); -/** - * Component Logger which is meant to be used as part of any component which - * will add automatically additional namespace in front of the log message. - * It will then forward all message to global diag logger - * @example - * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' }); - * cLogger.debug('test'); - * // @opentelemetry/instrumentation-http test - */ -var DiagComponentLogger = /** @class */ (function () { - function DiagComponentLogger(props) { - this._namespace = props.namespace || 'DiagComponentLogger'; - } - DiagComponentLogger.prototype.debug = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return logProxy('debug', this._namespace, args); - }; - DiagComponentLogger.prototype.error = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return logProxy('error', this._namespace, args); - }; - DiagComponentLogger.prototype.info = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return logProxy('info', this._namespace, args); - }; - DiagComponentLogger.prototype.warn = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return logProxy('warn', this._namespace, args); - }; - DiagComponentLogger.prototype.verbose = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return logProxy('verbose', this._namespace, args); - }; - return DiagComponentLogger; -}()); -exports.DiagComponentLogger = DiagComponentLogger; -function logProxy(funcName, namespace, args) { - var logger = global_utils_1.getGlobal('diag'); - // shortcut if logger not set - if (!logger) { - return; - } - args.unshift(namespace); - return logger[funcName].apply(logger, args); -} -//# sourceMappingURL=ComponentLogger.js.map - -/***/ }), - -/***/ 3041: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiagConsoleLogger = void 0; -var consoleMap = [ - { n: 'error', c: 'error' }, - { n: 'warn', c: 'warn' }, - { n: 'info', c: 'info' }, - { n: 'debug', c: 'debug' }, - { n: 'verbose', c: 'trace' }, -]; -/** - * A simple Immutable Console based diagnostic logger which will output any messages to the Console. - * If you want to limit the amount of logging to a specific level or lower use the - * {@link createLogLevelDiagLogger} - */ -var DiagConsoleLogger = /** @class */ (function () { - function DiagConsoleLogger() { - function _consoleFunc(funcName) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (console) { - // Some environments only expose the console when the F12 developer console is open - // eslint-disable-next-line no-console - var theFunc = console[funcName]; - if (typeof theFunc !== 'function') { - // Not all environments support all functions - // eslint-disable-next-line no-console - theFunc = console.log; - } - // One last final check - if (typeof theFunc === 'function') { - return theFunc.apply(console, args); - } - } - }; - } - for (var i = 0; i < consoleMap.length; i++) { - this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c); - } - } - return DiagConsoleLogger; -}()); -exports.DiagConsoleLogger = DiagConsoleLogger; -//# sourceMappingURL=consoleLogger.js.map - -/***/ }), - -/***/ 31634: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(3041), exports); -__exportStar(__nccwpck_require__(78077), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 99639: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createLogLevelDiagLogger = void 0; -var types_1 = __nccwpck_require__(78077); -function createLogLevelDiagLogger(maxLevel, logger) { - if (maxLevel < types_1.DiagLogLevel.NONE) { - maxLevel = types_1.DiagLogLevel.NONE; - } - else if (maxLevel > types_1.DiagLogLevel.ALL) { - maxLevel = types_1.DiagLogLevel.ALL; - } - // In case the logger is null or undefined - logger = logger || {}; - function _filterFunc(funcName, theLevel) { - var theFunc = logger[funcName]; - if (typeof theFunc === 'function' && maxLevel >= theLevel) { - return theFunc.bind(logger); - } - return function () { }; - } - return { - error: _filterFunc('error', types_1.DiagLogLevel.ERROR), - warn: _filterFunc('warn', types_1.DiagLogLevel.WARN), - info: _filterFunc('info', types_1.DiagLogLevel.INFO), - debug: _filterFunc('debug', types_1.DiagLogLevel.DEBUG), - verbose: _filterFunc('verbose', types_1.DiagLogLevel.VERBOSE), - }; -} -exports.createLogLevelDiagLogger = createLogLevelDiagLogger; -//# sourceMappingURL=logLevelLogger.js.map - -/***/ }), - -/***/ 78077: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiagLogLevel = void 0; -/** - * Defines the available internal logging levels for the diagnostic logger, the numeric values - * of the levels are defined to match the original values from the initial LogLevel to avoid - * compatibility/migration issues for any implementation that assume the numeric ordering. - */ -var DiagLogLevel; -(function (DiagLogLevel) { - /** Diagnostic Logging level setting to disable all logging (except and forced logs) */ - DiagLogLevel[DiagLogLevel["NONE"] = 0] = "NONE"; - /** Identifies an error scenario */ - DiagLogLevel[DiagLogLevel["ERROR"] = 30] = "ERROR"; - /** Identifies a warning scenario */ - DiagLogLevel[DiagLogLevel["WARN"] = 50] = "WARN"; - /** General informational log message */ - DiagLogLevel[DiagLogLevel["INFO"] = 60] = "INFO"; - /** General debug log message */ - DiagLogLevel[DiagLogLevel["DEBUG"] = 70] = "DEBUG"; - /** - * Detailed trace level logging should only be used for development, should only be set - * in a development environment. - */ - DiagLogLevel[DiagLogLevel["VERBOSE"] = 80] = "VERBOSE"; - /** Used to set the logging level to include all logging */ - DiagLogLevel[DiagLogLevel["ALL"] = 9999] = "ALL"; -})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {})); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 65163: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.baggageEntryMetadataFromString = void 0; -__exportStar(__nccwpck_require__(91508), exports); -var utils_1 = __nccwpck_require__(28136); -Object.defineProperty(exports, "baggageEntryMetadataFromString", ({ enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } })); -__exportStar(__nccwpck_require__(14447), exports); -__exportStar(__nccwpck_require__(92358), exports); -__exportStar(__nccwpck_require__(1109), exports); -__exportStar(__nccwpck_require__(31634), exports); -__exportStar(__nccwpck_require__(80865), exports); -__exportStar(__nccwpck_require__(57492), exports); -__exportStar(__nccwpck_require__(44023), exports); -__exportStar(__nccwpck_require__(43503), exports); -__exportStar(__nccwpck_require__(2285), exports); -__exportStar(__nccwpck_require__(19671), exports); -__exportStar(__nccwpck_require__(33209), exports); -__exportStar(__nccwpck_require__(15769), exports); -__exportStar(__nccwpck_require__(31424), exports); -__exportStar(__nccwpck_require__(4416), exports); -__exportStar(__nccwpck_require__(20955), exports); -__exportStar(__nccwpck_require__(48845), exports); -__exportStar(__nccwpck_require__(26905), exports); -__exportStar(__nccwpck_require__(88384), exports); -var utils_2 = __nccwpck_require__(32615); -Object.defineProperty(exports, "createTraceState", ({ enumerable: true, get: function () { return utils_2.createTraceState; } })); -__exportStar(__nccwpck_require__(30891), exports); -__exportStar(__nccwpck_require__(33168), exports); -__exportStar(__nccwpck_require__(91823), exports); -var spancontext_utils_1 = __nccwpck_require__(49745); -Object.defineProperty(exports, "isSpanContextValid", ({ enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } })); -Object.defineProperty(exports, "isValidTraceId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } })); -Object.defineProperty(exports, "isValidSpanId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidSpanId; } })); -var invalid_span_constants_1 = __nccwpck_require__(91760); -Object.defineProperty(exports, "INVALID_SPANID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } })); -Object.defineProperty(exports, "INVALID_TRACEID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } })); -Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } })); -__exportStar(__nccwpck_require__(78242), exports); -__exportStar(__nccwpck_require__(36504), exports); -var context_1 = __nccwpck_require__(57171); -/** Entrypoint for context API */ -exports.context = context_1.ContextAPI.getInstance(); -var trace_1 = __nccwpck_require__(81539); -/** Entrypoint for trace API */ -exports.trace = trace_1.TraceAPI.getInstance(); -var propagation_1 = __nccwpck_require__(89909); -/** Entrypoint for propagation API */ -exports.propagation = propagation_1.PropagationAPI.getInstance(); -var diag_1 = __nccwpck_require__(11877); -/** - * Entrypoint for Diag API. - * Defines Diagnostic handler used for internal diagnostic logging operations. - * The default provides a Noop DiagLogger implementation which may be changed via the - * diag.setLogger(logger: DiagLogger) function. - */ -exports.diag = diag_1.DiagAPI.instance(); -exports["default"] = { - trace: exports.trace, - context: exports.context, - propagation: exports.propagation, - diag: exports.diag, -}; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 85135: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0; -var platform_1 = __nccwpck_require__(99957); -var version_1 = __nccwpck_require__(98996); -var semver_1 = __nccwpck_require__(81522); -var major = version_1.VERSION.split('.')[0]; -var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major); -var _global = platform_1._globalThis; -function registerGlobal(type, instance, diag, allowOverride) { - var _a; - if (allowOverride === void 0) { allowOverride = false; } - var api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { - version: version_1.VERSION, - }); - if (!allowOverride && api[type]) { - // already registered an API of this type - var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + type); - diag.error(err.stack || err.message); - return false; - } - if (api.version !== version_1.VERSION) { - // All registered APIs must be of the same version exactly - var err = new Error('@opentelemetry/api: All API registration versions must match'); - diag.error(err.stack || err.message); - return false; - } - api[type] = instance; - diag.debug("@opentelemetry/api: Registered a global for " + type + " v" + version_1.VERSION + "."); - return true; -} -exports.registerGlobal = registerGlobal; -function getGlobal(type) { - var _a, _b; - var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version; - if (!globalVersion || !semver_1.isCompatible(globalVersion)) { - return; - } - return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type]; -} -exports.getGlobal = getGlobal; -function unregisterGlobal(type, diag) { - diag.debug("@opentelemetry/api: Unregistering a global for " + type + " v" + version_1.VERSION + "."); - var api = _global[GLOBAL_OPENTELEMETRY_API_KEY]; - if (api) { - delete api[type]; - } -} -exports.unregisterGlobal = unregisterGlobal; -//# sourceMappingURL=global-utils.js.map - -/***/ }), - -/***/ 81522: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isCompatible = exports._makeCompatibilityCheck = void 0; -var version_1 = __nccwpck_require__(98996); -var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; -/** - * Create a function to test an API version to see if it is compatible with the provided ownVersion. - * - * The returned function has the following semantics: - * - Exact match is always compatible - * - Major versions must match exactly - * - 1.x package cannot use global 2.x package - * - 2.x package cannot use global 1.x package - * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API - * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects - * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3 - * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor - * - Patch and build tag differences are not considered at this time - * - * @param ownVersion version which should be checked against - */ -function _makeCompatibilityCheck(ownVersion) { - var acceptedVersions = new Set([ownVersion]); - var rejectedVersions = new Set(); - var myVersionMatch = ownVersion.match(re); - if (!myVersionMatch) { - // we cannot guarantee compatibility so we always return noop - return function () { return false; }; - } - var ownVersionParsed = { - major: +myVersionMatch[1], - minor: +myVersionMatch[2], - patch: +myVersionMatch[3], - prerelease: myVersionMatch[4], - }; - // if ownVersion has a prerelease tag, versions must match exactly - if (ownVersionParsed.prerelease != null) { - return function isExactmatch(globalVersion) { - return globalVersion === ownVersion; - }; - } - function _reject(v) { - rejectedVersions.add(v); - return false; - } - function _accept(v) { - acceptedVersions.add(v); - return true; - } - return function isCompatible(globalVersion) { - if (acceptedVersions.has(globalVersion)) { - return true; - } - if (rejectedVersions.has(globalVersion)) { - return false; - } - var globalVersionMatch = globalVersion.match(re); - if (!globalVersionMatch) { - // cannot parse other version - // we cannot guarantee compatibility so we always noop - return _reject(globalVersion); - } - var globalVersionParsed = { - major: +globalVersionMatch[1], - minor: +globalVersionMatch[2], - patch: +globalVersionMatch[3], - prerelease: globalVersionMatch[4], - }; - // if globalVersion has a prerelease tag, versions must match exactly - if (globalVersionParsed.prerelease != null) { - return _reject(globalVersion); - } - // major versions must match - if (ownVersionParsed.major !== globalVersionParsed.major) { - return _reject(globalVersion); - } - if (ownVersionParsed.major === 0) { - if (ownVersionParsed.minor === globalVersionParsed.minor && - ownVersionParsed.patch <= globalVersionParsed.patch) { - return _accept(globalVersion); - } - return _reject(globalVersion); - } - if (ownVersionParsed.minor <= globalVersionParsed.minor) { - return _accept(globalVersion); - } - return _reject(globalVersion); - }; -} -exports._makeCompatibilityCheck = _makeCompatibilityCheck; -/** - * Test an API version to see if it is compatible with this API. - * - * - Exact match is always compatible - * - Major versions must match exactly - * - 1.x package cannot use global 2.x package - * - 2.x package cannot use global 1.x package - * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API - * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects - * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3 - * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor - * - Patch and build tag differences are not considered at this time - * - * @param version version of the API requesting an instance of the global API - */ -exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION); -//# sourceMappingURL=semver.js.map - -/***/ }), - -/***/ 99957: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(87200), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 89406: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._globalThis = void 0; -/** only globals that common to node and browsers are allowed */ -// eslint-disable-next-line node/no-unsupported-features/es-builtins -exports._globalThis = typeof globalThis === 'object' ? globalThis : global; -//# sourceMappingURL=globalThis.js.map - -/***/ }), - -/***/ 87200: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(89406), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 72368: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoopTextMapPropagator = void 0; -/** - * No-op implementations of {@link TextMapPropagator}. - */ -var NoopTextMapPropagator = /** @class */ (function () { - function NoopTextMapPropagator() { - } - /** Noop inject function does nothing */ - NoopTextMapPropagator.prototype.inject = function (_context, _carrier) { }; - /** Noop extract function does nothing and returns the input context */ - NoopTextMapPropagator.prototype.extract = function (context, _carrier) { - return context; - }; - NoopTextMapPropagator.prototype.fields = function () { - return []; - }; - return NoopTextMapPropagator; -}()); -exports.NoopTextMapPropagator = NoopTextMapPropagator; -//# sourceMappingURL=NoopTextMapPropagator.js.map - -/***/ }), - -/***/ 80865: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0; -exports.defaultTextMapGetter = { - get: function (carrier, key) { - if (carrier == null) { - return undefined; - } - return carrier[key]; - }, - keys: function (carrier) { - if (carrier == null) { - return []; - } - return Object.keys(carrier); - }, -}; -exports.defaultTextMapSetter = { - set: function (carrier, key, value) { - if (carrier == null) { - return; - } - carrier[key] = value; - }, -}; -//# sourceMappingURL=TextMapPropagator.js.map - -/***/ }), - -/***/ 81462: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NonRecordingSpan = void 0; -var invalid_span_constants_1 = __nccwpck_require__(91760); -/** - * The NonRecordingSpan is the default {@link Span} that is used when no Span - * implementation is available. All operations are no-op including context - * propagation. - */ -var NonRecordingSpan = /** @class */ (function () { - function NonRecordingSpan(_spanContext) { - if (_spanContext === void 0) { _spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT; } - this._spanContext = _spanContext; - } - // Returns a SpanContext. - NonRecordingSpan.prototype.spanContext = function () { - return this._spanContext; - }; - // By default does nothing - NonRecordingSpan.prototype.setAttribute = function (_key, _value) { - return this; - }; - // By default does nothing - NonRecordingSpan.prototype.setAttributes = function (_attributes) { - return this; - }; - // By default does nothing - NonRecordingSpan.prototype.addEvent = function (_name, _attributes) { - return this; - }; - // By default does nothing - NonRecordingSpan.prototype.setStatus = function (_status) { - return this; - }; - // By default does nothing - NonRecordingSpan.prototype.updateName = function (_name) { - return this; - }; - // By default does nothing - NonRecordingSpan.prototype.end = function (_endTime) { }; - // isRecording always returns false for NonRecordingSpan. - NonRecordingSpan.prototype.isRecording = function () { - return false; - }; - // By default does nothing - NonRecordingSpan.prototype.recordException = function (_exception, _time) { }; - return NonRecordingSpan; -}()); -exports.NonRecordingSpan = NonRecordingSpan; -//# sourceMappingURL=NonRecordingSpan.js.map - -/***/ }), - -/***/ 17606: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoopTracer = void 0; -var context_1 = __nccwpck_require__(57171); -var context_utils_1 = __nccwpck_require__(23326); -var NonRecordingSpan_1 = __nccwpck_require__(81462); -var spancontext_utils_1 = __nccwpck_require__(49745); -var context = context_1.ContextAPI.getInstance(); -/** - * No-op implementations of {@link Tracer}. - */ -var NoopTracer = /** @class */ (function () { - function NoopTracer() { - } - // startSpan starts a noop span. - NoopTracer.prototype.startSpan = function (name, options, context) { - var root = Boolean(options === null || options === void 0 ? void 0 : options.root); - if (root) { - return new NonRecordingSpan_1.NonRecordingSpan(); - } - var parentFromContext = context && context_utils_1.getSpanContext(context); - if (isSpanContext(parentFromContext) && - spancontext_utils_1.isSpanContextValid(parentFromContext)) { - return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext); - } - else { - return new NonRecordingSpan_1.NonRecordingSpan(); - } - }; - NoopTracer.prototype.startActiveSpan = function (name, arg2, arg3, arg4) { - var opts; - var ctx; - var fn; - if (arguments.length < 2) { - return; - } - else if (arguments.length === 2) { - fn = arg2; - } - else if (arguments.length === 3) { - opts = arg2; - fn = arg3; - } - else { - opts = arg2; - ctx = arg3; - fn = arg4; - } - var parentContext = ctx !== null && ctx !== void 0 ? ctx : context.active(); - var span = this.startSpan(name, opts, parentContext); - var contextWithSpanSet = context_utils_1.setSpan(parentContext, span); - return context.with(contextWithSpanSet, fn, undefined, span); - }; - return NoopTracer; -}()); -exports.NoopTracer = NoopTracer; -function isSpanContext(spanContext) { - return (typeof spanContext === 'object' && - typeof spanContext['spanId'] === 'string' && - typeof spanContext['traceId'] === 'string' && - typeof spanContext['traceFlags'] === 'number'); -} -//# sourceMappingURL=NoopTracer.js.map - -/***/ }), - -/***/ 23259: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoopTracerProvider = void 0; -var NoopTracer_1 = __nccwpck_require__(17606); -/** - * An implementation of the {@link TracerProvider} which returns an impotent - * Tracer for all calls to `getTracer`. - * - * All operations are no-op. - */ -var NoopTracerProvider = /** @class */ (function () { - function NoopTracerProvider() { - } - NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) { - return new NoopTracer_1.NoopTracer(); - }; - return NoopTracerProvider; -}()); -exports.NoopTracerProvider = NoopTracerProvider; -//# sourceMappingURL=NoopTracerProvider.js.map - -/***/ }), - -/***/ 43503: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ProxyTracer = void 0; -var NoopTracer_1 = __nccwpck_require__(17606); -var NOOP_TRACER = new NoopTracer_1.NoopTracer(); -/** - * Proxy tracer provided by the proxy tracer provider - */ -var ProxyTracer = /** @class */ (function () { - function ProxyTracer(_provider, name, version, options) { - this._provider = _provider; - this.name = name; - this.version = version; - this.options = options; - } - ProxyTracer.prototype.startSpan = function (name, options, context) { - return this._getTracer().startSpan(name, options, context); - }; - ProxyTracer.prototype.startActiveSpan = function (_name, _options, _context, _fn) { - var tracer = this._getTracer(); - return Reflect.apply(tracer.startActiveSpan, tracer, arguments); - }; - /** - * Try to get a tracer from the proxy tracer provider. - * If the proxy tracer provider has no delegate, return a noop tracer. - */ - ProxyTracer.prototype._getTracer = function () { - if (this._delegate) { - return this._delegate; - } - var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options); - if (!tracer) { - return NOOP_TRACER; - } - this._delegate = tracer; - return this._delegate; - }; - return ProxyTracer; -}()); -exports.ProxyTracer = ProxyTracer; -//# sourceMappingURL=ProxyTracer.js.map - -/***/ }), - -/***/ 2285: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ProxyTracerProvider = void 0; -var ProxyTracer_1 = __nccwpck_require__(43503); -var NoopTracerProvider_1 = __nccwpck_require__(23259); -var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider(); -/** - * Tracer provider which provides {@link ProxyTracer}s. - * - * Before a delegate is set, tracers provided are NoOp. - * When a delegate is set, traces are provided from the delegate. - * When a delegate is set after tracers have already been provided, - * all tracers already provided will use the provided delegate implementation. - */ -var ProxyTracerProvider = /** @class */ (function () { - function ProxyTracerProvider() { - } - /** - * Get a {@link ProxyTracer} - */ - ProxyTracerProvider.prototype.getTracer = function (name, version, options) { - var _a; - return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options)); - }; - ProxyTracerProvider.prototype.getDelegate = function () { - var _a; - return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER; - }; - /** - * Set the delegate tracer provider - */ - ProxyTracerProvider.prototype.setDelegate = function (delegate) { - this._delegate = delegate; - }; - ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) { - var _a; - return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options); - }; - return ProxyTracerProvider; -}()); -exports.ProxyTracerProvider = ProxyTracerProvider; -//# sourceMappingURL=ProxyTracerProvider.js.map - -/***/ }), - -/***/ 19671: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=Sampler.js.map - -/***/ }), - -/***/ 33209: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SamplingDecision = void 0; -/** - * A sampling decision that determines how a {@link Span} will be recorded - * and collected. - */ -var SamplingDecision; -(function (SamplingDecision) { - /** - * `Span.isRecording() === false`, span will not be recorded and all events - * and attributes will be dropped. - */ - SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD"; - /** - * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags} - * MUST NOT be set. - */ - SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD"; - /** - * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags} - * MUST be set. - */ - SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED"; -})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {})); -//# sourceMappingURL=SamplingResult.js.map - -/***/ }), - -/***/ 20955: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=SpanOptions.js.map - -/***/ }), - -/***/ 57492: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=attributes.js.map - -/***/ }), - -/***/ 23326: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getSpan = void 0; -var context_1 = __nccwpck_require__(78242); -var NonRecordingSpan_1 = __nccwpck_require__(81462); -/** - * span key - */ -var SPAN_KEY = context_1.createContextKey('OpenTelemetry Context Key SPAN'); -/** - * Return the span if one exists - * - * @param context context to get span from - */ -function getSpan(context) { - return context.getValue(SPAN_KEY) || undefined; -} -exports.getSpan = getSpan; -/** - * Set the span on a context - * - * @param context context to use as parent - * @param span span to set active - */ -function setSpan(context, span) { - return context.setValue(SPAN_KEY, span); -} -exports.setSpan = setSpan; -/** - * Remove current span stored in the context - * - * @param context context to delete span from - */ -function deleteSpan(context) { - return context.deleteValue(SPAN_KEY); -} -exports.deleteSpan = deleteSpan; -/** - * Wrap span context in a NoopSpan and set as span in a new - * context - * - * @param context context to set active span on - * @param spanContext span context to be wrapped - */ -function setSpanContext(context, spanContext) { - return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext)); -} -exports.setSpanContext = setSpanContext; -/** - * Get the span context of the span if it exists. - * - * @param context context to get values from - */ -function getSpanContext(context) { - var _a; - return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext(); -} -exports.getSpanContext = getSpanContext; -//# sourceMappingURL=context-utils.js.map - -/***/ }), - -/***/ 62110: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceStateImpl = void 0; -var tracestate_validators_1 = __nccwpck_require__(54864); -var MAX_TRACE_STATE_ITEMS = 32; -var MAX_TRACE_STATE_LEN = 512; -var LIST_MEMBERS_SEPARATOR = ','; -var LIST_MEMBER_KEY_VALUE_SPLITTER = '='; -/** - * TraceState must be a class and not a simple object type because of the spec - * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). - * - * Here is the list of allowed mutations: - * - New key-value pair should be added into the beginning of the list - * - The value of any key can be updated. Modified keys MUST be moved to the - * beginning of the list. - */ -var TraceStateImpl = /** @class */ (function () { - function TraceStateImpl(rawTraceState) { - this._internalState = new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - TraceStateImpl.prototype.set = function (key, value) { - // TODO: Benchmark the different approaches(map vs list) and - // use the faster one. - var traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); - } - traceState._internalState.set(key, value); - return traceState; - }; - TraceStateImpl.prototype.unset = function (key) { - var traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - }; - TraceStateImpl.prototype.get = function (key) { - return this._internalState.get(key); - }; - TraceStateImpl.prototype.serialize = function () { - var _this = this; - return this._keys() - .reduce(function (agg, key) { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key)); - return agg; - }, []) - .join(LIST_MEMBERS_SEPARATOR); - }; - TraceStateImpl.prototype._parse = function (rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN) - return; - this._internalState = rawTraceState - .split(LIST_MEMBERS_SEPARATOR) - .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning - .reduce(function (agg, part) { - var listMember = part.trim(); // Optional Whitespace (OWS) handling - var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); - if (i !== -1) { - var key = listMember.slice(0, i); - var value = listMember.slice(i + 1, part.length); - if (tracestate_validators_1.validateKey(key) && tracestate_validators_1.validateValue(value)) { - agg.set(key, value); - } - else { - // TODO: Consider to add warning log - } - } - return agg; - }, new Map()); - // Because of the reverse() requirement, trunc must be done after map is created - if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { - this._internalState = new Map(Array.from(this._internalState.entries()) - .reverse() // Use reverse same as original tracestate parse chain - .slice(0, MAX_TRACE_STATE_ITEMS)); - } - }; - TraceStateImpl.prototype._keys = function () { - return Array.from(this._internalState.keys()).reverse(); - }; - TraceStateImpl.prototype._clone = function () { - var traceState = new TraceStateImpl(); - traceState._internalState = new Map(this._internalState); - return traceState; - }; - return TraceStateImpl; -}()); -exports.TraceStateImpl = TraceStateImpl; -//# sourceMappingURL=tracestate-impl.js.map - -/***/ }), - -/***/ 54864: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateValue = exports.validateKey = void 0; -var VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; -var VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}"; -var VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}"; -var VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$"); -var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; -/** - * Key is opaque string up to 256 characters printable. It MUST begin with a - * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, - * underscores _, dashes -, asterisks *, and forward slashes /. - * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the - * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. - * see https://www.w3.org/TR/trace-context/#key - */ -function validateKey(key) { - return VALID_KEY_REGEX.test(key); -} -exports.validateKey = validateKey; -/** - * Value is opaque string up to 256 characters printable ASCII RFC0020 - * characters (i.e., the range 0x20 to 0x7E) except comma , and =. - */ -function validateValue(value) { - return (VALID_VALUE_BASE_REGEX.test(value) && - !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); -} -exports.validateValue = validateValue; -//# sourceMappingURL=tracestate-validators.js.map - -/***/ }), - -/***/ 32615: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createTraceState = void 0; -var tracestate_impl_1 = __nccwpck_require__(62110); -function createTraceState(rawTraceState) { - return new tracestate_impl_1.TraceStateImpl(rawTraceState); -} -exports.createTraceState = createTraceState; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 91760: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0; -var trace_flags_1 = __nccwpck_require__(26905); -exports.INVALID_SPANID = '0000000000000000'; -exports.INVALID_TRACEID = '00000000000000000000000000000000'; -exports.INVALID_SPAN_CONTEXT = { - traceId: exports.INVALID_TRACEID, - spanId: exports.INVALID_SPANID, - traceFlags: trace_flags_1.TraceFlags.NONE, -}; -//# sourceMappingURL=invalid-span-constants.js.map - -/***/ }), - -/***/ 44023: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=link.js.map - -/***/ }), - -/***/ 4416: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=span.js.map - -/***/ }), - -/***/ 15769: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=span_context.js.map - -/***/ }), - -/***/ 31424: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpanKind = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var SpanKind; -(function (SpanKind) { - /** Default value. Indicates that the span is used internally. */ - SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL"; - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote request. - */ - SpanKind[SpanKind["SERVER"] = 1] = "SERVER"; - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - */ - SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT"; - /** - * Indicates that the span describes producer sending a message to a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER"; - /** - * Indicates that the span describes consumer receiving a message from a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER"; -})(SpanKind = exports.SpanKind || (exports.SpanKind = {})); -//# sourceMappingURL=span_kind.js.map - -/***/ }), - -/***/ 49745: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var invalid_span_constants_1 = __nccwpck_require__(91760); -var NonRecordingSpan_1 = __nccwpck_require__(81462); -var VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i; -var VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i; -function isValidTraceId(traceId) { - return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID; -} -exports.isValidTraceId = isValidTraceId; -function isValidSpanId(spanId) { - return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID; -} -exports.isValidSpanId = isValidSpanId; -/** - * Returns true if this {@link SpanContext} is valid. - * @return true if this {@link SpanContext} is valid. - */ -function isSpanContextValid(spanContext) { - return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId)); -} -exports.isSpanContextValid = isSpanContextValid; -/** - * Wrap the given {@link SpanContext} in a new non-recording {@link Span} - * - * @param spanContext span context to be wrapped - * @returns a new non-recording {@link Span} with the provided context - */ -function wrapSpanContext(spanContext) { - return new NonRecordingSpan_1.NonRecordingSpan(spanContext); -} -exports.wrapSpanContext = wrapSpanContext; -//# sourceMappingURL=spancontext-utils.js.map - -/***/ }), - -/***/ 48845: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpanStatusCode = void 0; -/** - * An enumeration of status codes. - */ -var SpanStatusCode; -(function (SpanStatusCode) { - /** - * The default status. - */ - SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET"; - /** - * The operation has been validated by an Application developer or - * Operator to have completed successfully. - */ - SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK"; - /** - * The operation contains an error. - */ - SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR"; -})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {})); -//# sourceMappingURL=status.js.map - -/***/ }), - -/***/ 26905: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceFlags = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var TraceFlags; -(function (TraceFlags) { - /** Represents no flag set. */ - TraceFlags[TraceFlags["NONE"] = 0] = "NONE"; - /** Bit to represent whether trace is sampled in trace flags. */ - TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED"; -})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {})); -//# sourceMappingURL=trace_flags.js.map - -/***/ }), - -/***/ 88384: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=trace_state.js.map - -/***/ }), - -/***/ 33168: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=tracer.js.map - -/***/ }), - -/***/ 91823: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=tracer_options.js.map - -/***/ }), - -/***/ 30891: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=tracer_provider.js.map - -/***/ }), - -/***/ 98996: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VERSION = void 0; -// this is autogenerated file, see scripts/version-update.js -exports.VERSION = '1.1.0'; -//# sourceMappingURL=version.js.map - -/***/ }), - -/***/ 67959: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExportResultCode = void 0; -var ExportResultCode; -(function (ExportResultCode) { - ExportResultCode[ExportResultCode["SUCCESS"] = 0] = "SUCCESS"; - ExportResultCode[ExportResultCode["FAILED"] = 1] = "FAILED"; -})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {})); -//# sourceMappingURL=ExportResult.js.map - -/***/ }), - -/***/ 36178: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0; -exports.BAGGAGE_KEY_PAIR_SEPARATOR = '='; -exports.BAGGAGE_PROPERTIES_SEPARATOR = ';'; -exports.BAGGAGE_ITEMS_SEPARATOR = ','; -// Name of the http header used to propagate the baggage -exports.BAGGAGE_HEADER = 'baggage'; -// Maximum number of name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180; -// Maximum number of bytes per a single name-value pair allowed by w3c spec -exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096; -// Maximum total length of all name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 61476: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CBaggagePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(54463); -const constants_1 = __nccwpck_require__(36178); -const utils_1 = __nccwpck_require__(49884); -/** - * Propagates {@link Baggage} through Context format propagation. - * - * Based on the Baggage specification: - * https://w3c.github.io/baggage/ - */ -class W3CBaggagePropagator { - inject(context, carrier, setter) { - const baggage = api_1.propagation.getBaggage(context); - if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context)) - return; - const keyPairs = (0, utils_1.getKeyPairs)(baggage) - .filter((pair) => { - return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS; - }) - .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS); - const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs); - if (headerValue.length > 0) { - setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue); - } - } - extract(context, carrier, getter) { - const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER); - const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue; - if (!baggageString) - return context; - const baggage = {}; - if (baggageString.length === 0) { - return context; - } - const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR); - pairs.forEach(entry => { - const keyPair = (0, utils_1.parsePairKeyValue)(entry); - if (keyPair) { - const baggageEntry = { value: keyPair.value }; - if (keyPair.metadata) { - baggageEntry.metadata = keyPair.metadata; - } - baggage[keyPair.key] = baggageEntry; - } - }); - if (Object.entries(baggage).length === 0) { - return context; - } - return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage)); - } - fields() { - return [constants_1.BAGGAGE_HEADER]; - } -} -exports.W3CBaggagePropagator = W3CBaggagePropagator; -//# sourceMappingURL=W3CBaggagePropagator.js.map - -/***/ }), - -/***/ 49884: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const api_1 = __nccwpck_require__(65163); -const constants_1 = __nccwpck_require__(36178); -function serializeKeyPairs(keyPairs) { - return keyPairs.reduce((hValue, current) => { - const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`; - return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value; - }, ''); -} -exports.serializeKeyPairs = serializeKeyPairs; -function getKeyPairs(baggage) { - return baggage.getAllEntries().map(([key, value]) => { - let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`; - // include opaque metadata if provided - // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation - if (value.metadata !== undefined) { - entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString(); - } - return entry; - }); -} -exports.getKeyPairs = getKeyPairs; -function parsePairKeyValue(entry) { - const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR); - if (valueProps.length <= 0) - return; - const keyPairPart = valueProps.shift(); - if (!keyPairPart) - return; - const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR); - if (keyPair.length !== 2) - return; - const key = decodeURIComponent(keyPair[0].trim()); - const value = decodeURIComponent(keyPair[1].trim()); - let metadata; - if (valueProps.length > 0) { - metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR)); - } - return { key, value, metadata }; -} -exports.parsePairKeyValue = parsePairKeyValue; -/** - * Parse a string serialized in the baggage HTTP Format (without metadata): - * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md - */ -function parseKeyPairsIntoRecord(value) { - if (typeof value !== 'string' || value.length === 0) - return {}; - return value - .split(constants_1.BAGGAGE_ITEMS_SEPARATOR) - .map(entry => { - return parsePairKeyValue(entry); - }) - .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0) - .reduce((headers, keyPair) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - headers[keyPair.key] = keyPair.value; - return headers; - }, {}); -} -exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 82807: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0; -const api_1 = __nccwpck_require__(65163); -function sanitizeAttributes(attributes) { - const out = {}; - if (typeof attributes !== 'object' || attributes == null) { - return out; - } - for (const [key, val] of Object.entries(attributes)) { - if (!isAttributeKey(key)) { - api_1.diag.warn(`Invalid attribute key: ${key}`); - continue; - } - if (!isAttributeValue(val)) { - api_1.diag.warn(`Invalid attribute value set for key: ${key}`); - continue; - } - if (Array.isArray(val)) { - out[key] = val.slice(); - } - else { - out[key] = val; - } - } - return out; -} -exports.sanitizeAttributes = sanitizeAttributes; -function isAttributeKey(key) { - return typeof key === 'string' && key.length > 0; -} -exports.isAttributeKey = isAttributeKey; -function isAttributeValue(val) { - if (val == null) { - return true; - } - if (Array.isArray(val)) { - return isHomogeneousAttributeValueArray(val); - } - return isValidPrimitiveAttributeValue(val); -} -exports.isAttributeValue = isAttributeValue; -function isHomogeneousAttributeValueArray(arr) { - let type; - for (const element of arr) { - // null/undefined elements are allowed - if (element == null) - continue; - if (!type) { - if (isValidPrimitiveAttributeValue(element)) { - type = typeof element; - continue; - } - // encountered an invalid primitive - return false; - } - if (typeof element === type) { - continue; - } - return false; - } - return true; -} -function isValidPrimitiveAttributeValue(val) { - switch (typeof val) { - case 'number': - case 'boolean': - case 'string': - return true; - } - return false; -} -//# sourceMappingURL=attributes.js.map - -/***/ }), - -/***/ 69246: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.globalErrorHandler = exports.setGlobalErrorHandler = void 0; -const logging_error_handler_1 = __nccwpck_require__(32882); -/** The global error handler delegate */ -let delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)(); -/** - * Set the global error handler - * @param {ErrorHandler} handler - */ -function setGlobalErrorHandler(handler) { - delegateHandler = handler; -} -exports.setGlobalErrorHandler = setGlobalErrorHandler; -/** - * Return the global error handler - * @param {Exception} ex - */ -function globalErrorHandler(ex) { - try { - delegateHandler(ex); - } - catch (_a) { } // eslint-disable-line no-empty -} -exports.globalErrorHandler = globalErrorHandler; -//# sourceMappingURL=global-error-handler.js.map - -/***/ }), - -/***/ 32882: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.loggingErrorHandler = void 0; -const api_1 = __nccwpck_require__(65163); -/** - * Returns a function that logs an error using the provided logger, or a - * console logger if one was not provided. - */ -function loggingErrorHandler() { - return (ex) => { - api_1.diag.error(stringifyException(ex)); - }; -} -exports.loggingErrorHandler = loggingErrorHandler; -/** - * Converts an exception into a string representation - * @param {Exception} ex - */ -function stringifyException(ex) { - if (typeof ex === 'string') { - return ex; - } - else { - return JSON.stringify(flattenException(ex)); - } -} -/** - * Flattens an exception into key-value pairs by traversing the prototype chain - * and coercing values to strings. Duplicate properties will not be overwritten; - * the first insert wins. - */ -function flattenException(ex) { - const result = {}; - let current = ex; - while (current !== null) { - Object.getOwnPropertyNames(current).forEach(propertyName => { - if (result[propertyName]) - return; - const value = current[propertyName]; - if (value) { - result[propertyName] = String(value); - } - }); - current = Object.getPrototypeOf(current); - } - return result; -} -//# sourceMappingURL=logging-error-handler.js.map - -/***/ }), - -/***/ 86161: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0; -const platform_1 = __nccwpck_require__(6730); -const NANOSECOND_DIGITS = 9; -const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS); -/** - * Converts a number to HrTime, HrTime = [number, number]. - * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. - * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. - * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. - * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds: - * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. - * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: - * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000. - * This is represented in HrTime format as [1609504210, 150000000]. - * @param epochMillis - */ -function numberToHrtime(epochMillis) { - const epochSeconds = epochMillis / 1000; - // Decimals only. - const seconds = Math.trunc(epochSeconds); - // Round sub-nanosecond accuracy to nanosecond. - const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) * - SECOND_TO_NANOSECONDS; - return [seconds, nanos]; -} -function getTimeOrigin() { - let timeOrigin = platform_1.otperformance.timeOrigin; - if (typeof timeOrigin !== 'number') { - const perf = platform_1.otperformance; - timeOrigin = perf.timing && perf.timing.fetchStart; - } - return timeOrigin; -} -/** - * Returns an hrtime calculated via performance component. - * @param performanceNow - */ -function hrTime(performanceNow) { - const timeOrigin = numberToHrtime(getTimeOrigin()); - const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now()); - let seconds = timeOrigin[0] + now[0]; - let nanos = timeOrigin[1] + now[1]; - // Nanoseconds - if (nanos > SECOND_TO_NANOSECONDS) { - nanos -= SECOND_TO_NANOSECONDS; - seconds += 1; - } - return [seconds, nanos]; -} -exports.hrTime = hrTime; -/** - * - * Converts a TimeInput to an HrTime, defaults to _hrtime(). - * @param time - */ -function timeInputToHrTime(time) { - // process.hrtime - if (isTimeInputHrTime(time)) { - return time; - } - else if (typeof time === 'number') { - // Must be a performance.now() if it's smaller than process start time. - if (time < getTimeOrigin()) { - return hrTime(time); - } - else { - // epoch milliseconds or performance.timeOrigin - return numberToHrtime(time); - } - } - else if (time instanceof Date) { - return numberToHrtime(time.getTime()); - } - else { - throw TypeError('Invalid input type'); - } -} -exports.timeInputToHrTime = timeInputToHrTime; -/** - * Returns a duration of two hrTime. - * @param startTime - * @param endTime - */ -function hrTimeDuration(startTime, endTime) { - let seconds = endTime[0] - startTime[0]; - let nanos = endTime[1] - startTime[1]; - // overflow - if (nanos < 0) { - seconds -= 1; - // negate - nanos += SECOND_TO_NANOSECONDS; - } - return [seconds, nanos]; -} -exports.hrTimeDuration = hrTimeDuration; -/** - * Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z" - * @param time - */ -function hrTimeToTimeStamp(time) { - const precision = NANOSECOND_DIGITS; - const tmp = `${'0'.repeat(precision)}${time[1]}Z`; - const nanoString = tmp.substr(tmp.length - precision - 1); - const date = new Date(time[0] * 1000).toISOString(); - return date.replace('000Z', nanoString); -} -exports.hrTimeToTimeStamp = hrTimeToTimeStamp; -/** - * Convert hrTime to nanoseconds. - * @param time - */ -function hrTimeToNanoseconds(time) { - return time[0] * SECOND_TO_NANOSECONDS + time[1]; -} -exports.hrTimeToNanoseconds = hrTimeToNanoseconds; -/** - * Convert hrTime to milliseconds. - * @param time - */ -function hrTimeToMilliseconds(time) { - return Math.round(time[0] * 1e3 + time[1] / 1e6); -} -exports.hrTimeToMilliseconds = hrTimeToMilliseconds; -/** - * Convert hrTime to microseconds. - * @param time - */ -function hrTimeToMicroseconds(time) { - return Math.round(time[0] * 1e6 + time[1] / 1e3); -} -exports.hrTimeToMicroseconds = hrTimeToMicroseconds; -/** - * check if time is HrTime - * @param value - */ -function isTimeInputHrTime(value) { - return (Array.isArray(value) && - value.length === 2 && - typeof value[0] === 'number' && - typeof value[1] === 'number'); -} -exports.isTimeInputHrTime = isTimeInputHrTime; -/** - * check if input value is a correct types.TimeInput - * @param value - */ -function isTimeInput(value) { - return (isTimeInputHrTime(value) || - typeof value === 'number' || - value instanceof Date); -} -exports.isTimeInput = isTimeInput; -//# sourceMappingURL=time.js.map - -/***/ }), - -/***/ 27342: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 89736: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.baggageUtils = void 0; -__exportStar(__nccwpck_require__(61476), exports); -__exportStar(__nccwpck_require__(82807), exports); -__exportStar(__nccwpck_require__(69246), exports); -__exportStar(__nccwpck_require__(32882), exports); -__exportStar(__nccwpck_require__(86161), exports); -__exportStar(__nccwpck_require__(27342), exports); -__exportStar(__nccwpck_require__(67959), exports); -__exportStar(__nccwpck_require__(55687), exports); -exports.baggageUtils = __nccwpck_require__(49884); -__exportStar(__nccwpck_require__(6730), exports); -__exportStar(__nccwpck_require__(57785), exports); -__exportStar(__nccwpck_require__(61463), exports); -__exportStar(__nccwpck_require__(231), exports); -__exportStar(__nccwpck_require__(52992), exports); -__exportStar(__nccwpck_require__(16478), exports); -__exportStar(__nccwpck_require__(88317), exports); -__exportStar(__nccwpck_require__(15136), exports); -__exportStar(__nccwpck_require__(69326), exports); -__exportStar(__nccwpck_require__(54463), exports); -__exportStar(__nccwpck_require__(1914), exports); -__exportStar(__nccwpck_require__(7238), exports); -__exportStar(__nccwpck_require__(65387), exports); -__exportStar(__nccwpck_require__(28289), exports); -__exportStar(__nccwpck_require__(90839), exports); -__exportStar(__nccwpck_require__(67226), exports); -__exportStar(__nccwpck_require__(12408), exports); -__exportStar(__nccwpck_require__(55687), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 96242: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateValue = exports.validateKey = void 0; -const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; -const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; -const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; -const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); -const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; -/** - * Key is opaque string up to 256 characters printable. It MUST begin with a - * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, - * underscores _, dashes -, asterisks *, and forward slashes /. - * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the - * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. - * see https://www.w3.org/TR/trace-context/#key - */ -function validateKey(key) { - return VALID_KEY_REGEX.test(key); -} -exports.validateKey = validateKey; -/** - * Value is opaque string up to 256 characters printable ASCII RFC0020 - * characters (i.e., the range 0x20 to 0x7E) except comma , and =. - */ -function validateValue(value) { - return (VALID_VALUE_BASE_REGEX.test(value) && - !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); -} -exports.validateValue = validateValue; -//# sourceMappingURL=validators.js.map - -/***/ }), - -/***/ 6730: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(9340), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 25476: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RandomIdGenerator = void 0; -const SPAN_ID_BYTES = 8; -const TRACE_ID_BYTES = 16; -class RandomIdGenerator { - constructor() { - /** - * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex - * characters corresponding to 128 bits. - */ - this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); - /** - * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex - * characters corresponding to 64 bits. - */ - this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); - } -} -exports.RandomIdGenerator = RandomIdGenerator; -const SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); -function getIdGenerator(bytes) { - return function generateId() { - for (let i = 0; i < bytes / 4; i++) { - // unsigned right shift drops decimal part of the number - // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE - SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4); - } - // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated - for (let i = 0; i < bytes; i++) { - if (SHARED_BUFFER[i] > 0) { - break; - } - else if (i === bytes - 1) { - SHARED_BUFFER[bytes - 1] = 1; - } - } - return SHARED_BUFFER.toString('hex', 0, bytes); - }; -} -//# sourceMappingURL=RandomIdGenerator.js.map - -/***/ }), - -/***/ 76494: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEnv = void 0; -const os = __nccwpck_require__(22037); -const environment_1 = __nccwpck_require__(7238); -/** - * Gets the environment variables - */ -function getEnv() { - const processEnv = (0, environment_1.parseEnvironment)(process.env); - return Object.assign({ - HOSTNAME: os.hostname(), - }, environment_1.DEFAULT_ENVIRONMENT, processEnv); -} -exports.getEnv = getEnv; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 57196: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._globalThis = void 0; -/** only globals that common to node and browsers are allowed */ -// eslint-disable-next-line node/no-unsupported-features/es-builtins -exports._globalThis = typeof globalThis === 'object' ? globalThis : global; -//# sourceMappingURL=globalThis.js.map - -/***/ }), - -/***/ 75004: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hexToBase64 = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function hexToBase64(hexStr) { - const hexStrLen = hexStr.length; - let hexAsciiCharsStr = ''; - for (let i = 0; i < hexStrLen; i += 2) { - const hexPair = hexStr.substring(i, i + 2); - const hexVal = parseInt(hexPair, 16); - hexAsciiCharsStr += String.fromCharCode(hexVal); - } - return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64'); -} -exports.hexToBase64 = hexToBase64; -//# sourceMappingURL=hex-to-base64.js.map - -/***/ }), - -/***/ 9340: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(76494), exports); -__exportStar(__nccwpck_require__(57196), exports); -__exportStar(__nccwpck_require__(75004), exports); -__exportStar(__nccwpck_require__(25476), exports); -__exportStar(__nccwpck_require__(39338), exports); -__exportStar(__nccwpck_require__(10265), exports); -__exportStar(__nccwpck_require__(51027), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 39338: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.otperformance = void 0; -const perf_hooks_1 = __nccwpck_require__(4074); -exports.otperformance = perf_hooks_1.performance; -//# sourceMappingURL=performance.js.map - -/***/ }), - -/***/ 10265: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SDK_INFO = void 0; -const version_1 = __nccwpck_require__(55687); -const semantic_conventions_1 = __nccwpck_require__(67275); -/** Constants describing the SDK in use */ -exports.SDK_INFO = { - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node', - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS, - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION, -}; -//# sourceMappingURL=sdk-info.js.map - -/***/ }), - -/***/ 51027: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unrefTimer = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function unrefTimer(timer) { - timer.unref(); -} -exports.unrefTimer = unrefTimer; -//# sourceMappingURL=timer-util.js.map - -/***/ }), - -/***/ 57785: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CompositePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -/** Combines multiple propagators into a single propagator. */ -class CompositePropagator { - /** - * Construct a composite propagator from a list of propagators. - * - * @param [config] Configuration object for composite propagator - */ - constructor(config = {}) { - var _a; - this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : []; - this._fields = Array.from(new Set(this._propagators - // older propagators may not have fields function, null check to be sure - .map(p => (typeof p.fields === 'function' ? p.fields() : [])) - .reduce((x, y) => x.concat(y), []))); - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same carrier key, the propagator later in the list - * will "win". - * - * @param context Context to inject - * @param carrier Carrier into which context will be injected - */ - inject(context, carrier, setter) { - for (const propagator of this._propagators) { - try { - propagator.inject(context, carrier, setter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - } - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same context key, the propagator later in the list - * will "win". - * - * @param context Context to add values to - * @param carrier Carrier from which to extract context - */ - extract(context, carrier, getter) { - return this._propagators.reduce((ctx, propagator) => { - try { - return propagator.extract(ctx, carrier, getter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - return ctx; - }, context); - } - fields() { - // return a new array so our fields cannot be modified - return this._fields.slice(); - } -} -exports.CompositePropagator = CompositePropagator; -//# sourceMappingURL=composite.js.map - -/***/ }), - -/***/ 231: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=IdGenerator.js.map - -/***/ }), - -/***/ 1914: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceState = void 0; -const validators_1 = __nccwpck_require__(96242); -const MAX_TRACE_STATE_ITEMS = 32; -const MAX_TRACE_STATE_LEN = 512; -const LIST_MEMBERS_SEPARATOR = ','; -const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; -/** - * TraceState must be a class and not a simple object type because of the spec - * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). - * - * Here is the list of allowed mutations: - * - New key-value pair should be added into the beginning of the list - * - The value of any key can be updated. Modified keys MUST be moved to the - * beginning of the list. - */ -class TraceState { - constructor(rawTraceState) { - this._internalState = new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - set(key, value) { - // TODO: Benchmark the different approaches(map vs list) and - // use the faster one. - const traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); - } - traceState._internalState.set(key, value); - return traceState; - } - unset(key) { - const traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - } - get(key) { - return this._internalState.get(key); - } - serialize() { - return this._keys() - .reduce((agg, key) => { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); - return agg; - }, []) - .join(LIST_MEMBERS_SEPARATOR); - } - _parse(rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN) - return; - this._internalState = rawTraceState - .split(LIST_MEMBERS_SEPARATOR) - .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning - .reduce((agg, part) => { - const listMember = part.trim(); // Optional Whitespace (OWS) handling - const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); - if (i !== -1) { - const key = listMember.slice(0, i); - const value = listMember.slice(i + 1, part.length); - if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) { - agg.set(key, value); - } - else { - // TODO: Consider to add warning log - } - } - return agg; - }, new Map()); - // Because of the reverse() requirement, trunc must be done after map is created - if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { - this._internalState = new Map(Array.from(this._internalState.entries()) - .reverse() // Use reverse same as original tracestate parse chain - .slice(0, MAX_TRACE_STATE_ITEMS)); - } - } - _keys() { - return Array.from(this._internalState.keys()).reverse(); - } - _clone() { - const traceState = new TraceState(); - traceState._internalState = new Map(this._internalState); - return traceState; - } -} -exports.TraceState = TraceState; -//# sourceMappingURL=TraceState.js.map - -/***/ }), - -/***/ 61463: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(54463); -const TraceState_1 = __nccwpck_require__(1914); -exports.TRACE_PARENT_HEADER = 'traceparent'; -exports.TRACE_STATE_HEADER = 'tracestate'; -const VERSION = '00'; -const VERSION_PART = '(?!ff)[\\da-f]{2}'; -const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}'; -const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}'; -const FLAGS_PART = '[\\da-f]{2}'; -const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`); -/** - * Parses information from the [traceparent] span tag and converts it into {@link SpanContext} - * @param traceParent - A meta property that comes from server. - * It should be dynamically generated server side to have the server's request trace Id, - * a parent span Id that was set on the server's request span, - * and the trace flags to indicate the server's sampling decision - * (01 = sampled, 00 = not sampled). - * for example: '{version}-{traceId}-{spanId}-{sampleDecision}' - * For more information see {@link https://www.w3.org/TR/trace-context/} - */ -function parseTraceParent(traceParent) { - const match = TRACE_PARENT_REGEX.exec(traceParent); - if (!match) - return null; - // According to the specification the implementation should be compatible - // with future versions. If there are more parts, we only reject it if it's using version 00 - // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent - if (match[1] === '00' && match[5]) - return null; - return { - traceId: match[2], - spanId: match[3], - traceFlags: parseInt(match[4], 16), - }; -} -exports.parseTraceParent = parseTraceParent; -/** - * Propagates {@link SpanContext} through Trace Context format propagation. - * - * Based on the Trace Context specification: - * https://www.w3.org/TR/trace-context/ - */ -class W3CTraceContextPropagator { - inject(context, carrier, setter) { - const spanContext = api_1.trace.getSpanContext(context); - if (!spanContext || - (0, suppress_tracing_1.isTracingSuppressed)(context) || - !(0, api_1.isSpanContextValid)(spanContext)) - return; - const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`; - setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent); - if (spanContext.traceState) { - setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize()); - } - } - extract(context, carrier, getter) { - const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER); - if (!traceParentHeader) - return context; - const traceParent = Array.isArray(traceParentHeader) - ? traceParentHeader[0] - : traceParentHeader; - if (typeof traceParent !== 'string') - return context; - const spanContext = parseTraceParent(traceParent); - if (!spanContext) - return context; - spanContext.isRemote = true; - const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER); - if (traceStateHeader) { - // If more than one `tracestate` header is found, we merge them into a - // single header. - const state = Array.isArray(traceStateHeader) - ? traceStateHeader.join(',') - : traceStateHeader; - spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined); - } - return api_1.trace.setSpanContext(context, spanContext); - } - fields() { - return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER]; - } -} -exports.W3CTraceContextPropagator = W3CTraceContextPropagator; -//# sourceMappingURL=W3CTraceContextPropagator.js.map - -/***/ }), - -/***/ 52992: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0; -const api_1 = __nccwpck_require__(65163); -const RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA'); -var RPCType; -(function (RPCType) { - RPCType["HTTP"] = "http"; -})(RPCType = exports.RPCType || (exports.RPCType = {})); -function setRPCMetadata(context, meta) { - return context.setValue(RPC_METADATA_KEY, meta); -} -exports.setRPCMetadata = setRPCMetadata; -function deleteRPCMetadata(context) { - return context.deleteValue(RPC_METADATA_KEY); -} -exports.deleteRPCMetadata = deleteRPCMetadata; -function getRPCMetadata(context) { - return context.getValue(RPC_METADATA_KEY); -} -exports.getRPCMetadata = getRPCMetadata; -//# sourceMappingURL=rpc-metadata.js.map - -/***/ }), - -/***/ 16478: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOffSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples no traces. */ -class AlwaysOffSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.NOT_RECORD, - }; - } - toString() { - return 'AlwaysOffSampler'; - } -} -exports.AlwaysOffSampler = AlwaysOffSampler; -//# sourceMappingURL=AlwaysOffSampler.js.map - -/***/ }), - -/***/ 88317: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOnSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples all traces. */ -class AlwaysOnSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.RECORD_AND_SAMPLED, - }; - } - toString() { - return 'AlwaysOnSampler'; - } -} -exports.AlwaysOnSampler = AlwaysOnSampler; -//# sourceMappingURL=AlwaysOnSampler.js.map - -/***/ }), - -/***/ 15136: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ParentBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -const global_error_handler_1 = __nccwpck_require__(69246); -const AlwaysOffSampler_1 = __nccwpck_require__(16478); -const AlwaysOnSampler_1 = __nccwpck_require__(88317); -/** - * A composite sampler that either respects the parent span's sampling decision - * or delegates to `delegateSampler` for root spans. - */ -class ParentBasedSampler { - constructor(config) { - var _a, _b, _c, _d; - this._root = config.root; - if (!this._root) { - (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured')); - this._root = new AlwaysOnSampler_1.AlwaysOnSampler(); - } - this._remoteParentSampled = - (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._remoteParentNotSampled = - (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler(); - this._localParentSampled = - (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._localParentNotSampled = - (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler(); - } - shouldSample(context, traceId, spanName, spanKind, attributes, links) { - const parentContext = api_1.trace.getSpanContext(context); - if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) { - return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.isRemote) { - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - toString() { - return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`; - } -} -exports.ParentBasedSampler = ParentBasedSampler; -//# sourceMappingURL=ParentBasedSampler.js.map - -/***/ }), - -/***/ 69326: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceIdRatioBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples a given fraction of traces based of trace id deterministically. */ -class TraceIdRatioBasedSampler { - constructor(_ratio = 0) { - this._ratio = _ratio; - this._ratio = this._normalize(_ratio); - this._upperBound = Math.floor(this._ratio * 0xffffffff); - } - shouldSample(context, traceId) { - return { - decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound - ? api_1.SamplingDecision.RECORD_AND_SAMPLED - : api_1.SamplingDecision.NOT_RECORD, - }; - } - toString() { - return `TraceIdRatioBased{${this._ratio}}`; - } - _normalize(ratio) { - if (typeof ratio !== 'number' || isNaN(ratio)) - return 0; - return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; - } - _accumulate(traceId) { - let accumulation = 0; - for (let i = 0; i < traceId.length / 8; i++) { - const pos = i * 8; - const part = parseInt(traceId.slice(pos, pos + 8), 16); - accumulation = (accumulation ^ part) >>> 0; - } - return accumulation; - } -} -exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; -//# sourceMappingURL=TraceIdRatioBasedSampler.js.map - -/***/ }), - -/***/ 54463: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0; -const api_1 = __nccwpck_require__(65163); -const SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING'); -function suppressTracing(context) { - return context.setValue(SUPPRESS_TRACING_KEY, true); -} -exports.suppressTracing = suppressTracing; -function unsuppressTracing(context) { - return context.deleteValue(SUPPRESS_TRACING_KEY); -} -exports.unsuppressTracing = unsuppressTracing; -function isTracingSuppressed(context) { - return context.getValue(SUPPRESS_TRACING_KEY) === true; -} -exports.isTracingSuppressed = isTracingSuppressed; -//# sourceMappingURL=suppress-tracing.js.map - -/***/ }), - -/***/ 12408: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BindOnceFuture = void 0; -const promise_1 = __nccwpck_require__(28329); -/** - * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked. - */ -class BindOnceFuture { - constructor(_callback, _that) { - this._callback = _callback; - this._that = _that; - this._isCalled = false; - this._deferred = new promise_1.Deferred(); - } - get isCalled() { - return this._isCalled; - } - get promise() { - return this._deferred.promise; - } - call(...args) { - if (!this._isCalled) { - this._isCalled = true; - try { - Promise.resolve(this._callback.call(this._that, ...args)) - .then(val => this._deferred.resolve(val), err => this._deferred.reject(err)); - } - catch (err) { - this._deferred.reject(err); - } - } - return this._deferred.promise; - } -} -exports.BindOnceFuture = BindOnceFuture; -//# sourceMappingURL=callback.js.map - -/***/ }), - -/***/ 7238: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0; -const api_1 = __nccwpck_require__(65163); -const sampling_1 = __nccwpck_require__(28289); -const DEFAULT_LIST_SEPARATOR = ','; -/** - * Environment interface to define all names - */ -const ENVIRONMENT_NUMBERS_KEYS = [ - 'OTEL_BSP_EXPORT_TIMEOUT', - 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE', - 'OTEL_BSP_MAX_QUEUE_SIZE', - 'OTEL_BSP_SCHEDULE_DELAY', - 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_EVENT_COUNT_LIMIT', - 'OTEL_SPAN_LINK_COUNT_LIMIT', - 'OTEL_EXPORTER_OTLP_TIMEOUT', - 'OTEL_EXPORTER_OTLP_TRACES_TIMEOUT', - 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT', - 'OTEL_EXPORTER_JAEGER_AGENT_PORT', -]; -function isEnvVarANumber(key) { - return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1); -} -const ENVIRONMENT_LISTS_KEYS = [ - 'OTEL_NO_PATCH_MODULES', - 'OTEL_PROPAGATORS', -]; -function isEnvVarAList(key) { - return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1; -} -exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity; -exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128; -/** - * Default environment variables - */ -exports.DEFAULT_ENVIRONMENT = { - CONTAINER_NAME: '', - ECS_CONTAINER_METADATA_URI_V4: '', - ECS_CONTAINER_METADATA_URI: '', - HOSTNAME: '', - KUBERNETES_SERVICE_HOST: '', - NAMESPACE: '', - OTEL_BSP_EXPORT_TIMEOUT: 30000, - OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512, - OTEL_BSP_MAX_QUEUE_SIZE: 2048, - OTEL_BSP_SCHEDULE_DELAY: 5000, - OTEL_EXPORTER_JAEGER_AGENT_HOST: '', - OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832, - OTEL_EXPORTER_JAEGER_ENDPOINT: '', - OTEL_EXPORTER_JAEGER_PASSWORD: '', - OTEL_EXPORTER_JAEGER_USER: '', - OTEL_EXPORTER_OTLP_ENDPOINT: '', - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '', - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '', - OTEL_EXPORTER_OTLP_HEADERS: '', - OTEL_EXPORTER_OTLP_TRACES_HEADERS: '', - OTEL_EXPORTER_OTLP_METRICS_HEADERS: '', - OTEL_EXPORTER_OTLP_TIMEOUT: 10000, - OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: 10000, - OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 10000, - OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans', - OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO, - OTEL_NO_PATCH_MODULES: [], - OTEL_PROPAGATORS: ['tracecontext', 'baggage'], - OTEL_RESOURCE_ATTRIBUTES: '', - OTEL_SERVICE_NAME: '', - OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_EVENT_COUNT_LIMIT: 128, - OTEL_SPAN_LINK_COUNT_LIMIT: 128, - OTEL_TRACES_EXPORTER: 'none', - OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn, - OTEL_TRACES_SAMPLER_ARG: '', - OTEL_EXPORTER_OTLP_INSECURE: '', - OTEL_EXPORTER_OTLP_TRACES_INSECURE: '', - OTEL_EXPORTER_OTLP_METRICS_INSECURE: '', - OTEL_EXPORTER_OTLP_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_COMPRESSION: '', - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '', - OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '', - OTEL_EXPORTER_OTLP_CLIENT_KEY: '', - OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY: '', - OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY: '', - OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE: '' -}; -/** - * Parses a variable as number with number validation - * @param name - * @param environment - * @param values - * @param min - * @param max - */ -function parseNumber(name, environment, values, min = -Infinity, max = Infinity) { - if (typeof values[name] !== 'undefined') { - const value = Number(values[name]); - if (!isNaN(value)) { - if (value < min) { - environment[name] = min; - } - else if (value > max) { - environment[name] = max; - } - else { - environment[name] = value; - } - } - } -} -/** - * Parses list-like strings from input into output. - * @param name - * @param environment - * @param values - * @param separator - */ -function parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) { - const givenValue = input[name]; - if (typeof givenValue === 'string') { - output[name] = givenValue.split(separator).map(v => v.trim()); - } -} -// The support string -> DiagLogLevel mappings -const logLevelMap = { - ALL: api_1.DiagLogLevel.ALL, - VERBOSE: api_1.DiagLogLevel.VERBOSE, - DEBUG: api_1.DiagLogLevel.DEBUG, - INFO: api_1.DiagLogLevel.INFO, - WARN: api_1.DiagLogLevel.WARN, - ERROR: api_1.DiagLogLevel.ERROR, - NONE: api_1.DiagLogLevel.NONE, -}; -/** - * Environmentally sets log level if valid log level string is provided - * @param key - * @param environment - * @param values - */ -function setLogLevelFromEnv(key, environment, values) { - const value = values[key]; - if (typeof value === 'string') { - const theLevel = logLevelMap[value.toUpperCase()]; - if (theLevel != null) { - environment[key] = theLevel; - } - } -} -/** - * Parses environment values - * @param values - */ -function parseEnvironment(values) { - const environment = {}; - for (const env in exports.DEFAULT_ENVIRONMENT) { - const key = env; - switch (key) { - case 'OTEL_LOG_LEVEL': - setLogLevelFromEnv(key, environment, values); - break; - default: - if (isEnvVarANumber(key)) { - parseNumber(key, environment, values); - } - else if (isEnvVarAList(key)) { - parseStringList(key, environment, values); - } - else { - const value = values[key]; - if (typeof value !== 'undefined' && value !== null) { - environment[key] = String(value); - } - } - } - } - return environment; -} -exports.parseEnvironment = parseEnvironment; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 71780: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPlainObject = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * based on lodash in order to support esm builds without esModuleInterop. - * lodash is using MIT License. - **/ -const objectTag = '[object Object]'; -const nullTag = '[object Null]'; -const undefinedTag = '[object Undefined]'; -const funcProto = Function.prototype; -const funcToString = funcProto.toString; -const objectCtorString = funcToString.call(Object); -const getPrototype = overArg(Object.getPrototypeOf, Object); -const objectProto = Object.prototype; -const hasOwnProperty = objectProto.hasOwnProperty; -const symToStringTag = Symbol ? Symbol.toStringTag : undefined; -const nativeObjectToString = objectProto.toString; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function (arg) { - return func(transform(arg)); - }; -} -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) !== objectTag) { - return false; - } - const proto = getPrototype(value); - if (proto === null) { - return true; - } - const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) === objectCtorString; -} -exports.isPlainObject = isPlainObject; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; - let unmasked = false; - try { - value[symToStringTag] = undefined; - unmasked = true; - } - catch (e) { - // silence - } - const result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } - else { - delete value[symToStringTag]; - } - } - return result; -} -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} -//# sourceMappingURL=lodash.merge.js.map - -/***/ }), - -/***/ 65387: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.merge = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -const lodash_merge_1 = __nccwpck_require__(71780); -const MAX_LEVEL = 20; -/** - * Merges objects together - * @param args - objects / values to be merged - */ -function merge(...args) { - let result = args.shift(); - const objects = new WeakMap(); - while (args.length > 0) { - result = mergeTwoObjects(result, args.shift(), 0, objects); - } - return result; -} -exports.merge = merge; -function takeValue(value) { - if (isArray(value)) { - return value.slice(); - } - return value; -} -/** - * Merges two objects - * @param one - first object - * @param two - second object - * @param level - current deep level - * @param objects - objects holder that has been already referenced - to prevent - * cyclic dependency - */ -function mergeTwoObjects(one, two, level = 0, objects) { - let result; - if (level > MAX_LEVEL) { - return undefined; - } - level++; - if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) { - result = takeValue(two); - } - else if (isArray(one)) { - result = one.slice(); - if (isArray(two)) { - for (let i = 0, j = two.length; i < j; i++) { - result.push(takeValue(two[i])); - } - } - else if (isObject(two)) { - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - result[key] = takeValue(two[key]); - } - } - } - else if (isObject(one)) { - if (isObject(two)) { - if (!shouldMerge(one, two)) { - return two; - } - result = Object.assign({}, one); - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - const twoValue = two[key]; - if (isPrimitive(twoValue)) { - if (typeof twoValue === 'undefined') { - delete result[key]; - } - else { - // result[key] = takeValue(twoValue); - result[key] = twoValue; - } - } - else { - const obj1 = result[key]; - const obj2 = twoValue; - if (wasObjectReferenced(one, key, objects) || - wasObjectReferenced(two, key, objects)) { - delete result[key]; - } - else { - if (isObject(obj1) && isObject(obj2)) { - const arr1 = objects.get(obj1) || []; - const arr2 = objects.get(obj2) || []; - arr1.push({ obj: one, key }); - arr2.push({ obj: two, key }); - objects.set(obj1, arr1); - objects.set(obj2, arr2); - } - result[key] = mergeTwoObjects(result[key], twoValue, level, objects); - } - } - } - } - else { - result = two; - } - } - return result; -} -/** - * Function to check if object has been already reference - * @param obj - * @param key - * @param objects - */ -function wasObjectReferenced(obj, key, objects) { - const arr = objects.get(obj[key]) || []; - for (let i = 0, j = arr.length; i < j; i++) { - const info = arr[i]; - if (info.key === key && info.obj === obj) { - return true; - } - } - return false; -} -function isArray(value) { - return Array.isArray(value); -} -function isFunction(value) { - return typeof value === 'function'; -} -function isObject(value) { - return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object'; -} -function isPrimitive(value) { - return typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean' || - typeof value === 'undefined' || - value instanceof Date || - value instanceof RegExp || - value === null; -} -function shouldMerge(one, two) { - if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) { - return false; - } - return true; -} -//# sourceMappingURL=merge.js.map - -/***/ }), - -/***/ 28329: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Deferred = void 0; -class Deferred { - constructor() { - this._promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - }); - } - get promise() { - return this._promise; - } - resolve(val) { - this._resolve(val); - } - reject(err) { - this._reject(err); - } -} -exports.Deferred = Deferred; -//# sourceMappingURL=promise.js.map - -/***/ }), - -/***/ 28289: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TracesSamplerValues = void 0; -var TracesSamplerValues; -(function (TracesSamplerValues) { - TracesSamplerValues["AlwaysOff"] = "always_off"; - TracesSamplerValues["AlwaysOn"] = "always_on"; - TracesSamplerValues["ParentBasedAlwaysOff"] = "parentbased_always_off"; - TracesSamplerValues["ParentBasedAlwaysOn"] = "parentbased_always_on"; - TracesSamplerValues["ParentBasedTraceIdRatio"] = "parentbased_traceidratio"; - TracesSamplerValues["TraceIdRatio"] = "traceidratio"; -})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {})); -//# sourceMappingURL=sampling.js.map - -/***/ }), - -/***/ 90839: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isUrlIgnored = exports.urlMatches = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function urlMatches(url, urlToMatch) { - if (typeof urlToMatch === 'string') { - return url === urlToMatch; - } - else { - return !!url.match(urlToMatch); - } -} -exports.urlMatches = urlMatches; -/** - * Check if {@param url} should be ignored when comparing against {@param ignoredUrls} - * @param url - * @param ignoredUrls - */ -function isUrlIgnored(url, ignoredUrls) { - if (!ignoredUrls) { - return false; - } - for (const ignoreUrl of ignoredUrls) { - if (urlMatches(url, ignoreUrl)) { - return true; - } - } - return false; -} -exports.isUrlIgnored = isUrlIgnored; -//# sourceMappingURL=url.js.map - -/***/ }), - -/***/ 67226: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isWrapped = void 0; -/** - * Checks if certain function has been already wrapped - * @param func - */ -function isWrapped(func) { - return (typeof func === 'function' && - typeof func.__original === 'function' && - typeof func.__unwrap === 'function' && - func.__wrapped === true); -} -exports.isWrapped = isWrapped; -//# sourceMappingURL=wrap.js.map - -/***/ }), - -/***/ 55687: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VERSION = void 0; -// this is autogenerated file, see scripts/version-update.js -exports.VERSION = '1.4.0'; -//# sourceMappingURL=version.js.map - -/***/ }), - -/***/ 6633: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPTraceExporter = void 0; -const exporter_trace_otlp_http_1 = __nccwpck_require__(35401); -const core_1 = __nccwpck_require__(44823); -const grpc_js_1 = __nccwpck_require__(7025); -const otlp_grpc_exporter_base_1 = __nccwpck_require__(75452); -const DEFAULT_COLLECTOR_URL = 'localhost:4317'; -/** - * OTLP Trace Exporter for Node - */ -class OTLPTraceExporter extends otlp_grpc_exporter_base_1.OTLPGRPCExporterNodeBase { - constructor(config = {}) { - super(config); - const headers = core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS); - this.metadata || (this.metadata = new grpc_js_1.Metadata()); - for (const [k, v] of Object.entries(headers)) { - this.metadata.set(k, v); - } - } - convert(spans) { - return (0, exporter_trace_otlp_http_1.toOTLPExportTraceServiceRequest)(spans, this); - } - getDefaultUrl(config) { - return typeof config.url === 'string' - ? (0, otlp_grpc_exporter_base_1.validateAndNormalizeUrl)(config.url) - : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0 - ? (0, otlp_grpc_exporter_base_1.validateAndNormalizeUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) - : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0 - ? (0, otlp_grpc_exporter_base_1.validateAndNormalizeUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT) - : DEFAULT_COLLECTOR_URL; - } - getServiceClientType() { - return otlp_grpc_exporter_base_1.ServiceClientType.SPANS; - } - getServiceProtoPath() { - return 'opentelemetry/proto/collector/trace/v1/trace_service.proto'; - } -} -exports.OTLPTraceExporter = OTLPTraceExporter; -//# sourceMappingURL=OTLPTraceExporter.js.map - -/***/ }), - -/***/ 60160: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(6633), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 80734: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExportResultCode = void 0; -var ExportResultCode; -(function (ExportResultCode) { - ExportResultCode[ExportResultCode["SUCCESS"] = 0] = "SUCCESS"; - ExportResultCode[ExportResultCode["FAILED"] = 1] = "FAILED"; -})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {})); -//# sourceMappingURL=ExportResult.js.map - -/***/ }), - -/***/ 85952: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0; -exports.BAGGAGE_KEY_PAIR_SEPARATOR = '='; -exports.BAGGAGE_PROPERTIES_SEPARATOR = ';'; -exports.BAGGAGE_ITEMS_SEPARATOR = ','; -// Name of the http header used to propagate the baggage -exports.BAGGAGE_HEADER = 'baggage'; -// Maximum number of name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180; -// Maximum number of bytes per a single name-value pair allowed by w3c spec -exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096; -// Maximum total length of all name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 15159: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CBaggagePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(9008); -const constants_1 = __nccwpck_require__(85952); -const utils_1 = __nccwpck_require__(83114); -/** - * Propagates {@link Baggage} through Context format propagation. - * - * Based on the Baggage specification: - * https://w3c.github.io/baggage/ - */ -class W3CBaggagePropagator { - inject(context, carrier, setter) { - const baggage = api_1.propagation.getBaggage(context); - if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context)) - return; - const keyPairs = (0, utils_1.getKeyPairs)(baggage) - .filter((pair) => { - return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS; - }) - .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS); - const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs); - if (headerValue.length > 0) { - setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue); - } - } - extract(context, carrier, getter) { - const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER); - const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue; - if (!baggageString) - return context; - const baggage = {}; - if (baggageString.length === 0) { - return context; - } - const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR); - pairs.forEach(entry => { - const keyPair = (0, utils_1.parsePairKeyValue)(entry); - if (keyPair) { - const baggageEntry = { value: keyPair.value }; - if (keyPair.metadata) { - baggageEntry.metadata = keyPair.metadata; - } - baggage[keyPair.key] = baggageEntry; - } - }); - if (Object.entries(baggage).length === 0) { - return context; - } - return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage)); - } - fields() { - return [constants_1.BAGGAGE_HEADER]; - } -} -exports.W3CBaggagePropagator = W3CBaggagePropagator; -//# sourceMappingURL=W3CBaggagePropagator.js.map - -/***/ }), - -/***/ 83114: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const api_1 = __nccwpck_require__(65163); -const constants_1 = __nccwpck_require__(85952); -function serializeKeyPairs(keyPairs) { - return keyPairs.reduce((hValue, current) => { - const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`; - return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value; - }, ''); -} -exports.serializeKeyPairs = serializeKeyPairs; -function getKeyPairs(baggage) { - return baggage.getAllEntries().map(([key, value]) => { - let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`; - // include opaque metadata if provided - // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation - if (value.metadata !== undefined) { - entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString(); - } - return entry; - }); -} -exports.getKeyPairs = getKeyPairs; -function parsePairKeyValue(entry) { - const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR); - if (valueProps.length <= 0) - return; - const keyPairPart = valueProps.shift(); - if (!keyPairPart) - return; - const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR); - if (keyPair.length !== 2) - return; - const key = decodeURIComponent(keyPair[0].trim()); - const value = decodeURIComponent(keyPair[1].trim()); - let metadata; - if (valueProps.length > 0) { - metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR)); - } - return { key, value, metadata }; -} -exports.parsePairKeyValue = parsePairKeyValue; -/** - * Parse a string serialized in the baggage HTTP Format (without metadata): - * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md - */ -function parseKeyPairsIntoRecord(value) { - if (typeof value !== 'string' || value.length === 0) - return {}; - return value - .split(constants_1.BAGGAGE_ITEMS_SEPARATOR) - .map(entry => { - return parsePairKeyValue(entry); - }) - .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0) - .reduce((headers, keyPair) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - headers[keyPair.key] = keyPair.value; - return headers; - }, {}); -} -exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 71082: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0; -const api_1 = __nccwpck_require__(65163); -function sanitizeAttributes(attributes) { - const out = {}; - if (typeof attributes !== 'object' || attributes == null) { - return out; - } - for (const [key, val] of Object.entries(attributes)) { - if (!isAttributeKey(key)) { - api_1.diag.warn(`Invalid attribute key: ${key}`); - continue; - } - if (!isAttributeValue(val)) { - api_1.diag.warn(`Invalid attribute value set for key: ${key}`); - continue; - } - if (Array.isArray(val)) { - out[key] = val.slice(); - } - else { - out[key] = val; - } - } - return out; -} -exports.sanitizeAttributes = sanitizeAttributes; -function isAttributeKey(key) { - return typeof key === 'string' && key.length > 0; -} -exports.isAttributeKey = isAttributeKey; -function isAttributeValue(val) { - if (val == null) { - return true; - } - if (Array.isArray(val)) { - return isHomogeneousAttributeValueArray(val); - } - return isValidPrimitiveAttributeValue(val); -} -exports.isAttributeValue = isAttributeValue; -function isHomogeneousAttributeValueArray(arr) { - let type; - for (const element of arr) { - // null/undefined elements are allowed - if (element == null) - continue; - if (!type) { - if (isValidPrimitiveAttributeValue(element)) { - type = typeof element; - continue; - } - // encountered an invalid primitive - return false; - } - if (typeof element === type) { - continue; - } - return false; - } - return true; -} -function isValidPrimitiveAttributeValue(val) { - switch (typeof val) { - case 'number': - case 'boolean': - case 'string': - return true; - } - return false; -} -//# sourceMappingURL=attributes.js.map - -/***/ }), - -/***/ 25503: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.globalErrorHandler = exports.setGlobalErrorHandler = void 0; -const logging_error_handler_1 = __nccwpck_require__(43414); -/** The global error handler delegate */ -let delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)(); -/** - * Set the global error handler - * @param {ErrorHandler} handler - */ -function setGlobalErrorHandler(handler) { - delegateHandler = handler; -} -exports.setGlobalErrorHandler = setGlobalErrorHandler; -/** - * Return the global error handler - * @param {Exception} ex - */ -function globalErrorHandler(ex) { - try { - delegateHandler(ex); - } - catch (_a) { } // eslint-disable-line no-empty -} -exports.globalErrorHandler = globalErrorHandler; -//# sourceMappingURL=global-error-handler.js.map - -/***/ }), - -/***/ 43414: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.loggingErrorHandler = void 0; -const api_1 = __nccwpck_require__(65163); -/** - * Returns a function that logs an error using the provided logger, or a - * console logger if one was not provided. - */ -function loggingErrorHandler() { - return (ex) => { - api_1.diag.error(stringifyException(ex)); - }; -} -exports.loggingErrorHandler = loggingErrorHandler; -/** - * Converts an exception into a string representation - * @param {Exception} ex - */ -function stringifyException(ex) { - if (typeof ex === 'string') { - return ex; - } - else { - return JSON.stringify(flattenException(ex)); - } -} -/** - * Flattens an exception into key-value pairs by traversing the prototype chain - * and coercing values to strings. Duplicate properties will not be overwritten; - * the first insert wins. - */ -function flattenException(ex) { - const result = {}; - let current = ex; - while (current !== null) { - Object.getOwnPropertyNames(current).forEach(propertyName => { - if (result[propertyName]) - return; - const value = current[propertyName]; - if (value) { - result[propertyName] = String(value); - } - }); - current = Object.getPrototypeOf(current); - } - return result; -} -//# sourceMappingURL=logging-error-handler.js.map - -/***/ }), - -/***/ 89512: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0; -const platform_1 = __nccwpck_require__(92851); -const NANOSECOND_DIGITS = 9; -const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS); -/** - * Converts a number to HrTime, HrTime = [number, number]. - * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. - * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. - * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. - * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds: - * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. - * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: - * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000. - * This is represented in HrTime format as [1609504210, 150000000]. - * @param epochMillis - */ -function numberToHrtime(epochMillis) { - const epochSeconds = epochMillis / 1000; - // Decimals only. - const seconds = Math.trunc(epochSeconds); - // Round sub-nanosecond accuracy to nanosecond. - const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) * - SECOND_TO_NANOSECONDS; - return [seconds, nanos]; -} -function getTimeOrigin() { - let timeOrigin = platform_1.otperformance.timeOrigin; - if (typeof timeOrigin !== 'number') { - const perf = platform_1.otperformance; - timeOrigin = perf.timing && perf.timing.fetchStart; - } - return timeOrigin; -} -/** - * Returns an hrtime calculated via performance component. - * @param performanceNow - */ -function hrTime(performanceNow) { - const timeOrigin = numberToHrtime(getTimeOrigin()); - const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now()); - let seconds = timeOrigin[0] + now[0]; - let nanos = timeOrigin[1] + now[1]; - // Nanoseconds - if (nanos > SECOND_TO_NANOSECONDS) { - nanos -= SECOND_TO_NANOSECONDS; - seconds += 1; - } - return [seconds, nanos]; -} -exports.hrTime = hrTime; -/** - * - * Converts a TimeInput to an HrTime, defaults to _hrtime(). - * @param time - */ -function timeInputToHrTime(time) { - // process.hrtime - if (isTimeInputHrTime(time)) { - return time; - } - else if (typeof time === 'number') { - // Must be a performance.now() if it's smaller than process start time. - if (time < getTimeOrigin()) { - return hrTime(time); - } - else { - // epoch milliseconds or performance.timeOrigin - return numberToHrtime(time); - } - } - else if (time instanceof Date) { - return numberToHrtime(time.getTime()); - } - else { - throw TypeError('Invalid input type'); - } -} -exports.timeInputToHrTime = timeInputToHrTime; -/** - * Returns a duration of two hrTime. - * @param startTime - * @param endTime - */ -function hrTimeDuration(startTime, endTime) { - let seconds = endTime[0] - startTime[0]; - let nanos = endTime[1] - startTime[1]; - // overflow - if (nanos < 0) { - seconds -= 1; - // negate - nanos += SECOND_TO_NANOSECONDS; - } - return [seconds, nanos]; -} -exports.hrTimeDuration = hrTimeDuration; -/** - * Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z" - * @param time - */ -function hrTimeToTimeStamp(time) { - const precision = NANOSECOND_DIGITS; - const tmp = `${'0'.repeat(precision)}${time[1]}Z`; - const nanoString = tmp.substr(tmp.length - precision - 1); - const date = new Date(time[0] * 1000).toISOString(); - return date.replace('000Z', nanoString); -} -exports.hrTimeToTimeStamp = hrTimeToTimeStamp; -/** - * Convert hrTime to nanoseconds. - * @param time - */ -function hrTimeToNanoseconds(time) { - return time[0] * SECOND_TO_NANOSECONDS + time[1]; -} -exports.hrTimeToNanoseconds = hrTimeToNanoseconds; -/** - * Convert hrTime to milliseconds. - * @param time - */ -function hrTimeToMilliseconds(time) { - return Math.round(time[0] * 1e3 + time[1] / 1e6); -} -exports.hrTimeToMilliseconds = hrTimeToMilliseconds; -/** - * Convert hrTime to microseconds. - * @param time - */ -function hrTimeToMicroseconds(time) { - return Math.round(time[0] * 1e6 + time[1] / 1e3); -} -exports.hrTimeToMicroseconds = hrTimeToMicroseconds; -/** - * check if time is HrTime - * @param value - */ -function isTimeInputHrTime(value) { - return (Array.isArray(value) && - value.length === 2 && - typeof value[0] === 'number' && - typeof value[1] === 'number'); -} -exports.isTimeInputHrTime = isTimeInputHrTime; -/** - * check if input value is a correct types.TimeInput - * @param value - */ -function isTimeInput(value) { - return (isTimeInputHrTime(value) || - typeof value === 'number' || - value instanceof Date); -} -exports.isTimeInput = isTimeInput; -//# sourceMappingURL=time.js.map - -/***/ }), - -/***/ 42935: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 44823: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.baggageUtils = void 0; -__exportStar(__nccwpck_require__(15159), exports); -__exportStar(__nccwpck_require__(71082), exports); -__exportStar(__nccwpck_require__(25503), exports); -__exportStar(__nccwpck_require__(43414), exports); -__exportStar(__nccwpck_require__(89512), exports); -__exportStar(__nccwpck_require__(42935), exports); -__exportStar(__nccwpck_require__(80734), exports); -__exportStar(__nccwpck_require__(80380), exports); -exports.baggageUtils = __nccwpck_require__(83114); -__exportStar(__nccwpck_require__(92851), exports); -__exportStar(__nccwpck_require__(13639), exports); -__exportStar(__nccwpck_require__(31856), exports); -__exportStar(__nccwpck_require__(45454), exports); -__exportStar(__nccwpck_require__(66405), exports); -__exportStar(__nccwpck_require__(87750), exports); -__exportStar(__nccwpck_require__(22747), exports); -__exportStar(__nccwpck_require__(20642), exports); -__exportStar(__nccwpck_require__(19932), exports); -__exportStar(__nccwpck_require__(9008), exports); -__exportStar(__nccwpck_require__(37929), exports); -__exportStar(__nccwpck_require__(89712), exports); -__exportStar(__nccwpck_require__(3482), exports); -__exportStar(__nccwpck_require__(12631), exports); -__exportStar(__nccwpck_require__(50369), exports); -__exportStar(__nccwpck_require__(37356), exports); -__exportStar(__nccwpck_require__(86067), exports); -__exportStar(__nccwpck_require__(80380), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 66898: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateValue = exports.validateKey = void 0; -const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; -const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; -const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; -const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); -const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; -/** - * Key is opaque string up to 256 characters printable. It MUST begin with a - * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, - * underscores _, dashes -, asterisks *, and forward slashes /. - * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the - * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. - * see https://www.w3.org/TR/trace-context/#key - */ -function validateKey(key) { - return VALID_KEY_REGEX.test(key); -} -exports.validateKey = validateKey; -/** - * Value is opaque string up to 256 characters printable ASCII RFC0020 - * characters (i.e., the range 0x20 to 0x7E) except comma , and =. - */ -function validateValue(value) { - return (VALID_VALUE_BASE_REGEX.test(value) && - !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); -} -exports.validateValue = validateValue; -//# sourceMappingURL=validators.js.map - -/***/ }), - -/***/ 92851: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(7706), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 10524: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RandomIdGenerator = void 0; -const SPAN_ID_BYTES = 8; -const TRACE_ID_BYTES = 16; -class RandomIdGenerator { - constructor() { - /** - * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex - * characters corresponding to 128 bits. - */ - this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); - /** - * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex - * characters corresponding to 64 bits. - */ - this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); - } -} -exports.RandomIdGenerator = RandomIdGenerator; -const SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); -function getIdGenerator(bytes) { - return function generateId() { - for (let i = 0; i < bytes / 4; i++) { - // unsigned right shift drops decimal part of the number - // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE - SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4); - } - // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated - for (let i = 0; i < bytes; i++) { - if (SHARED_BUFFER[i] > 0) { - break; - } - else if (i === bytes - 1) { - SHARED_BUFFER[bytes - 1] = 1; - } - } - return SHARED_BUFFER.toString('hex', 0, bytes); - }; -} -//# sourceMappingURL=RandomIdGenerator.js.map - -/***/ }), - -/***/ 22246: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEnv = void 0; -const os = __nccwpck_require__(22037); -const environment_1 = __nccwpck_require__(89712); -/** - * Gets the environment variables - */ -function getEnv() { - const processEnv = (0, environment_1.parseEnvironment)(process.env); - return Object.assign({ - HOSTNAME: os.hostname(), - }, environment_1.DEFAULT_ENVIRONMENT, processEnv); -} -exports.getEnv = getEnv; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 10239: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._globalThis = void 0; -/** only globals that common to node and browsers are allowed */ -// eslint-disable-next-line node/no-unsupported-features/es-builtins -exports._globalThis = typeof globalThis === 'object' ? globalThis : global; -//# sourceMappingURL=globalThis.js.map - -/***/ }), - -/***/ 12528: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hexToBase64 = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function hexToBase64(hexStr) { - const hexStrLen = hexStr.length; - let hexAsciiCharsStr = ''; - for (let i = 0; i < hexStrLen; i += 2) { - const hexPair = hexStr.substring(i, i + 2); - const hexVal = parseInt(hexPair, 16); - hexAsciiCharsStr += String.fromCharCode(hexVal); - } - return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64'); -} -exports.hexToBase64 = hexToBase64; -//# sourceMappingURL=hex-to-base64.js.map - -/***/ }), - -/***/ 7706: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(22246), exports); -__exportStar(__nccwpck_require__(10239), exports); -__exportStar(__nccwpck_require__(12528), exports); -__exportStar(__nccwpck_require__(10524), exports); -__exportStar(__nccwpck_require__(16175), exports); -__exportStar(__nccwpck_require__(53926), exports); -__exportStar(__nccwpck_require__(78579), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 16175: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.otperformance = void 0; -const perf_hooks_1 = __nccwpck_require__(4074); -exports.otperformance = perf_hooks_1.performance; -//# sourceMappingURL=performance.js.map - -/***/ }), - -/***/ 53926: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SDK_INFO = void 0; -const version_1 = __nccwpck_require__(80380); -const semantic_conventions_1 = __nccwpck_require__(59757); -/** Constants describing the SDK in use */ -exports.SDK_INFO = { - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node', - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS, - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION, -}; -//# sourceMappingURL=sdk-info.js.map - -/***/ }), - -/***/ 78579: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unrefTimer = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function unrefTimer(timer) { - timer.unref(); -} -exports.unrefTimer = unrefTimer; -//# sourceMappingURL=timer-util.js.map - -/***/ }), - -/***/ 13639: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CompositePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -/** Combines multiple propagators into a single propagator. */ -class CompositePropagator { - /** - * Construct a composite propagator from a list of propagators. - * - * @param [config] Configuration object for composite propagator - */ - constructor(config = {}) { - var _a; - this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : []; - this._fields = Array.from(new Set(this._propagators - // older propagators may not have fields function, null check to be sure - .map(p => (typeof p.fields === 'function' ? p.fields() : [])) - .reduce((x, y) => x.concat(y), []))); - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same carrier key, the propagator later in the list - * will "win". - * - * @param context Context to inject - * @param carrier Carrier into which context will be injected - */ - inject(context, carrier, setter) { - for (const propagator of this._propagators) { - try { - propagator.inject(context, carrier, setter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - } - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same context key, the propagator later in the list - * will "win". - * - * @param context Context to add values to - * @param carrier Carrier from which to extract context - */ - extract(context, carrier, getter) { - return this._propagators.reduce((ctx, propagator) => { - try { - return propagator.extract(ctx, carrier, getter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - return ctx; - }, context); - } - fields() { - // return a new array so our fields cannot be modified - return this._fields.slice(); - } -} -exports.CompositePropagator = CompositePropagator; -//# sourceMappingURL=composite.js.map - -/***/ }), - -/***/ 45454: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=IdGenerator.js.map - -/***/ }), - -/***/ 37929: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceState = void 0; -const validators_1 = __nccwpck_require__(66898); -const MAX_TRACE_STATE_ITEMS = 32; -const MAX_TRACE_STATE_LEN = 512; -const LIST_MEMBERS_SEPARATOR = ','; -const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; -/** - * TraceState must be a class and not a simple object type because of the spec - * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). - * - * Here is the list of allowed mutations: - * - New key-value pair should be added into the beginning of the list - * - The value of any key can be updated. Modified keys MUST be moved to the - * beginning of the list. - */ -class TraceState { - constructor(rawTraceState) { - this._internalState = new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - set(key, value) { - // TODO: Benchmark the different approaches(map vs list) and - // use the faster one. - const traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); - } - traceState._internalState.set(key, value); - return traceState; - } - unset(key) { - const traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - } - get(key) { - return this._internalState.get(key); - } - serialize() { - return this._keys() - .reduce((agg, key) => { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); - return agg; - }, []) - .join(LIST_MEMBERS_SEPARATOR); - } - _parse(rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN) - return; - this._internalState = rawTraceState - .split(LIST_MEMBERS_SEPARATOR) - .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning - .reduce((agg, part) => { - const listMember = part.trim(); // Optional Whitespace (OWS) handling - const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); - if (i !== -1) { - const key = listMember.slice(0, i); - const value = listMember.slice(i + 1, part.length); - if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) { - agg.set(key, value); - } - else { - // TODO: Consider to add warning log - } - } - return agg; - }, new Map()); - // Because of the reverse() requirement, trunc must be done after map is created - if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { - this._internalState = new Map(Array.from(this._internalState.entries()) - .reverse() // Use reverse same as original tracestate parse chain - .slice(0, MAX_TRACE_STATE_ITEMS)); - } - } - _keys() { - return Array.from(this._internalState.keys()).reverse(); - } - _clone() { - const traceState = new TraceState(); - traceState._internalState = new Map(this._internalState); - return traceState; - } -} -exports.TraceState = TraceState; -//# sourceMappingURL=TraceState.js.map - -/***/ }), - -/***/ 31856: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(9008); -const TraceState_1 = __nccwpck_require__(37929); -exports.TRACE_PARENT_HEADER = 'traceparent'; -exports.TRACE_STATE_HEADER = 'tracestate'; -const VERSION = '00'; -const VERSION_PART = '(?!ff)[\\da-f]{2}'; -const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}'; -const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}'; -const FLAGS_PART = '[\\da-f]{2}'; -const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`); -/** - * Parses information from the [traceparent] span tag and converts it into {@link SpanContext} - * @param traceParent - A meta property that comes from server. - * It should be dynamically generated server side to have the server's request trace Id, - * a parent span Id that was set on the server's request span, - * and the trace flags to indicate the server's sampling decision - * (01 = sampled, 00 = not sampled). - * for example: '{version}-{traceId}-{spanId}-{sampleDecision}' - * For more information see {@link https://www.w3.org/TR/trace-context/} - */ -function parseTraceParent(traceParent) { - const match = TRACE_PARENT_REGEX.exec(traceParent); - if (!match) - return null; - // According to the specification the implementation should be compatible - // with future versions. If there are more parts, we only reject it if it's using version 00 - // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent - if (match[1] === '00' && match[5]) - return null; - return { - traceId: match[2], - spanId: match[3], - traceFlags: parseInt(match[4], 16), - }; -} -exports.parseTraceParent = parseTraceParent; -/** - * Propagates {@link SpanContext} through Trace Context format propagation. - * - * Based on the Trace Context specification: - * https://www.w3.org/TR/trace-context/ - */ -class W3CTraceContextPropagator { - inject(context, carrier, setter) { - const spanContext = api_1.trace.getSpanContext(context); - if (!spanContext || - (0, suppress_tracing_1.isTracingSuppressed)(context) || - !(0, api_1.isSpanContextValid)(spanContext)) - return; - const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`; - setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent); - if (spanContext.traceState) { - setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize()); - } - } - extract(context, carrier, getter) { - const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER); - if (!traceParentHeader) - return context; - const traceParent = Array.isArray(traceParentHeader) - ? traceParentHeader[0] - : traceParentHeader; - if (typeof traceParent !== 'string') - return context; - const spanContext = parseTraceParent(traceParent); - if (!spanContext) - return context; - spanContext.isRemote = true; - const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER); - if (traceStateHeader) { - // If more than one `tracestate` header is found, we merge them into a - // single header. - const state = Array.isArray(traceStateHeader) - ? traceStateHeader.join(',') - : traceStateHeader; - spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined); - } - return api_1.trace.setSpanContext(context, spanContext); - } - fields() { - return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER]; - } -} -exports.W3CTraceContextPropagator = W3CTraceContextPropagator; -//# sourceMappingURL=W3CTraceContextPropagator.js.map - -/***/ }), - -/***/ 66405: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0; -const api_1 = __nccwpck_require__(65163); -const RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA'); -var RPCType; -(function (RPCType) { - RPCType["HTTP"] = "http"; -})(RPCType = exports.RPCType || (exports.RPCType = {})); -function setRPCMetadata(context, meta) { - return context.setValue(RPC_METADATA_KEY, meta); -} -exports.setRPCMetadata = setRPCMetadata; -function deleteRPCMetadata(context) { - return context.deleteValue(RPC_METADATA_KEY); -} -exports.deleteRPCMetadata = deleteRPCMetadata; -function getRPCMetadata(context) { - return context.getValue(RPC_METADATA_KEY); -} -exports.getRPCMetadata = getRPCMetadata; -//# sourceMappingURL=rpc-metadata.js.map - -/***/ }), - -/***/ 87750: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOffSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples no traces. */ -class AlwaysOffSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.NOT_RECORD, - }; - } - toString() { - return 'AlwaysOffSampler'; - } -} -exports.AlwaysOffSampler = AlwaysOffSampler; -//# sourceMappingURL=AlwaysOffSampler.js.map - -/***/ }), - -/***/ 22747: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOnSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples all traces. */ -class AlwaysOnSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.RECORD_AND_SAMPLED, - }; - } - toString() { - return 'AlwaysOnSampler'; - } -} -exports.AlwaysOnSampler = AlwaysOnSampler; -//# sourceMappingURL=AlwaysOnSampler.js.map - -/***/ }), - -/***/ 20642: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ParentBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -const global_error_handler_1 = __nccwpck_require__(25503); -const AlwaysOffSampler_1 = __nccwpck_require__(87750); -const AlwaysOnSampler_1 = __nccwpck_require__(22747); -/** - * A composite sampler that either respects the parent span's sampling decision - * or delegates to `delegateSampler` for root spans. - */ -class ParentBasedSampler { - constructor(config) { - var _a, _b, _c, _d; - this._root = config.root; - if (!this._root) { - (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured')); - this._root = new AlwaysOnSampler_1.AlwaysOnSampler(); - } - this._remoteParentSampled = - (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._remoteParentNotSampled = - (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler(); - this._localParentSampled = - (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._localParentNotSampled = - (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler(); - } - shouldSample(context, traceId, spanName, spanKind, attributes, links) { - const parentContext = api_1.trace.getSpanContext(context); - if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) { - return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.isRemote) { - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - toString() { - return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`; - } -} -exports.ParentBasedSampler = ParentBasedSampler; -//# sourceMappingURL=ParentBasedSampler.js.map - -/***/ }), - -/***/ 19932: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceIdRatioBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples a given fraction of traces based of trace id deterministically. */ -class TraceIdRatioBasedSampler { - constructor(_ratio = 0) { - this._ratio = _ratio; - this._ratio = this._normalize(_ratio); - this._upperBound = Math.floor(this._ratio * 0xffffffff); - } - shouldSample(context, traceId) { - return { - decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound - ? api_1.SamplingDecision.RECORD_AND_SAMPLED - : api_1.SamplingDecision.NOT_RECORD, - }; - } - toString() { - return `TraceIdRatioBased{${this._ratio}}`; - } - _normalize(ratio) { - if (typeof ratio !== 'number' || isNaN(ratio)) - return 0; - return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; - } - _accumulate(traceId) { - let accumulation = 0; - for (let i = 0; i < traceId.length / 8; i++) { - const pos = i * 8; - const part = parseInt(traceId.slice(pos, pos + 8), 16); - accumulation = (accumulation ^ part) >>> 0; - } - return accumulation; - } -} -exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; -//# sourceMappingURL=TraceIdRatioBasedSampler.js.map - -/***/ }), - -/***/ 9008: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0; -const api_1 = __nccwpck_require__(65163); -const SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING'); -function suppressTracing(context) { - return context.setValue(SUPPRESS_TRACING_KEY, true); -} -exports.suppressTracing = suppressTracing; -function unsuppressTracing(context) { - return context.deleteValue(SUPPRESS_TRACING_KEY); -} -exports.unsuppressTracing = unsuppressTracing; -function isTracingSuppressed(context) { - return context.getValue(SUPPRESS_TRACING_KEY) === true; -} -exports.isTracingSuppressed = isTracingSuppressed; -//# sourceMappingURL=suppress-tracing.js.map - -/***/ }), - -/***/ 86067: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BindOnceFuture = void 0; -const promise_1 = __nccwpck_require__(52525); -/** - * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked. - */ -class BindOnceFuture { - constructor(_callback, _that) { - this._callback = _callback; - this._that = _that; - this._isCalled = false; - this._deferred = new promise_1.Deferred(); - } - get isCalled() { - return this._isCalled; - } - get promise() { - return this._deferred.promise; - } - call(...args) { - if (!this._isCalled) { - this._isCalled = true; - try { - Promise.resolve(this._callback.call(this._that, ...args)) - .then(val => this._deferred.resolve(val), err => this._deferred.reject(err)); - } - catch (err) { - this._deferred.reject(err); - } - } - return this._deferred.promise; - } -} -exports.BindOnceFuture = BindOnceFuture; -//# sourceMappingURL=callback.js.map - -/***/ }), - -/***/ 89712: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0; -const api_1 = __nccwpck_require__(65163); -const sampling_1 = __nccwpck_require__(12631); -const DEFAULT_LIST_SEPARATOR = ','; -/** - * Environment interface to define all names - */ -const ENVIRONMENT_NUMBERS_KEYS = [ - 'OTEL_BSP_EXPORT_TIMEOUT', - 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE', - 'OTEL_BSP_MAX_QUEUE_SIZE', - 'OTEL_BSP_SCHEDULE_DELAY', - 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_EVENT_COUNT_LIMIT', - 'OTEL_SPAN_LINK_COUNT_LIMIT', - 'OTEL_EXPORTER_JAEGER_AGENT_PORT', -]; -function isEnvVarANumber(key) { - return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1); -} -const ENVIRONMENT_LISTS_KEYS = [ - 'OTEL_NO_PATCH_MODULES', - 'OTEL_PROPAGATORS', -]; -function isEnvVarAList(key) { - return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1; -} -exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity; -exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128; -/** - * Default environment variables - */ -exports.DEFAULT_ENVIRONMENT = { - CONTAINER_NAME: '', - ECS_CONTAINER_METADATA_URI_V4: '', - ECS_CONTAINER_METADATA_URI: '', - HOSTNAME: '', - KUBERNETES_SERVICE_HOST: '', - NAMESPACE: '', - OTEL_BSP_EXPORT_TIMEOUT: 30000, - OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512, - OTEL_BSP_MAX_QUEUE_SIZE: 2048, - OTEL_BSP_SCHEDULE_DELAY: 5000, - OTEL_EXPORTER_JAEGER_AGENT_HOST: '', - OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832, - OTEL_EXPORTER_JAEGER_ENDPOINT: '', - OTEL_EXPORTER_JAEGER_PASSWORD: '', - OTEL_EXPORTER_JAEGER_USER: '', - OTEL_EXPORTER_OTLP_ENDPOINT: '', - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '', - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '', - OTEL_EXPORTER_OTLP_HEADERS: '', - OTEL_EXPORTER_OTLP_TRACES_HEADERS: '', - OTEL_EXPORTER_OTLP_METRICS_HEADERS: '', - OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans', - OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO, - OTEL_NO_PATCH_MODULES: [], - OTEL_PROPAGATORS: ['tracecontext', 'baggage'], - OTEL_RESOURCE_ATTRIBUTES: '', - OTEL_SERVICE_NAME: '', - OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_EVENT_COUNT_LIMIT: 128, - OTEL_SPAN_LINK_COUNT_LIMIT: 128, - OTEL_TRACES_EXPORTER: 'none', - OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn, - OTEL_TRACES_SAMPLER_ARG: '', - OTEL_EXPORTER_OTLP_COMPRESSION: '', - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '', - OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '' -}; -/** - * Parses a variable as number with number validation - * @param name - * @param environment - * @param values - * @param min - * @param max - */ -function parseNumber(name, environment, values, min = -Infinity, max = Infinity) { - if (typeof values[name] !== 'undefined') { - const value = Number(values[name]); - if (!isNaN(value)) { - if (value < min) { - environment[name] = min; - } - else if (value > max) { - environment[name] = max; - } - else { - environment[name] = value; - } - } - } -} -/** - * Parses list-like strings from input into output. - * @param name - * @param environment - * @param values - * @param separator - */ -function parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) { - const givenValue = input[name]; - if (typeof givenValue === 'string') { - output[name] = givenValue.split(separator).map(v => v.trim()); - } -} -// The support string -> DiagLogLevel mappings -const logLevelMap = { - ALL: api_1.DiagLogLevel.ALL, - VERBOSE: api_1.DiagLogLevel.VERBOSE, - DEBUG: api_1.DiagLogLevel.DEBUG, - INFO: api_1.DiagLogLevel.INFO, - WARN: api_1.DiagLogLevel.WARN, - ERROR: api_1.DiagLogLevel.ERROR, - NONE: api_1.DiagLogLevel.NONE, -}; -/** - * Environmentally sets log level if valid log level string is provided - * @param key - * @param environment - * @param values - */ -function setLogLevelFromEnv(key, environment, values) { - const value = values[key]; - if (typeof value === 'string') { - const theLevel = logLevelMap[value.toUpperCase()]; - if (theLevel != null) { - environment[key] = theLevel; - } - } -} -/** - * Parses environment values - * @param values - */ -function parseEnvironment(values) { - const environment = {}; - for (const env in exports.DEFAULT_ENVIRONMENT) { - const key = env; - switch (key) { - case 'OTEL_LOG_LEVEL': - setLogLevelFromEnv(key, environment, values); - break; - default: - if (isEnvVarANumber(key)) { - parseNumber(key, environment, values); - } - else if (isEnvVarAList(key)) { - parseStringList(key, environment, values); - } - else { - const value = values[key]; - if (typeof value !== 'undefined' && value !== null) { - environment[key] = String(value); - } - } - } - } - return environment; -} -exports.parseEnvironment = parseEnvironment; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 98873: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPlainObject = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * based on lodash in order to support esm builds without esModuleInterop. - * lodash is using MIT License. - **/ -const objectTag = '[object Object]'; -const nullTag = '[object Null]'; -const undefinedTag = '[object Undefined]'; -const funcProto = Function.prototype; -const funcToString = funcProto.toString; -const objectCtorString = funcToString.call(Object); -const getPrototype = overArg(Object.getPrototypeOf, Object); -const objectProto = Object.prototype; -const hasOwnProperty = objectProto.hasOwnProperty; -const symToStringTag = Symbol ? Symbol.toStringTag : undefined; -const nativeObjectToString = objectProto.toString; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function (arg) { - return func(transform(arg)); - }; -} -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) !== objectTag) { - return false; - } - const proto = getPrototype(value); - if (proto === null) { - return true; - } - const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) === objectCtorString; -} -exports.isPlainObject = isPlainObject; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; - let unmasked = false; - try { - value[symToStringTag] = undefined; - unmasked = true; - } - catch (e) { - // silence - } - const result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } - else { - delete value[symToStringTag]; - } - } - return result; -} -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} -//# sourceMappingURL=lodash.merge.js.map - -/***/ }), - -/***/ 3482: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.merge = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -const lodash_merge_1 = __nccwpck_require__(98873); -const MAX_LEVEL = 20; -/** - * Merges objects together - * @param args - objects / values to be merged - */ -function merge(...args) { - let result = args.shift(); - const objects = new WeakMap(); - while (args.length > 0) { - result = mergeTwoObjects(result, args.shift(), 0, objects); - } - return result; -} -exports.merge = merge; -function takeValue(value) { - if (isArray(value)) { - return value.slice(); - } - return value; -} -/** - * Merges two objects - * @param one - first object - * @param two - second object - * @param level - current deep level - * @param objects - objects holder that has been already referenced - to prevent - * cyclic dependency - */ -function mergeTwoObjects(one, two, level = 0, objects) { - let result; - if (level > MAX_LEVEL) { - return undefined; - } - level++; - if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) { - result = takeValue(two); - } - else if (isArray(one)) { - result = one.slice(); - if (isArray(two)) { - for (let i = 0, j = two.length; i < j; i++) { - result.push(takeValue(two[i])); - } - } - else if (isObject(two)) { - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - result[key] = takeValue(two[key]); - } - } - } - else if (isObject(one)) { - if (isObject(two)) { - if (!shouldMerge(one, two)) { - return two; - } - result = Object.assign({}, one); - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - const twoValue = two[key]; - if (isPrimitive(twoValue)) { - if (typeof twoValue === 'undefined') { - delete result[key]; - } - else { - // result[key] = takeValue(twoValue); - result[key] = twoValue; - } - } - else { - const obj1 = result[key]; - const obj2 = twoValue; - if (wasObjectReferenced(one, key, objects) || - wasObjectReferenced(two, key, objects)) { - delete result[key]; - } - else { - if (isObject(obj1) && isObject(obj2)) { - const arr1 = objects.get(obj1) || []; - const arr2 = objects.get(obj2) || []; - arr1.push({ obj: one, key }); - arr2.push({ obj: two, key }); - objects.set(obj1, arr1); - objects.set(obj2, arr2); - } - result[key] = mergeTwoObjects(result[key], twoValue, level, objects); - } - } - } - } - else { - result = two; - } - } - return result; -} -/** - * Function to check if object has been already reference - * @param obj - * @param key - * @param objects - */ -function wasObjectReferenced(obj, key, objects) { - const arr = objects.get(obj[key]) || []; - for (let i = 0, j = arr.length; i < j; i++) { - const info = arr[i]; - if (info.key === key && info.obj === obj) { - return true; - } - } - return false; -} -function isArray(value) { - return Array.isArray(value); -} -function isFunction(value) { - return typeof value === 'function'; -} -function isObject(value) { - return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object'; -} -function isPrimitive(value) { - return typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean' || - typeof value === 'undefined' || - value instanceof Date || - value instanceof RegExp || - value === null; -} -function shouldMerge(one, two) { - if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) { - return false; - } - return true; -} -//# sourceMappingURL=merge.js.map - -/***/ }), - -/***/ 52525: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Deferred = void 0; -class Deferred { - constructor() { - this._promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - }); - } - get promise() { - return this._promise; - } - resolve(val) { - this._resolve(val); - } - reject(err) { - this._reject(err); - } -} -exports.Deferred = Deferred; -//# sourceMappingURL=promise.js.map - -/***/ }), - -/***/ 12631: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TracesSamplerValues = void 0; -var TracesSamplerValues; -(function (TracesSamplerValues) { - TracesSamplerValues["AlwaysOff"] = "always_off"; - TracesSamplerValues["AlwaysOn"] = "always_on"; - TracesSamplerValues["ParentBasedAlwaysOff"] = "parentbased_always_off"; - TracesSamplerValues["ParentBasedAlwaysOn"] = "parentbased_always_on"; - TracesSamplerValues["ParentBasedTraceIdRatio"] = "parentbased_traceidratio"; - TracesSamplerValues["TraceIdRatio"] = "traceidratio"; -})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {})); -//# sourceMappingURL=sampling.js.map - -/***/ }), - -/***/ 50369: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isUrlIgnored = exports.urlMatches = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function urlMatches(url, urlToMatch) { - if (typeof urlToMatch === 'string') { - return url === urlToMatch; - } - else { - return !!url.match(urlToMatch); - } -} -exports.urlMatches = urlMatches; -/** - * Check if {@param url} should be ignored when comparing against {@param ignoredUrls} - * @param url - * @param ignoredUrls - */ -function isUrlIgnored(url, ignoredUrls) { - if (!ignoredUrls) { - return false; - } - for (const ignoreUrl of ignoredUrls) { - if (urlMatches(url, ignoreUrl)) { - return true; - } - } - return false; -} -exports.isUrlIgnored = isUrlIgnored; -//# sourceMappingURL=url.js.map - -/***/ }), - -/***/ 37356: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isWrapped = void 0; -/** - * Checks if certain function has been already wrapped - * @param func - */ -function isWrapped(func) { - return (typeof func === 'function' && - typeof func.__original === 'function' && - typeof func.__unwrap === 'function' && - func.__wrapped === true); -} -exports.isWrapped = isWrapped; -//# sourceMappingURL=wrap.js.map - -/***/ }), - -/***/ 80380: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VERSION = void 0; -// this is autogenerated file, see scripts/version-update.js -exports.VERSION = '1.2.0'; -//# sourceMappingURL=version.js.map - -/***/ }), - -/***/ 59757: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(26013), exports); -__exportStar(__nccwpck_require__(43898), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 37276: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticResourceAttributes = { - /** - * Name of the cloud provider. - */ - CLOUD_PROVIDER: 'cloud.provider', - /** - * The cloud account ID the resource is assigned to. - */ - CLOUD_ACCOUNT_ID: 'cloud.account.id', - /** - * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations). - */ - CLOUD_REGION: 'cloud.region', - /** - * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. - * - * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. - */ - CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone', - /** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - */ - CLOUD_PLATFORM: 'cloud.platform', - /** - * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - */ - AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn', - /** - * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - */ - AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn', - /** - * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - */ - AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype', - /** - * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). - */ - AWS_ECS_TASK_ARN: 'aws.ecs.task.arn', - /** - * The task definition family this task definition is a member of. - */ - AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family', - /** - * The revision for this task definition. - */ - AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision', - /** - * The ARN of an EKS cluster. - */ - AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn', - /** - * The name(s) of the AWS log group(s) an application is writing to. - * - * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. - */ - AWS_LOG_GROUP_NAMES: 'aws.log.group.names', - /** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * - * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - */ - AWS_LOG_GROUP_ARNS: 'aws.log.group.arns', - /** - * The name(s) of the AWS log stream(s) an application is writing to. - */ - AWS_LOG_STREAM_NAMES: 'aws.log.stream.names', - /** - * The ARN(s) of the AWS log stream(s). - * - * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. - */ - AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns', - /** - * Container name. - */ - CONTAINER_NAME: 'container.name', - /** - * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. - */ - CONTAINER_ID: 'container.id', - /** - * The container runtime managing this container. - */ - CONTAINER_RUNTIME: 'container.runtime', - /** - * Name of the image the container was built on. - */ - CONTAINER_IMAGE_NAME: 'container.image.name', - /** - * Container image tag. - */ - CONTAINER_IMAGE_TAG: 'container.image.tag', - /** - * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). - */ - DEPLOYMENT_ENVIRONMENT: 'deployment.environment', - /** - * A unique identifier representing the device. - * - * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. - */ - DEVICE_ID: 'device.id', - /** - * The model identifier for the device. - * - * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. - */ - DEVICE_MODEL_IDENTIFIER: 'device.model.identifier', - /** - * The marketing name for the device model. - * - * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. - */ - DEVICE_MODEL_NAME: 'device.model.name', - /** - * The name of the single function that this runtime instance executes. - * - * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes). - */ - FAAS_NAME: 'faas.name', - /** - * The unique ID of the single function that this runtime instance executes. - * - * Note: Depending on the cloud provider, use: - - * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - Take care not to use the "invoked ARN" directly but replace any - [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple - different aliases. - * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) - * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id). - - On some providers, it may not be possible to determine the full ID at startup, - which is why this field cannot be made required. For example, on AWS the account ID - part of the ARN is not available without calling another AWS API - which may be deemed too slow for a short-running lambda function. - As an alternative, consider setting `faas.id` as a span attribute instead. - */ - FAAS_ID: 'faas.id', - /** - * The immutable version of the function being executed. - * - * Note: Depending on the cloud provider and platform, use: - - * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - (an integer represented as a decimal string). - * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) - (i.e., the function name plus the revision suffix). - * **Google Cloud Functions:** The value of the - [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - * **Azure Functions:** Not applicable. Do not set this attribute. - */ - FAAS_VERSION: 'faas.version', - /** - * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. - * - * Note: * **AWS Lambda:** Use the (full) log stream name. - */ - FAAS_INSTANCE: 'faas.instance', - /** - * The amount of memory available to the serverless function in MiB. - * - * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. - */ - FAAS_MAX_MEMORY: 'faas.max_memory', - /** - * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. - */ - HOST_ID: 'host.id', - /** - * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. - */ - HOST_NAME: 'host.name', - /** - * Type of host. For Cloud, this must be the machine type. - */ - HOST_TYPE: 'host.type', - /** - * The CPU architecture the host system is running on. - */ - HOST_ARCH: 'host.arch', - /** - * Name of the VM image or OS install the host was instantiated from. - */ - HOST_IMAGE_NAME: 'host.image.name', - /** - * VM image ID. For Cloud, this value is from the provider. - */ - HOST_IMAGE_ID: 'host.image.id', - /** - * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes). - */ - HOST_IMAGE_VERSION: 'host.image.version', - /** - * The name of the cluster. - */ - K8S_CLUSTER_NAME: 'k8s.cluster.name', - /** - * The name of the Node. - */ - K8S_NODE_NAME: 'k8s.node.name', - /** - * The UID of the Node. - */ - K8S_NODE_UID: 'k8s.node.uid', - /** - * The name of the namespace that the pod is running in. - */ - K8S_NAMESPACE_NAME: 'k8s.namespace.name', - /** - * The UID of the Pod. - */ - K8S_POD_UID: 'k8s.pod.uid', - /** - * The name of the Pod. - */ - K8S_POD_NAME: 'k8s.pod.name', - /** - * The name of the Container in a Pod template. - */ - K8S_CONTAINER_NAME: 'k8s.container.name', - /** - * The UID of the ReplicaSet. - */ - K8S_REPLICASET_UID: 'k8s.replicaset.uid', - /** - * The name of the ReplicaSet. - */ - K8S_REPLICASET_NAME: 'k8s.replicaset.name', - /** - * The UID of the Deployment. - */ - K8S_DEPLOYMENT_UID: 'k8s.deployment.uid', - /** - * The name of the Deployment. - */ - K8S_DEPLOYMENT_NAME: 'k8s.deployment.name', - /** - * The UID of the StatefulSet. - */ - K8S_STATEFULSET_UID: 'k8s.statefulset.uid', - /** - * The name of the StatefulSet. - */ - K8S_STATEFULSET_NAME: 'k8s.statefulset.name', - /** - * The UID of the DaemonSet. - */ - K8S_DAEMONSET_UID: 'k8s.daemonset.uid', - /** - * The name of the DaemonSet. - */ - K8S_DAEMONSET_NAME: 'k8s.daemonset.name', - /** - * The UID of the Job. - */ - K8S_JOB_UID: 'k8s.job.uid', - /** - * The name of the Job. - */ - K8S_JOB_NAME: 'k8s.job.name', - /** - * The UID of the CronJob. - */ - K8S_CRONJOB_UID: 'k8s.cronjob.uid', - /** - * The name of the CronJob. - */ - K8S_CRONJOB_NAME: 'k8s.cronjob.name', - /** - * The operating system type. - */ - OS_TYPE: 'os.type', - /** - * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. - */ - OS_DESCRIPTION: 'os.description', - /** - * Human readable operating system name. - */ - OS_NAME: 'os.name', - /** - * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes). - */ - OS_VERSION: 'os.version', - /** - * Process identifier (PID). - */ - PROCESS_PID: 'process.pid', - /** - * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_NAME: 'process.executable.name', - /** - * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_PATH: 'process.executable.path', - /** - * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. - */ - PROCESS_COMMAND: 'process.command', - /** - * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. - */ - PROCESS_COMMAND_LINE: 'process.command_line', - /** - * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. - */ - PROCESS_COMMAND_ARGS: 'process.command_args', - /** - * The username of the user that owns the process. - */ - PROCESS_OWNER: 'process.owner', - /** - * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. - */ - PROCESS_RUNTIME_NAME: 'process.runtime.name', - /** - * The version of the runtime of this process, as returned by the runtime without modification. - */ - PROCESS_RUNTIME_VERSION: 'process.runtime.version', - /** - * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. - */ - PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description', - /** - * Logical name of the service. - * - * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. - */ - SERVICE_NAME: 'service.name', - /** - * A namespace for `service.name`. - * - * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. - */ - SERVICE_NAMESPACE: 'service.namespace', - /** - * The string ID of the service instance. - * - * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). - */ - SERVICE_INSTANCE_ID: 'service.instance.id', - /** - * The version string of the service API or implementation. - */ - SERVICE_VERSION: 'service.version', - /** - * The name of the telemetry SDK as defined above. - */ - TELEMETRY_SDK_NAME: 'telemetry.sdk.name', - /** - * The language of the telemetry SDK. - */ - TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language', - /** - * The version string of the telemetry SDK. - */ - TELEMETRY_SDK_VERSION: 'telemetry.sdk.version', - /** - * The version string of the auto instrumentation agent, if used. - */ - TELEMETRY_AUTO_VERSION: 'telemetry.auto.version', - /** - * The name of the web engine. - */ - WEBENGINE_NAME: 'webengine.name', - /** - * The version of the web engine. - */ - WEBENGINE_VERSION: 'webengine.version', - /** - * Additional description of the web engine (e.g. detailed version and edition information). - */ - WEBENGINE_DESCRIPTION: 'webengine.description', -}; -exports.CloudProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.CloudPlatformValues = { - /** Alibaba Cloud Elastic Compute Service. */ - ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs', - /** Alibaba Cloud Function Compute. */ - ALIBABA_CLOUD_FC: 'alibaba_cloud_fc', - /** AWS Elastic Compute Cloud. */ - AWS_EC2: 'aws_ec2', - /** AWS Elastic Container Service. */ - AWS_ECS: 'aws_ecs', - /** AWS Elastic Kubernetes Service. */ - AWS_EKS: 'aws_eks', - /** AWS Lambda. */ - AWS_LAMBDA: 'aws_lambda', - /** AWS Elastic Beanstalk. */ - AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk', - /** Azure Virtual Machines. */ - AZURE_VM: 'azure_vm', - /** Azure Container Instances. */ - AZURE_CONTAINER_INSTANCES: 'azure_container_instances', - /** Azure Kubernetes Service. */ - AZURE_AKS: 'azure_aks', - /** Azure Functions. */ - AZURE_FUNCTIONS: 'azure_functions', - /** Azure App Service. */ - AZURE_APP_SERVICE: 'azure_app_service', - /** Google Cloud Compute Engine (GCE). */ - GCP_COMPUTE_ENGINE: 'gcp_compute_engine', - /** Google Cloud Run. */ - GCP_CLOUD_RUN: 'gcp_cloud_run', - /** Google Cloud Kubernetes Engine (GKE). */ - GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine', - /** Google Cloud Functions (GCF). */ - GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions', - /** Google Cloud App Engine (GAE). */ - GCP_APP_ENGINE: 'gcp_app_engine', -}; -exports.AwsEcsLaunchtypeValues = { - /** ec2. */ - EC2: 'ec2', - /** fargate. */ - FARGATE: 'fargate', -}; -exports.HostArchValues = { - /** AMD64. */ - AMD64: 'amd64', - /** ARM32. */ - ARM32: 'arm32', - /** ARM64. */ - ARM64: 'arm64', - /** Itanium. */ - IA64: 'ia64', - /** 32-bit PowerPC. */ - PPC32: 'ppc32', - /** 64-bit PowerPC. */ - PPC64: 'ppc64', - /** 32-bit x86. */ - X86: 'x86', -}; -exports.OsTypeValues = { - /** Microsoft Windows. */ - WINDOWS: 'windows', - /** Linux. */ - LINUX: 'linux', - /** Apple Darwin. */ - DARWIN: 'darwin', - /** FreeBSD. */ - FREEBSD: 'freebsd', - /** NetBSD. */ - NETBSD: 'netbsd', - /** OpenBSD. */ - OPENBSD: 'openbsd', - /** DragonFly BSD. */ - DRAGONFLYBSD: 'dragonflybsd', - /** HP-UX (Hewlett Packard Unix). */ - HPUX: 'hpux', - /** AIX (Advanced Interactive eXecutive). */ - AIX: 'aix', - /** Oracle Solaris. */ - SOLARIS: 'solaris', - /** IBM z/OS. */ - Z_OS: 'z_os', -}; -exports.TelemetrySdkLanguageValues = { - /** cpp. */ - CPP: 'cpp', - /** dotnet. */ - DOTNET: 'dotnet', - /** erlang. */ - ERLANG: 'erlang', - /** go. */ - GO: 'go', - /** java. */ - JAVA: 'java', - /** nodejs. */ - NODEJS: 'nodejs', - /** php. */ - PHP: 'php', - /** python. */ - PYTHON: 'python', - /** ruby. */ - RUBY: 'ruby', - /** webjs. */ - WEBJS: 'webjs', -}; -//# sourceMappingURL=SemanticResourceAttributes.js.map - -/***/ }), - -/***/ 43898: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(37276), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 37732: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticAttributes = { - /** - * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). - * - * Note: This may be different from `faas.id` if an alias is involved. - */ - AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn', - /** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - */ - DB_SYSTEM: 'db.system', - /** - * The connection string used to connect to the database. It is recommended to remove embedded credentials. - */ - DB_CONNECTION_STRING: 'db.connection_string', - /** - * Username for accessing the database. - */ - DB_USER: 'db.user', - /** - * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. - */ - DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname', - /** - * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). - * - * Note: In some SQL databases, the database name to be used is called "schema name". - */ - DB_NAME: 'db.name', - /** - * The database statement being executed. - * - * Note: The value may be sanitized to exclude sensitive information. - */ - DB_STATEMENT: 'db.statement', - /** - * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. - * - * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. - */ - DB_OPERATION: 'db.operation', - /** - * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. - * - * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). - */ - DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name', - /** - * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace', - /** - * The fetch size used for paging, i.e. how many rows will be returned at once. - */ - DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size', - /** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - */ - DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_CASSANDRA_TABLE: 'db.cassandra.table', - /** - * Whether or not the query is idempotent. - */ - DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence', - /** - * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. - */ - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count', - /** - * The ID of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id', - /** - * The data center of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc', - /** - * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_HBASE_NAMESPACE: 'db.hbase.namespace', - /** - * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. - */ - DB_REDIS_DATABASE_INDEX: 'db.redis.database_index', - /** - * The collection being accessed within the database stated in `db.name`. - */ - DB_MONGODB_COLLECTION: 'db.mongodb.collection', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_SQL_TABLE: 'db.sql.table', - /** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. - */ - EXCEPTION_TYPE: 'exception.type', - /** - * The exception message. - */ - EXCEPTION_MESSAGE: 'exception.message', - /** - * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - */ - EXCEPTION_STACKTRACE: 'exception.stacktrace', - /** - * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. - * - * Note: An exception is considered to have escaped (or left) the scope of a span, - if that span is ended while the exception is still logically "in flight". - This may be actually "in flight" in some languages (e.g. if the exception - is passed to a Context manager's `__exit__` method in Python) but will - usually be caught at the point of recording the exception in most languages. - - It is usually not possible to determine at the point where an exception is thrown - whether it will escape the scope of a span. - However, it is trivial to know that an exception - will escape, if one checks for an active exception just before ending the span, - as done in the [example above](#exception-end-example). - - It follows that an exception may still escape the scope of the span - even if the `exception.escaped` attribute was not set or set to false, - since the event might have been recorded at a time where it was not - clear whether the exception will escape. - */ - EXCEPTION_ESCAPED: 'exception.escaped', - /** - * Type of the trigger on which the function is executed. - */ - FAAS_TRIGGER: 'faas.trigger', - /** - * The execution ID of the current function execution. - */ - FAAS_EXECUTION: 'faas.execution', - /** - * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - */ - FAAS_DOCUMENT_COLLECTION: 'faas.document.collection', - /** - * Describes the type of the operation that was performed on the data. - */ - FAAS_DOCUMENT_OPERATION: 'faas.document.operation', - /** - * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_DOCUMENT_TIME: 'faas.document.time', - /** - * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. - */ - FAAS_DOCUMENT_NAME: 'faas.document.name', - /** - * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_TIME: 'faas.time', - /** - * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - */ - FAAS_CRON: 'faas.cron', - /** - * A boolean that is true if the serverless function is executed for the first time (aka cold-start). - */ - FAAS_COLDSTART: 'faas.coldstart', - /** - * The name of the invoked function. - * - * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. - */ - FAAS_INVOKED_NAME: 'faas.invoked_name', - /** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - */ - FAAS_INVOKED_PROVIDER: 'faas.invoked_provider', - /** - * The cloud region of the invoked function. - * - * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. - */ - FAAS_INVOKED_REGION: 'faas.invoked_region', - /** - * Transport protocol used. See note below. - */ - NET_TRANSPORT: 'net.transport', - /** - * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). - */ - NET_PEER_IP: 'net.peer.ip', - /** - * Remote port number. - */ - NET_PEER_PORT: 'net.peer.port', - /** - * Remote hostname or similar, see note below. - */ - NET_PEER_NAME: 'net.peer.name', - /** - * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. - */ - NET_HOST_IP: 'net.host.ip', - /** - * Like `net.peer.port` but for the host port. - */ - NET_HOST_PORT: 'net.host.port', - /** - * Local hostname or similar, see note below. - */ - NET_HOST_NAME: 'net.host.name', - /** - * The internet connection type currently being used by the host. - */ - NET_HOST_CONNECTION_TYPE: 'net.host.connection.type', - /** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - */ - NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype', - /** - * The name of the mobile carrier. - */ - NET_HOST_CARRIER_NAME: 'net.host.carrier.name', - /** - * The mobile carrier country code. - */ - NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc', - /** - * The mobile carrier network code. - */ - NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc', - /** - * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. - */ - NET_HOST_CARRIER_ICC: 'net.host.carrier.icc', - /** - * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. - */ - PEER_SERVICE: 'peer.service', - /** - * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. - */ - ENDUSER_ID: 'enduser.id', - /** - * Actual/assumed role the client is making the request under extracted from token or application security context. - */ - ENDUSER_ROLE: 'enduser.role', - /** - * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - */ - ENDUSER_SCOPE: 'enduser.scope', - /** - * Current "managed" thread ID (as opposed to OS thread ID). - */ - THREAD_ID: 'thread.id', - /** - * Current thread name. - */ - THREAD_NAME: 'thread.name', - /** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). - */ - CODE_FUNCTION: 'code.function', - /** - * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. - */ - CODE_NAMESPACE: 'code.namespace', - /** - * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). - */ - CODE_FILEPATH: 'code.filepath', - /** - * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. - */ - CODE_LINENO: 'code.lineno', - /** - * HTTP request method. - */ - HTTP_METHOD: 'http.method', - /** - * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. - * - * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`. - */ - HTTP_URL: 'http.url', - /** - * The full request target as passed in a HTTP request line or equivalent. - */ - HTTP_TARGET: 'http.target', - /** - * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note. - * - * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set. - */ - HTTP_HOST: 'http.host', - /** - * The URI scheme identifying the used protocol. - */ - HTTP_SCHEME: 'http.scheme', - /** - * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). - */ - HTTP_STATUS_CODE: 'http.status_code', - /** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - */ - HTTP_FLAVOR: 'http.flavor', - /** - * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. - */ - HTTP_USER_AGENT: 'http.user_agent', - /** - * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length', - /** - * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed', - /** - * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length', - /** - * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed', - /** - * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). - * - * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available. - */ - HTTP_SERVER_NAME: 'http.server_name', - /** - * The matched route (path template). - */ - HTTP_ROUTE: 'http.route', - /** - * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). - * - * Note: This is not necessarily the same as `net.peer.ip`, which would - identify the network-level peer, which may be a proxy. - - This attribute should be set when a source of information different - from the one used for `net.peer.ip`, is available even if that other - source just confirms the same value as `net.peer.ip`. - Rationale: For `net.peer.ip`, one typically does not know if it - comes from a proxy, reverse proxy, or the actual client. Setting - `http.client_ip` when it's the same as `net.peer.ip` means that - one is at least somewhat confident that the address is not that of - the closest proxy. - */ - HTTP_CLIENT_IP: 'http.client_ip', - /** - * The keys in the `RequestItems` object field. - */ - AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names', - /** - * The JSON-serialized value of each item in the `ConsumedCapacity` response field. - */ - AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity', - /** - * The JSON-serialized value of the `ItemCollectionMetrics` response field. - */ - AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics', - /** - * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity', - /** - * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity', - /** - * The value of the `ConsistentRead` request parameter. - */ - AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read', - /** - * The value of the `ProjectionExpression` request parameter. - */ - AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection', - /** - * The value of the `Limit` request parameter. - */ - AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit', - /** - * The value of the `AttributesToGet` request parameter. - */ - AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get', - /** - * The value of the `IndexName` request parameter. - */ - AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name', - /** - * The value of the `Select` request parameter. - */ - AWS_DYNAMODB_SELECT: 'aws.dynamodb.select', - /** - * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes', - /** - * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes', - /** - * The value of the `ExclusiveStartTableName` request parameter. - */ - AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table', - /** - * The the number of items in the `TableNames` response parameter. - */ - AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count', - /** - * The value of the `ScanIndexForward` request parameter. - */ - AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward', - /** - * The value of the `Segment` request parameter. - */ - AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment', - /** - * The value of the `TotalSegments` request parameter. - */ - AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments', - /** - * The value of the `Count` response parameter. - */ - AWS_DYNAMODB_COUNT: 'aws.dynamodb.count', - /** - * The value of the `ScannedCount` response parameter. - */ - AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count', - /** - * The JSON-serialized value of each item in the `AttributeDefinitions` request field. - */ - AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions', - /** - * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates', - /** - * A string identifying the messaging system. - */ - MESSAGING_SYSTEM: 'messaging.system', - /** - * The message destination name. This might be equal to the span name but is required nevertheless. - */ - MESSAGING_DESTINATION: 'messaging.destination', - /** - * The kind of message destination. - */ - MESSAGING_DESTINATION_KIND: 'messaging.destination_kind', - /** - * A boolean that is true if the message destination is temporary. - */ - MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination', - /** - * The name of the transport protocol. - */ - MESSAGING_PROTOCOL: 'messaging.protocol', - /** - * The version of the transport protocol. - */ - MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version', - /** - * Connection string. - */ - MESSAGING_URL: 'messaging.url', - /** - * A value used by the messaging system as an identifier for the message, represented as a string. - */ - MESSAGING_MESSAGE_ID: 'messaging.message_id', - /** - * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". - */ - MESSAGING_CONVERSATION_ID: 'messaging.conversation_id', - /** - * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. - */ - MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes', - /** - * The compressed size of the message payload in bytes. - */ - MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes', - /** - * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. - */ - MESSAGING_OPERATION: 'messaging.operation', - /** - * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. - */ - MESSAGING_CONSUMER_ID: 'messaging.consumer_id', - /** - * RabbitMQ message routing key. - */ - MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key', - /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. - * - * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. - */ - MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key', - /** - * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. - */ - MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group', - /** - * Client Id for the Consumer or Producer that is handling the message. - */ - MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id', - /** - * Partition the message is sent to. - */ - MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition', - /** - * A boolean that is true if the message is a tombstone. - */ - MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone', - /** - * A string identifying the remoting system. - */ - RPC_SYSTEM: 'rpc.system', - /** - * The full (logical) name of the service being called, including its package name, if applicable. - * - * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). - */ - RPC_SERVICE: 'rpc.service', - /** - * The name of the (logical) method being called, must be equal to the $method part in the span name. - * - * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). - */ - RPC_METHOD: 'rpc.method', - /** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - */ - RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code', - /** - * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted. - */ - RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version', - /** - * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. - */ - RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id', - /** - * `error.code` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code', - /** - * `error.message` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message', - /** - * Whether this is a received or sent message. - */ - MESSAGE_TYPE: 'message.type', - /** - * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. - * - * Note: This way we guarantee that the values will be consistent between different implementations. - */ - MESSAGE_ID: 'message.id', - /** - * Compressed size of the message in bytes. - */ - MESSAGE_COMPRESSED_SIZE: 'message.compressed_size', - /** - * Uncompressed size of the message in bytes. - */ - MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size', -}; -exports.DbSystemValues = { - /** Some other SQL database. Fallback only. See notes. */ - OTHER_SQL: 'other_sql', - /** Microsoft SQL Server. */ - MSSQL: 'mssql', - /** MySQL. */ - MYSQL: 'mysql', - /** Oracle Database. */ - ORACLE: 'oracle', - /** IBM Db2. */ - DB2: 'db2', - /** PostgreSQL. */ - POSTGRESQL: 'postgresql', - /** Amazon Redshift. */ - REDSHIFT: 'redshift', - /** Apache Hive. */ - HIVE: 'hive', - /** Cloudscape. */ - CLOUDSCAPE: 'cloudscape', - /** HyperSQL DataBase. */ - HSQLDB: 'hsqldb', - /** Progress Database. */ - PROGRESS: 'progress', - /** SAP MaxDB. */ - MAXDB: 'maxdb', - /** SAP HANA. */ - HANADB: 'hanadb', - /** Ingres. */ - INGRES: 'ingres', - /** FirstSQL. */ - FIRSTSQL: 'firstsql', - /** EnterpriseDB. */ - EDB: 'edb', - /** InterSystems Caché. */ - CACHE: 'cache', - /** Adabas (Adaptable Database System). */ - ADABAS: 'adabas', - /** Firebird. */ - FIREBIRD: 'firebird', - /** Apache Derby. */ - DERBY: 'derby', - /** FileMaker. */ - FILEMAKER: 'filemaker', - /** Informix. */ - INFORMIX: 'informix', - /** InstantDB. */ - INSTANTDB: 'instantdb', - /** InterBase. */ - INTERBASE: 'interbase', - /** MariaDB. */ - MARIADB: 'mariadb', - /** Netezza. */ - NETEZZA: 'netezza', - /** Pervasive PSQL. */ - PERVASIVE: 'pervasive', - /** PointBase. */ - POINTBASE: 'pointbase', - /** SQLite. */ - SQLITE: 'sqlite', - /** Sybase. */ - SYBASE: 'sybase', - /** Teradata. */ - TERADATA: 'teradata', - /** Vertica. */ - VERTICA: 'vertica', - /** H2. */ - H2: 'h2', - /** ColdFusion IMQ. */ - COLDFUSION: 'coldfusion', - /** Apache Cassandra. */ - CASSANDRA: 'cassandra', - /** Apache HBase. */ - HBASE: 'hbase', - /** MongoDB. */ - MONGODB: 'mongodb', - /** Redis. */ - REDIS: 'redis', - /** Couchbase. */ - COUCHBASE: 'couchbase', - /** CouchDB. */ - COUCHDB: 'couchdb', - /** Microsoft Azure Cosmos DB. */ - COSMOSDB: 'cosmosdb', - /** Amazon DynamoDB. */ - DYNAMODB: 'dynamodb', - /** Neo4j. */ - NEO4J: 'neo4j', - /** Apache Geode. */ - GEODE: 'geode', - /** Elasticsearch. */ - ELASTICSEARCH: 'elasticsearch', - /** Memcached. */ - MEMCACHED: 'memcached', - /** CockroachDB. */ - COCKROACHDB: 'cockroachdb', -}; -exports.DbCassandraConsistencyLevelValues = { - /** all. */ - ALL: 'all', - /** each_quorum. */ - EACH_QUORUM: 'each_quorum', - /** quorum. */ - QUORUM: 'quorum', - /** local_quorum. */ - LOCAL_QUORUM: 'local_quorum', - /** one. */ - ONE: 'one', - /** two. */ - TWO: 'two', - /** three. */ - THREE: 'three', - /** local_one. */ - LOCAL_ONE: 'local_one', - /** any. */ - ANY: 'any', - /** serial. */ - SERIAL: 'serial', - /** local_serial. */ - LOCAL_SERIAL: 'local_serial', -}; -exports.FaasTriggerValues = { - /** A response to some data source operation such as a database or filesystem read/write. */ - DATASOURCE: 'datasource', - /** To provide an answer to an inbound HTTP request. */ - HTTP: 'http', - /** A function is set to be executed when messages are sent to a messaging system. */ - PUBSUB: 'pubsub', - /** A function is scheduled to be executed regularly. */ - TIMER: 'timer', - /** If none of the others apply. */ - OTHER: 'other', -}; -exports.FaasDocumentOperationValues = { - /** When a new object is created. */ - INSERT: 'insert', - /** When an object is modified. */ - EDIT: 'edit', - /** When an object is deleted. */ - DELETE: 'delete', -}; -exports.FaasInvokedProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.NetTransportValues = { - /** ip_tcp. */ - IP_TCP: 'ip_tcp', - /** ip_udp. */ - IP_UDP: 'ip_udp', - /** Another IP-based protocol. */ - IP: 'ip', - /** Unix Domain socket. See below. */ - UNIX: 'unix', - /** Named or anonymous pipe. See note below. */ - PIPE: 'pipe', - /** In-process communication. */ - INPROC: 'inproc', - /** Something else (non IP-based). */ - OTHER: 'other', -}; -exports.NetHostConnectionTypeValues = { - /** wifi. */ - WIFI: 'wifi', - /** wired. */ - WIRED: 'wired', - /** cell. */ - CELL: 'cell', - /** unavailable. */ - UNAVAILABLE: 'unavailable', - /** unknown. */ - UNKNOWN: 'unknown', -}; -exports.NetHostConnectionSubtypeValues = { - /** GPRS. */ - GPRS: 'gprs', - /** EDGE. */ - EDGE: 'edge', - /** UMTS. */ - UMTS: 'umts', - /** CDMA. */ - CDMA: 'cdma', - /** EVDO Rel. 0. */ - EVDO_0: 'evdo_0', - /** EVDO Rev. A. */ - EVDO_A: 'evdo_a', - /** CDMA2000 1XRTT. */ - CDMA2000_1XRTT: 'cdma2000_1xrtt', - /** HSDPA. */ - HSDPA: 'hsdpa', - /** HSUPA. */ - HSUPA: 'hsupa', - /** HSPA. */ - HSPA: 'hspa', - /** IDEN. */ - IDEN: 'iden', - /** EVDO Rev. B. */ - EVDO_B: 'evdo_b', - /** LTE. */ - LTE: 'lte', - /** EHRPD. */ - EHRPD: 'ehrpd', - /** HSPAP. */ - HSPAP: 'hspap', - /** GSM. */ - GSM: 'gsm', - /** TD-SCDMA. */ - TD_SCDMA: 'td_scdma', - /** IWLAN. */ - IWLAN: 'iwlan', - /** 5G NR (New Radio). */ - NR: 'nr', - /** 5G NRNSA (New Radio Non-Standalone). */ - NRNSA: 'nrnsa', - /** LTE CA. */ - LTE_CA: 'lte_ca', -}; -exports.HttpFlavorValues = { - /** HTTP 1.0. */ - HTTP_1_0: '1.0', - /** HTTP 1.1. */ - HTTP_1_1: '1.1', - /** HTTP 2. */ - HTTP_2_0: '2.0', - /** SPDY protocol. */ - SPDY: 'SPDY', - /** QUIC protocol. */ - QUIC: 'QUIC', -}; -exports.MessagingDestinationKindValues = { - /** A message sent to a queue. */ - QUEUE: 'queue', - /** A message sent to a topic. */ - TOPIC: 'topic', -}; -exports.MessagingOperationValues = { - /** receive. */ - RECEIVE: 'receive', - /** process. */ - PROCESS: 'process', -}; -exports.RpcGrpcStatusCodeValues = { - /** OK. */ - OK: 0, - /** CANCELLED. */ - CANCELLED: 1, - /** UNKNOWN. */ - UNKNOWN: 2, - /** INVALID_ARGUMENT. */ - INVALID_ARGUMENT: 3, - /** DEADLINE_EXCEEDED. */ - DEADLINE_EXCEEDED: 4, - /** NOT_FOUND. */ - NOT_FOUND: 5, - /** ALREADY_EXISTS. */ - ALREADY_EXISTS: 6, - /** PERMISSION_DENIED. */ - PERMISSION_DENIED: 7, - /** RESOURCE_EXHAUSTED. */ - RESOURCE_EXHAUSTED: 8, - /** FAILED_PRECONDITION. */ - FAILED_PRECONDITION: 9, - /** ABORTED. */ - ABORTED: 10, - /** OUT_OF_RANGE. */ - OUT_OF_RANGE: 11, - /** UNIMPLEMENTED. */ - UNIMPLEMENTED: 12, - /** INTERNAL. */ - INTERNAL: 13, - /** UNAVAILABLE. */ - UNAVAILABLE: 14, - /** DATA_LOSS. */ - DATA_LOSS: 15, - /** UNAUTHENTICATED. */ - UNAUTHENTICATED: 16, -}; -exports.MessageTypeValues = { - /** sent. */ - SENT: 'SENT', - /** received. */ - RECEIVED: 'RECEIVED', -}; -//# sourceMappingURL=SemanticAttributes.js.map - -/***/ }), - -/***/ 26013: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(37732), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 35401: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toOTLPExportTraceServiceRequest = exports.toCollectorResource = exports.otlpTypes = void 0; -__exportStar(__nccwpck_require__(96437), exports); -exports.otlpTypes = __nccwpck_require__(29981); -var transform_1 = __nccwpck_require__(73128); -Object.defineProperty(exports, "toCollectorResource", ({ enumerable: true, get: function () { return transform_1.toCollectorResource; } })); -Object.defineProperty(exports, "toOTLPExportTraceServiceRequest", ({ enumerable: true, get: function () { return transform_1.toOTLPExportTraceServiceRequest; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 96437: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(90081), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 19377: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPTraceExporter = void 0; -const transform_1 = __nccwpck_require__(73128); -const core_1 = __nccwpck_require__(85797); -const otlp_exporter_base_1 = __nccwpck_require__(11363); -const otlp_exporter_base_2 = __nccwpck_require__(11363); -const DEFAULT_COLLECTOR_RESOURCE_PATH = '/v1/traces'; -const DEFAULT_COLLECTOR_URL = `http://localhost:4318${DEFAULT_COLLECTOR_RESOURCE_PATH}`; -/** - * Collector Trace Exporter for Node - */ -class OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterNodeBase { - constructor(config = {}) { - super(config); - this.headers = Object.assign(this.headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS)); - } - convert(spans) { - return (0, transform_1.toOTLPExportTraceServiceRequest)(spans, this, true); - } - getDefaultUrl(config) { - return typeof config.url === 'string' - ? config.url - : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0 - ? (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0 - ? (0, otlp_exporter_base_2.appendResourcePathToUrlIfNotPresent)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH) - : DEFAULT_COLLECTOR_URL; - } -} -exports.OTLPTraceExporter = OTLPTraceExporter; -//# sourceMappingURL=OTLPTraceExporter.js.map - -/***/ }), - -/***/ 90081: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(19377), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 73128: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.groupSpansByResourceAndLibrary = exports.toOTLPExportTraceServiceRequest = exports.toCollectorTraceState = exports.toCollectorKind = exports.toCollectorResource = exports.toCollectorStatus = exports.toCollectorSpan = exports.toCollectorEvents = exports.toCollectorAnyValue = exports.toCollectorAttributeKeyValue = exports.toCollectorKeyValueList = exports.toCollectorArrayValue = exports.toCollectorAttributes = void 0; -const core = __nccwpck_require__(85797); -const types_1 = __nccwpck_require__(29981); -const MAX_INTEGER_VALUE = 2147483647; -const MIN_INTEGER_VALUE = -2147483648; -/** - * Converts attributes to KeyValue array - * @param attributes - */ -function toCollectorAttributes(attributes) { - return Object.keys(attributes).map(key => { - return toCollectorAttributeKeyValue(key, attributes[key]); - }); -} -exports.toCollectorAttributes = toCollectorAttributes; -/** - * Converts array of unknown value to ArrayValue - * @param values - */ -function toCollectorArrayValue(values) { - return { - values: values.map(value => toCollectorAnyValue(value)), - }; -} -exports.toCollectorArrayValue = toCollectorArrayValue; -/** - * Converts attributes to KeyValueList - * @param attributes - */ -function toCollectorKeyValueList(attributes) { - return { - values: toCollectorAttributes(attributes), - }; -} -exports.toCollectorKeyValueList = toCollectorKeyValueList; -/** - * Converts key and unknown value to KeyValue - * @param value event value - */ -function toCollectorAttributeKeyValue(key, value) { - const anyValue = toCollectorAnyValue(value); - return { - key, - value: anyValue, - }; -} -exports.toCollectorAttributeKeyValue = toCollectorAttributeKeyValue; -/** - * Converts unknown value to AnyValue - * @param value - */ -function toCollectorAnyValue(value) { - const anyValue = {}; - if (typeof value === 'string') { - anyValue.stringValue = value; - } - else if (typeof value === 'boolean') { - anyValue.boolValue = value; - } - else if (typeof value === 'number' && - value <= MAX_INTEGER_VALUE && - value >= MIN_INTEGER_VALUE && - Number.isInteger(value)) { - anyValue.intValue = value; - } - else if (typeof value === 'number') { - anyValue.doubleValue = value; - } - else if (Array.isArray(value)) { - anyValue.arrayValue = toCollectorArrayValue(value); - } - else if (value) { - anyValue.kvlistValue = toCollectorKeyValueList(value); - } - return anyValue; -} -exports.toCollectorAnyValue = toCollectorAnyValue; -/** - * - * Converts events - * @param events array of events - */ -function toCollectorEvents(timedEvents) { - return timedEvents.map(timedEvent => { - const timeUnixNano = core.hrTimeToNanoseconds(timedEvent.time); - const name = timedEvent.name; - const attributes = toCollectorAttributes(timedEvent.attributes || {}); - const droppedAttributesCount = 0; - const protoEvent = { - timeUnixNano, - name, - attributes, - droppedAttributesCount, - }; - return protoEvent; - }); -} -exports.toCollectorEvents = toCollectorEvents; -/** - * Converts links - * @param span - * @param useHex - if ids should be kept as hex without converting to base64 - */ -function toCollectorLinks(span, useHex) { - return span.links.map((link) => { - const protoLink = { - traceId: useHex - ? link.context.traceId - : core.hexToBase64(link.context.traceId), - spanId: useHex - ? link.context.spanId - : core.hexToBase64(link.context.spanId), - attributes: toCollectorAttributes(link.attributes || {}), - droppedAttributesCount: 0, - }; - return protoLink; - }); -} -/** - * Converts span - * @param span - * @param useHex - if ids should be kept as hex without converting to base64 - */ -function toCollectorSpan(span, useHex) { - return { - traceId: useHex - ? span.spanContext().traceId - : core.hexToBase64(span.spanContext().traceId), - spanId: useHex - ? span.spanContext().spanId - : core.hexToBase64(span.spanContext().spanId), - parentSpanId: span.parentSpanId - ? useHex - ? span.parentSpanId - : core.hexToBase64(span.parentSpanId) - : undefined, - traceState: toCollectorTraceState(span.spanContext().traceState), - name: span.name, - kind: toCollectorKind(span.kind), - startTimeUnixNano: core.hrTimeToNanoseconds(span.startTime), - endTimeUnixNano: core.hrTimeToNanoseconds(span.endTime), - attributes: toCollectorAttributes(span.attributes), - droppedAttributesCount: 0, - events: toCollectorEvents(span.events), - droppedEventsCount: 0, - status: toCollectorStatus(span.status), - links: toCollectorLinks(span, useHex), - droppedLinksCount: 0, - }; -} -exports.toCollectorSpan = toCollectorSpan; -/** - * Converts status - * @param status - */ -function toCollectorStatus(status) { - const spanStatus = { - code: status.code, - }; - if (typeof status.message !== 'undefined') { - spanStatus.message = status.message; - } - return spanStatus; -} -exports.toCollectorStatus = toCollectorStatus; -/** - * Converts resource - * @param resource - * @param additionalAttributes - */ -function toCollectorResource(resource, additionalAttributes = {}) { - const attr = Object.assign({}, additionalAttributes, resource ? resource.attributes : {}); - const resourceProto = { - attributes: toCollectorAttributes(attr), - droppedAttributesCount: 0, - }; - return resourceProto; -} -exports.toCollectorResource = toCollectorResource; -/** - * Converts span kind - * @param kind - */ -function toCollectorKind(kind) { - const collectorKind = types_1.OTLP_SPAN_KIND_MAPPING[kind]; - return typeof collectorKind === 'number' - ? collectorKind - : types_1.opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_UNSPECIFIED; -} -exports.toCollectorKind = toCollectorKind; -/** - * Converts traceState - * @param traceState - */ -function toCollectorTraceState(traceState) { - if (!traceState) - return undefined; - return traceState.serialize(); -} -exports.toCollectorTraceState = toCollectorTraceState; -/** - * Prepares trace service request to be sent to collector - * @param spans spans - * @param collectorExporterBase - * @param useHex - if ids should be kept as hex without converting to base64 - */ -function toOTLPExportTraceServiceRequest(spans, collectorTraceExporterBase, useHex) { - const groupedSpans = groupSpansByResourceAndLibrary(spans); - const additionalAttributes = Object.assign({}, collectorTraceExporterBase.attributes); - return { - resourceSpans: toCollectorResourceSpans(groupedSpans, additionalAttributes, useHex), - }; -} -exports.toOTLPExportTraceServiceRequest = toOTLPExportTraceServiceRequest; -/** - * Takes an array of spans and groups them by resource and instrumentation - * library - * @param spans spans - */ -function groupSpansByResourceAndLibrary(spans) { - return spans.reduce((spanMap, span) => { - //group by resource - let resourceSpans = spanMap.get(span.resource); - if (!resourceSpans) { - resourceSpans = new Map(); - spanMap.set(span.resource, resourceSpans); - } - //group by instrumentation library - let libSpans = resourceSpans.get(span.instrumentationLibrary); - if (!libSpans) { - libSpans = new Array(); - resourceSpans.set(span.instrumentationLibrary, libSpans); - } - libSpans.push(span); - return spanMap; - }, new Map()); -} -exports.groupSpansByResourceAndLibrary = groupSpansByResourceAndLibrary; -/** - * Convert to InstrumentationLibrarySpans - * @param instrumentationLibrary - * @param spans - * @param useHex - if ids should be kept as hex without converting to base64 - */ -function toCollectorInstrumentationLibrarySpans(instrumentationLibrary, spans, useHex) { - return { - spans: spans.map(span => toCollectorSpan(span, useHex)), - instrumentationLibrary, - }; -} -/** - * Returns a list of resource spans which will be exported to the collector - * @param groupedSpans - * @param baseAttributes - * @param useHex - if ids should be kept as hex without converting to base64 - */ -function toCollectorResourceSpans(groupedSpans, baseAttributes, useHex) { - return Array.from(groupedSpans, ([resource, libSpans]) => { - return { - resource: toCollectorResource(resource, baseAttributes), - instrumentationLibrarySpans: Array.from(libSpans, ([instrumentationLibrary, spans]) => toCollectorInstrumentationLibrarySpans(instrumentationLibrary, spans, useHex)), - }; - }); -} -//# sourceMappingURL=transform.js.map - -/***/ }), - -/***/ 29981: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLP_SPAN_KIND_MAPPING = exports.opentelemetryProto = void 0; -const api_1 = __nccwpck_require__(65163); -/* eslint-disable @typescript-eslint/no-namespace */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -var opentelemetryProto; -(function (opentelemetryProto) { - let metrics; - (function (metrics) { - let v1; - (function (v1) { - let AggregationTemporality; - (function (AggregationTemporality) { - // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. - AggregationTemporality[AggregationTemporality["AGGREGATION_TEMPORALITY_UNSPECIFIED"] = 0] = "AGGREGATION_TEMPORALITY_UNSPECIFIED"; - // DELTA is an AggregationTemporality for a metric aggregator which reports - // changes since last report time. Successive metrics contain aggregation of - // values from continuous and non-overlapping intervals. - // - // The values for a DELTA metric are based only on the time interval - // associated with one measurement cycle. There is no dependency on - // previous measurements like is the case for CUMULATIVE metrics. - // - // For example, consider a system measuring the number of requests that - // it receives and reports the sum of these requests every second as a - // DELTA metric: - // - // 1. The system starts receiving at time=t_0. - // 2. A request is received, the system measures 1 request. - // 3. A request is received, the system measures 1 request. - // 4. A request is received, the system measures 1 request. - // 5. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+1 with a value of 3. - // 6. A request is received, the system measures 1 request. - // 7. A request is received, the system measures 1 request. - // 8. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0+1 to - // t_0+2 with a value of 2. - AggregationTemporality[AggregationTemporality["AGGREGATION_TEMPORALITY_DELTA"] = 1] = "AGGREGATION_TEMPORALITY_DELTA"; - // CUMULATIVE is an AggregationTemporality for a metric aggregator which - // reports changes since a fixed start time. This means that current values - // of a CUMULATIVE metric depend on all previous measurements since the - // start time. Because of this, the sender is required to retain this state - // in some form. If this state is lost or invalidated, the CUMULATIVE metric - // values MUST be reset and a new fixed start time following the last - // reported measurement time sent MUST be used. - // - // For example, consider a system measuring the number of requests that - // it receives and reports the sum of these requests every second as a - // CUMULATIVE metric: - // - // 1. The system starts receiving at time=t_0. - // 2. A request is received, the system measures 1 request. - // 3. A request is received, the system measures 1 request. - // 4. A request is received, the system measures 1 request. - // 5. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+1 with a value of 3. - // 6. A request is received, the system measures 1 request. - // 7. A request is received, the system measures 1 request. - // 8. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+2 with a value of 5. - // 9. The system experiences a fault and loses state. - // 10. The system recovers and resumes receiving at time=t_1. - // 11. A request is received, the system measures 1 request. - // 12. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_1 to - // t_0+1 with a value of 1. - // - // Note: Even though, when reporting changes since last report time, using - // CUMULATIVE is valid, it is not recommended. This may cause problems for - // systems that do not use start_time to determine when the aggregation - // value was reset (e.g. Prometheus). - AggregationTemporality[AggregationTemporality["AGGREGATION_TEMPORALITY_CUMULATIVE"] = 2] = "AGGREGATION_TEMPORALITY_CUMULATIVE"; - })(AggregationTemporality = v1.AggregationTemporality || (v1.AggregationTemporality = {})); - })(v1 = metrics.v1 || (metrics.v1 = {})); - })(metrics = opentelemetryProto.metrics || (opentelemetryProto.metrics = {})); - let trace; - (function (trace) { - let v1; - (function (v1) { - let ConstantSampler; - (function (ConstantSampler) { - let ConstantDecision; - (function (ConstantDecision) { - ConstantDecision[ConstantDecision["ALWAYS_OFF"] = 0] = "ALWAYS_OFF"; - ConstantDecision[ConstantDecision["ALWAYS_ON"] = 1] = "ALWAYS_ON"; - ConstantDecision[ConstantDecision["ALWAYS_PARENT"] = 2] = "ALWAYS_PARENT"; - })(ConstantDecision = ConstantSampler.ConstantDecision || (ConstantSampler.ConstantDecision = {})); - })(ConstantSampler = v1.ConstantSampler || (v1.ConstantSampler = {})); - let Span; - (function (Span) { - // eslint-disable-next-line @typescript-eslint/no-shadow - let SpanKind; - (function (SpanKind) { - SpanKind[SpanKind["SPAN_KIND_UNSPECIFIED"] = 0] = "SPAN_KIND_UNSPECIFIED"; - SpanKind[SpanKind["SPAN_KIND_INTERNAL"] = 1] = "SPAN_KIND_INTERNAL"; - SpanKind[SpanKind["SPAN_KIND_SERVER"] = 2] = "SPAN_KIND_SERVER"; - SpanKind[SpanKind["SPAN_KIND_CLIENT"] = 3] = "SPAN_KIND_CLIENT"; - SpanKind[SpanKind["SPAN_KIND_PRODUCER"] = 4] = "SPAN_KIND_PRODUCER"; - SpanKind[SpanKind["SPAN_KIND_CONSUMER"] = 5] = "SPAN_KIND_CONSUMER"; - })(SpanKind = Span.SpanKind || (Span.SpanKind = {})); - })(Span = v1.Span || (v1.Span = {})); - })(v1 = trace.v1 || (trace.v1 = {})); - })(trace = opentelemetryProto.trace || (opentelemetryProto.trace = {})); - let common; - (function (common) { - let v1; - (function (v1) { - let ValueType; - (function (ValueType) { - ValueType[ValueType["STRING"] = 0] = "STRING"; - ValueType[ValueType["INT"] = 1] = "INT"; - ValueType[ValueType["DOUBLE"] = 2] = "DOUBLE"; - ValueType[ValueType["BOOL"] = 3] = "BOOL"; - })(ValueType = v1.ValueType || (v1.ValueType = {})); - })(v1 = common.v1 || (common.v1 = {})); - })(common = opentelemetryProto.common || (opentelemetryProto.common = {})); -})(opentelemetryProto = exports.opentelemetryProto || (exports.opentelemetryProto = {})); -/** - * Mapping between api SpanKind and proto SpanKind - */ -exports.OTLP_SPAN_KIND_MAPPING = { - [api_1.SpanKind.INTERNAL]: opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_INTERNAL, - [api_1.SpanKind.SERVER]: opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_SERVER, - [api_1.SpanKind.CLIENT]: opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_CLIENT, - [api_1.SpanKind.PRODUCER]: opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_PRODUCER, - [api_1.SpanKind.CONSUMER]: opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_CONSUMER, -}; -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 99249: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExportResultCode = void 0; -var ExportResultCode; -(function (ExportResultCode) { - ExportResultCode[ExportResultCode["SUCCESS"] = 0] = "SUCCESS"; - ExportResultCode[ExportResultCode["FAILED"] = 1] = "FAILED"; -})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {})); -//# sourceMappingURL=ExportResult.js.map - -/***/ }), - -/***/ 6831: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0; -exports.BAGGAGE_KEY_PAIR_SEPARATOR = '='; -exports.BAGGAGE_PROPERTIES_SEPARATOR = ';'; -exports.BAGGAGE_ITEMS_SEPARATOR = ','; -// Name of the http header used to propagate the baggage -exports.BAGGAGE_HEADER = 'baggage'; -// Maximum number of name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180; -// Maximum number of bytes per a single name-value pair allowed by w3c spec -exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096; -// Maximum total length of all name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 36283: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CBaggagePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(91124); -const constants_1 = __nccwpck_require__(6831); -const utils_1 = __nccwpck_require__(30889); -/** - * Propagates {@link Baggage} through Context format propagation. - * - * Based on the Baggage specification: - * https://w3c.github.io/baggage/ - */ -class W3CBaggagePropagator { - inject(context, carrier, setter) { - const baggage = api_1.propagation.getBaggage(context); - if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context)) - return; - const keyPairs = (0, utils_1.getKeyPairs)(baggage) - .filter((pair) => { - return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS; - }) - .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS); - const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs); - if (headerValue.length > 0) { - setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue); - } - } - extract(context, carrier, getter) { - const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER); - const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue; - if (!baggageString) - return context; - const baggage = {}; - if (baggageString.length === 0) { - return context; - } - const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR); - pairs.forEach(entry => { - const keyPair = (0, utils_1.parsePairKeyValue)(entry); - if (keyPair) { - const baggageEntry = { value: keyPair.value }; - if (keyPair.metadata) { - baggageEntry.metadata = keyPair.metadata; - } - baggage[keyPair.key] = baggageEntry; - } - }); - if (Object.entries(baggage).length === 0) { - return context; - } - return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage)); - } - fields() { - return [constants_1.BAGGAGE_HEADER]; - } -} -exports.W3CBaggagePropagator = W3CBaggagePropagator; -//# sourceMappingURL=W3CBaggagePropagator.js.map - -/***/ }), - -/***/ 30889: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const api_1 = __nccwpck_require__(65163); -const constants_1 = __nccwpck_require__(6831); -function serializeKeyPairs(keyPairs) { - return keyPairs.reduce((hValue, current) => { - const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`; - return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value; - }, ''); -} -exports.serializeKeyPairs = serializeKeyPairs; -function getKeyPairs(baggage) { - return baggage.getAllEntries().map(([key, value]) => { - let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`; - // include opaque metadata if provided - // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation - if (value.metadata !== undefined) { - entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString(); - } - return entry; - }); -} -exports.getKeyPairs = getKeyPairs; -function parsePairKeyValue(entry) { - const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR); - if (valueProps.length <= 0) - return; - const keyPairPart = valueProps.shift(); - if (!keyPairPart) - return; - const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR); - if (keyPair.length !== 2) - return; - const key = decodeURIComponent(keyPair[0].trim()); - const value = decodeURIComponent(keyPair[1].trim()); - let metadata; - if (valueProps.length > 0) { - metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR)); - } - return { key, value, metadata }; -} -exports.parsePairKeyValue = parsePairKeyValue; -/** - * Parse a string serialized in the baggage HTTP Format (without metadata): - * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md - */ -function parseKeyPairsIntoRecord(value) { - if (typeof value !== 'string' || value.length === 0) - return {}; - return value - .split(constants_1.BAGGAGE_ITEMS_SEPARATOR) - .map(entry => { - return parsePairKeyValue(entry); - }) - .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0) - .reduce((headers, keyPair) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - headers[keyPair.key] = keyPair.value; - return headers; - }, {}); -} -exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 29790: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0; -const api_1 = __nccwpck_require__(65163); -function sanitizeAttributes(attributes) { - const out = {}; - if (typeof attributes !== 'object' || attributes == null) { - return out; - } - for (const [key, val] of Object.entries(attributes)) { - if (!isAttributeKey(key)) { - api_1.diag.warn(`Invalid attribute key: ${key}`); - continue; - } - if (!isAttributeValue(val)) { - api_1.diag.warn(`Invalid attribute value set for key: ${key}`); - continue; - } - if (Array.isArray(val)) { - out[key] = val.slice(); - } - else { - out[key] = val; - } - } - return out; -} -exports.sanitizeAttributes = sanitizeAttributes; -function isAttributeKey(key) { - return typeof key === 'string' && key.length > 0; -} -exports.isAttributeKey = isAttributeKey; -function isAttributeValue(val) { - if (val == null) { - return true; - } - if (Array.isArray(val)) { - return isHomogeneousAttributeValueArray(val); - } - return isValidPrimitiveAttributeValue(val); -} -exports.isAttributeValue = isAttributeValue; -function isHomogeneousAttributeValueArray(arr) { - let type; - for (const element of arr) { - // null/undefined elements are allowed - if (element == null) - continue; - if (!type) { - if (isValidPrimitiveAttributeValue(element)) { - type = typeof element; - continue; - } - // encountered an invalid primitive - return false; - } - if (typeof element === type) { - continue; - } - return false; - } - return true; -} -function isValidPrimitiveAttributeValue(val) { - switch (typeof val) { - case 'number': - case 'boolean': - case 'string': - return true; - } - return false; -} -//# sourceMappingURL=attributes.js.map - -/***/ }), - -/***/ 47111: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.globalErrorHandler = exports.setGlobalErrorHandler = void 0; -const logging_error_handler_1 = __nccwpck_require__(86792); -/** The global error handler delegate */ -let delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)(); -/** - * Set the global error handler - * @param {ErrorHandler} handler - */ -function setGlobalErrorHandler(handler) { - delegateHandler = handler; -} -exports.setGlobalErrorHandler = setGlobalErrorHandler; -/** - * Return the global error handler - * @param {Exception} ex - */ -function globalErrorHandler(ex) { - try { - delegateHandler(ex); - } - catch (_a) { } // eslint-disable-line no-empty -} -exports.globalErrorHandler = globalErrorHandler; -//# sourceMappingURL=global-error-handler.js.map - -/***/ }), - -/***/ 86792: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.loggingErrorHandler = void 0; -const api_1 = __nccwpck_require__(65163); -/** - * Returns a function that logs an error using the provided logger, or a - * console logger if one was not provided. - */ -function loggingErrorHandler() { - return (ex) => { - api_1.diag.error(stringifyException(ex)); - }; -} -exports.loggingErrorHandler = loggingErrorHandler; -/** - * Converts an exception into a string representation - * @param {Exception} ex - */ -function stringifyException(ex) { - if (typeof ex === 'string') { - return ex; - } - else { - return JSON.stringify(flattenException(ex)); - } -} -/** - * Flattens an exception into key-value pairs by traversing the prototype chain - * and coercing values to strings. Duplicate properties will not be overwritten; - * the first insert wins. - */ -function flattenException(ex) { - const result = {}; - let current = ex; - while (current !== null) { - Object.getOwnPropertyNames(current).forEach(propertyName => { - if (result[propertyName]) - return; - const value = current[propertyName]; - if (value) { - result[propertyName] = String(value); - } - }); - current = Object.getPrototypeOf(current); - } - return result; -} -//# sourceMappingURL=logging-error-handler.js.map - -/***/ }), - -/***/ 25202: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0; -const platform_1 = __nccwpck_require__(75054); -const NANOSECOND_DIGITS = 9; -const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS); -/** - * Converts a number to HrTime, HrTime = [number, number]. - * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. - * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. - * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. - * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds: - * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. - * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: - * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000. - * This is represented in HrTime format as [1609504210, 150000000]. - * @param epochMillis - */ -function numberToHrtime(epochMillis) { - const epochSeconds = epochMillis / 1000; - // Decimals only. - const seconds = Math.trunc(epochSeconds); - // Round sub-nanosecond accuracy to nanosecond. - const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) * - SECOND_TO_NANOSECONDS; - return [seconds, nanos]; -} -function getTimeOrigin() { - let timeOrigin = platform_1.otperformance.timeOrigin; - if (typeof timeOrigin !== 'number') { - const perf = platform_1.otperformance; - timeOrigin = perf.timing && perf.timing.fetchStart; - } - return timeOrigin; -} -/** - * Returns an hrtime calculated via performance component. - * @param performanceNow - */ -function hrTime(performanceNow) { - const timeOrigin = numberToHrtime(getTimeOrigin()); - const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now()); - let seconds = timeOrigin[0] + now[0]; - let nanos = timeOrigin[1] + now[1]; - // Nanoseconds - if (nanos > SECOND_TO_NANOSECONDS) { - nanos -= SECOND_TO_NANOSECONDS; - seconds += 1; - } - return [seconds, nanos]; -} -exports.hrTime = hrTime; -/** - * - * Converts a TimeInput to an HrTime, defaults to _hrtime(). - * @param time - */ -function timeInputToHrTime(time) { - // process.hrtime - if (isTimeInputHrTime(time)) { - return time; - } - else if (typeof time === 'number') { - // Must be a performance.now() if it's smaller than process start time. - if (time < getTimeOrigin()) { - return hrTime(time); - } - else { - // epoch milliseconds or performance.timeOrigin - return numberToHrtime(time); - } - } - else if (time instanceof Date) { - return numberToHrtime(time.getTime()); - } - else { - throw TypeError('Invalid input type'); - } -} -exports.timeInputToHrTime = timeInputToHrTime; -/** - * Returns a duration of two hrTime. - * @param startTime - * @param endTime - */ -function hrTimeDuration(startTime, endTime) { - let seconds = endTime[0] - startTime[0]; - let nanos = endTime[1] - startTime[1]; - // overflow - if (nanos < 0) { - seconds -= 1; - // negate - nanos += SECOND_TO_NANOSECONDS; - } - return [seconds, nanos]; -} -exports.hrTimeDuration = hrTimeDuration; -/** - * Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z" - * @param time - */ -function hrTimeToTimeStamp(time) { - const precision = NANOSECOND_DIGITS; - const tmp = `${'0'.repeat(precision)}${time[1]}Z`; - const nanoString = tmp.substr(tmp.length - precision - 1); - const date = new Date(time[0] * 1000).toISOString(); - return date.replace('000Z', nanoString); -} -exports.hrTimeToTimeStamp = hrTimeToTimeStamp; -/** - * Convert hrTime to nanoseconds. - * @param time - */ -function hrTimeToNanoseconds(time) { - return time[0] * SECOND_TO_NANOSECONDS + time[1]; -} -exports.hrTimeToNanoseconds = hrTimeToNanoseconds; -/** - * Convert hrTime to milliseconds. - * @param time - */ -function hrTimeToMilliseconds(time) { - return Math.round(time[0] * 1e3 + time[1] / 1e6); -} -exports.hrTimeToMilliseconds = hrTimeToMilliseconds; -/** - * Convert hrTime to microseconds. - * @param time - */ -function hrTimeToMicroseconds(time) { - return Math.round(time[0] * 1e6 + time[1] / 1e3); -} -exports.hrTimeToMicroseconds = hrTimeToMicroseconds; -/** - * check if time is HrTime - * @param value - */ -function isTimeInputHrTime(value) { - return (Array.isArray(value) && - value.length === 2 && - typeof value[0] === 'number' && - typeof value[1] === 'number'); -} -exports.isTimeInputHrTime = isTimeInputHrTime; -/** - * check if input value is a correct types.TimeInput - * @param value - */ -function isTimeInput(value) { - return (isTimeInputHrTime(value) || - typeof value === 'number' || - value instanceof Date); -} -exports.isTimeInput = isTimeInput; -//# sourceMappingURL=time.js.map - -/***/ }), - -/***/ 79180: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 85797: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.baggageUtils = void 0; -__exportStar(__nccwpck_require__(36283), exports); -__exportStar(__nccwpck_require__(29790), exports); -__exportStar(__nccwpck_require__(47111), exports); -__exportStar(__nccwpck_require__(86792), exports); -__exportStar(__nccwpck_require__(25202), exports); -__exportStar(__nccwpck_require__(79180), exports); -__exportStar(__nccwpck_require__(99249), exports); -__exportStar(__nccwpck_require__(77129), exports); -exports.baggageUtils = __nccwpck_require__(30889); -__exportStar(__nccwpck_require__(75054), exports); -__exportStar(__nccwpck_require__(15382), exports); -__exportStar(__nccwpck_require__(99320), exports); -__exportStar(__nccwpck_require__(28882), exports); -__exportStar(__nccwpck_require__(82765), exports); -__exportStar(__nccwpck_require__(14218), exports); -__exportStar(__nccwpck_require__(62233), exports); -__exportStar(__nccwpck_require__(89054), exports); -__exportStar(__nccwpck_require__(76168), exports); -__exportStar(__nccwpck_require__(91124), exports); -__exportStar(__nccwpck_require__(47364), exports); -__exportStar(__nccwpck_require__(31331), exports); -__exportStar(__nccwpck_require__(1502), exports); -__exportStar(__nccwpck_require__(95803), exports); -__exportStar(__nccwpck_require__(59747), exports); -__exportStar(__nccwpck_require__(65071), exports); -__exportStar(__nccwpck_require__(11915), exports); -__exportStar(__nccwpck_require__(77129), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 64895: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateValue = exports.validateKey = void 0; -const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; -const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; -const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; -const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); -const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; -/** - * Key is opaque string up to 256 characters printable. It MUST begin with a - * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, - * underscores _, dashes -, asterisks *, and forward slashes /. - * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the - * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. - * see https://www.w3.org/TR/trace-context/#key - */ -function validateKey(key) { - return VALID_KEY_REGEX.test(key); -} -exports.validateKey = validateKey; -/** - * Value is opaque string up to 256 characters printable ASCII RFC0020 - * characters (i.e., the range 0x20 to 0x7E) except comma , and =. - */ -function validateValue(value) { - return (VALID_VALUE_BASE_REGEX.test(value) && - !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); -} -exports.validateValue = validateValue; -//# sourceMappingURL=validators.js.map - -/***/ }), - -/***/ 75054: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(88331), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 52295: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RandomIdGenerator = void 0; -const SPAN_ID_BYTES = 8; -const TRACE_ID_BYTES = 16; -class RandomIdGenerator { - constructor() { - /** - * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex - * characters corresponding to 128 bits. - */ - this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); - /** - * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex - * characters corresponding to 64 bits. - */ - this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); - } -} -exports.RandomIdGenerator = RandomIdGenerator; -const SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); -function getIdGenerator(bytes) { - return function generateId() { - for (let i = 0; i < bytes / 4; i++) { - // unsigned right shift drops decimal part of the number - // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE - SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4); - } - // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated - for (let i = 0; i < bytes; i++) { - if (SHARED_BUFFER[i] > 0) { - break; - } - else if (i === bytes - 1) { - SHARED_BUFFER[bytes - 1] = 1; - } - } - return SHARED_BUFFER.toString('hex', 0, bytes); - }; -} -//# sourceMappingURL=RandomIdGenerator.js.map - -/***/ }), - -/***/ 73810: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEnv = void 0; -const os = __nccwpck_require__(22037); -const environment_1 = __nccwpck_require__(31331); -/** - * Gets the environment variables - */ -function getEnv() { - const processEnv = (0, environment_1.parseEnvironment)(process.env); - return Object.assign({ - HOSTNAME: os.hostname(), - }, environment_1.DEFAULT_ENVIRONMENT, processEnv); -} -exports.getEnv = getEnv; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 19232: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._globalThis = void 0; -/** only globals that common to node and browsers are allowed */ -// eslint-disable-next-line node/no-unsupported-features/es-builtins -exports._globalThis = typeof globalThis === 'object' ? globalThis : global; -//# sourceMappingURL=globalThis.js.map - -/***/ }), - -/***/ 29788: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hexToBase64 = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function hexToBase64(hexStr) { - const hexStrLen = hexStr.length; - let hexAsciiCharsStr = ''; - for (let i = 0; i < hexStrLen; i += 2) { - const hexPair = hexStr.substring(i, i + 2); - const hexVal = parseInt(hexPair, 16); - hexAsciiCharsStr += String.fromCharCode(hexVal); - } - return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64'); -} -exports.hexToBase64 = hexToBase64; -//# sourceMappingURL=hex-to-base64.js.map - -/***/ }), - -/***/ 88331: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(73810), exports); -__exportStar(__nccwpck_require__(19232), exports); -__exportStar(__nccwpck_require__(29788), exports); -__exportStar(__nccwpck_require__(52295), exports); -__exportStar(__nccwpck_require__(4393), exports); -__exportStar(__nccwpck_require__(9292), exports); -__exportStar(__nccwpck_require__(63450), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 4393: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.otperformance = void 0; -const perf_hooks_1 = __nccwpck_require__(4074); -exports.otperformance = perf_hooks_1.performance; -//# sourceMappingURL=performance.js.map - -/***/ }), - -/***/ 9292: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SDK_INFO = void 0; -const version_1 = __nccwpck_require__(77129); -const semantic_conventions_1 = __nccwpck_require__(22039); -/** Constants describing the SDK in use */ -exports.SDK_INFO = { - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node', - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS, - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION, -}; -//# sourceMappingURL=sdk-info.js.map - -/***/ }), - -/***/ 63450: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unrefTimer = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function unrefTimer(timer) { - timer.unref(); -} -exports.unrefTimer = unrefTimer; -//# sourceMappingURL=timer-util.js.map - -/***/ }), - -/***/ 15382: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CompositePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -/** Combines multiple propagators into a single propagator. */ -class CompositePropagator { - /** - * Construct a composite propagator from a list of propagators. - * - * @param [config] Configuration object for composite propagator - */ - constructor(config = {}) { - var _a; - this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : []; - this._fields = Array.from(new Set(this._propagators - // older propagators may not have fields function, null check to be sure - .map(p => (typeof p.fields === 'function' ? p.fields() : [])) - .reduce((x, y) => x.concat(y), []))); - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same carrier key, the propagator later in the list - * will "win". - * - * @param context Context to inject - * @param carrier Carrier into which context will be injected - */ - inject(context, carrier, setter) { - for (const propagator of this._propagators) { - try { - propagator.inject(context, carrier, setter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - } - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same context key, the propagator later in the list - * will "win". - * - * @param context Context to add values to - * @param carrier Carrier from which to extract context - */ - extract(context, carrier, getter) { - return this._propagators.reduce((ctx, propagator) => { - try { - return propagator.extract(ctx, carrier, getter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - return ctx; - }, context); - } - fields() { - // return a new array so our fields cannot be modified - return this._fields.slice(); - } -} -exports.CompositePropagator = CompositePropagator; -//# sourceMappingURL=composite.js.map - -/***/ }), - -/***/ 28882: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=IdGenerator.js.map - -/***/ }), - -/***/ 47364: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceState = void 0; -const validators_1 = __nccwpck_require__(64895); -const MAX_TRACE_STATE_ITEMS = 32; -const MAX_TRACE_STATE_LEN = 512; -const LIST_MEMBERS_SEPARATOR = ','; -const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; -/** - * TraceState must be a class and not a simple object type because of the spec - * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). - * - * Here is the list of allowed mutations: - * - New key-value pair should be added into the beginning of the list - * - The value of any key can be updated. Modified keys MUST be moved to the - * beginning of the list. - */ -class TraceState { - constructor(rawTraceState) { - this._internalState = new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - set(key, value) { - // TODO: Benchmark the different approaches(map vs list) and - // use the faster one. - const traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); - } - traceState._internalState.set(key, value); - return traceState; - } - unset(key) { - const traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - } - get(key) { - return this._internalState.get(key); - } - serialize() { - return this._keys() - .reduce((agg, key) => { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); - return agg; - }, []) - .join(LIST_MEMBERS_SEPARATOR); - } - _parse(rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN) - return; - this._internalState = rawTraceState - .split(LIST_MEMBERS_SEPARATOR) - .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning - .reduce((agg, part) => { - const listMember = part.trim(); // Optional Whitespace (OWS) handling - const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); - if (i !== -1) { - const key = listMember.slice(0, i); - const value = listMember.slice(i + 1, part.length); - if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) { - agg.set(key, value); - } - else { - // TODO: Consider to add warning log - } - } - return agg; - }, new Map()); - // Because of the reverse() requirement, trunc must be done after map is created - if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { - this._internalState = new Map(Array.from(this._internalState.entries()) - .reverse() // Use reverse same as original tracestate parse chain - .slice(0, MAX_TRACE_STATE_ITEMS)); - } - } - _keys() { - return Array.from(this._internalState.keys()).reverse(); - } - _clone() { - const traceState = new TraceState(); - traceState._internalState = new Map(this._internalState); - return traceState; - } -} -exports.TraceState = TraceState; -//# sourceMappingURL=TraceState.js.map - -/***/ }), - -/***/ 99320: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(91124); -const TraceState_1 = __nccwpck_require__(47364); -exports.TRACE_PARENT_HEADER = 'traceparent'; -exports.TRACE_STATE_HEADER = 'tracestate'; -const VERSION = '00'; -const VERSION_PART = '(?!ff)[\\da-f]{2}'; -const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}'; -const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}'; -const FLAGS_PART = '[\\da-f]{2}'; -const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`); -/** - * Parses information from the [traceparent] span tag and converts it into {@link SpanContext} - * @param traceParent - A meta property that comes from server. - * It should be dynamically generated server side to have the server's request trace Id, - * a parent span Id that was set on the server's request span, - * and the trace flags to indicate the server's sampling decision - * (01 = sampled, 00 = not sampled). - * for example: '{version}-{traceId}-{spanId}-{sampleDecision}' - * For more information see {@link https://www.w3.org/TR/trace-context/} - */ -function parseTraceParent(traceParent) { - const match = TRACE_PARENT_REGEX.exec(traceParent); - if (!match) - return null; - // According to the specification the implementation should be compatible - // with future versions. If there are more parts, we only reject it if it's using version 00 - // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent - if (match[1] === '00' && match[5]) - return null; - return { - traceId: match[2], - spanId: match[3], - traceFlags: parseInt(match[4], 16), - }; -} -exports.parseTraceParent = parseTraceParent; -/** - * Propagates {@link SpanContext} through Trace Context format propagation. - * - * Based on the Trace Context specification: - * https://www.w3.org/TR/trace-context/ - */ -class W3CTraceContextPropagator { - inject(context, carrier, setter) { - const spanContext = api_1.trace.getSpanContext(context); - if (!spanContext || - (0, suppress_tracing_1.isTracingSuppressed)(context) || - !(0, api_1.isSpanContextValid)(spanContext)) - return; - const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`; - setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent); - if (spanContext.traceState) { - setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize()); - } - } - extract(context, carrier, getter) { - const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER); - if (!traceParentHeader) - return context; - const traceParent = Array.isArray(traceParentHeader) - ? traceParentHeader[0] - : traceParentHeader; - if (typeof traceParent !== 'string') - return context; - const spanContext = parseTraceParent(traceParent); - if (!spanContext) - return context; - spanContext.isRemote = true; - const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER); - if (traceStateHeader) { - // If more than one `tracestate` header is found, we merge them into a - // single header. - const state = Array.isArray(traceStateHeader) - ? traceStateHeader.join(',') - : traceStateHeader; - spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined); - } - return api_1.trace.setSpanContext(context, spanContext); - } - fields() { - return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER]; - } -} -exports.W3CTraceContextPropagator = W3CTraceContextPropagator; -//# sourceMappingURL=W3CTraceContextPropagator.js.map - -/***/ }), - -/***/ 82765: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0; -const api_1 = __nccwpck_require__(65163); -const RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA'); -var RPCType; -(function (RPCType) { - RPCType["HTTP"] = "http"; -})(RPCType = exports.RPCType || (exports.RPCType = {})); -function setRPCMetadata(context, meta) { - return context.setValue(RPC_METADATA_KEY, meta); -} -exports.setRPCMetadata = setRPCMetadata; -function deleteRPCMetadata(context) { - return context.deleteValue(RPC_METADATA_KEY); -} -exports.deleteRPCMetadata = deleteRPCMetadata; -function getRPCMetadata(context) { - return context.getValue(RPC_METADATA_KEY); -} -exports.getRPCMetadata = getRPCMetadata; -//# sourceMappingURL=rpc-metadata.js.map - -/***/ }), - -/***/ 14218: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOffSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples no traces. */ -class AlwaysOffSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.NOT_RECORD, - }; - } - toString() { - return 'AlwaysOffSampler'; - } -} -exports.AlwaysOffSampler = AlwaysOffSampler; -//# sourceMappingURL=AlwaysOffSampler.js.map - -/***/ }), - -/***/ 62233: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOnSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples all traces. */ -class AlwaysOnSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.RECORD_AND_SAMPLED, - }; - } - toString() { - return 'AlwaysOnSampler'; - } -} -exports.AlwaysOnSampler = AlwaysOnSampler; -//# sourceMappingURL=AlwaysOnSampler.js.map - -/***/ }), - -/***/ 89054: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ParentBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -const global_error_handler_1 = __nccwpck_require__(47111); -const AlwaysOffSampler_1 = __nccwpck_require__(14218); -const AlwaysOnSampler_1 = __nccwpck_require__(62233); -/** - * A composite sampler that either respects the parent span's sampling decision - * or delegates to `delegateSampler` for root spans. - */ -class ParentBasedSampler { - constructor(config) { - var _a, _b, _c, _d; - this._root = config.root; - if (!this._root) { - (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured')); - this._root = new AlwaysOnSampler_1.AlwaysOnSampler(); - } - this._remoteParentSampled = - (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._remoteParentNotSampled = - (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler(); - this._localParentSampled = - (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._localParentNotSampled = - (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler(); - } - shouldSample(context, traceId, spanName, spanKind, attributes, links) { - const parentContext = api_1.trace.getSpanContext(context); - if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) { - return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.isRemote) { - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - toString() { - return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`; - } -} -exports.ParentBasedSampler = ParentBasedSampler; -//# sourceMappingURL=ParentBasedSampler.js.map - -/***/ }), - -/***/ 76168: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceIdRatioBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples a given fraction of traces based of trace id deterministically. */ -class TraceIdRatioBasedSampler { - constructor(_ratio = 0) { - this._ratio = _ratio; - this._ratio = this._normalize(_ratio); - this._upperBound = Math.floor(this._ratio * 0xffffffff); - } - shouldSample(context, traceId) { - return { - decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound - ? api_1.SamplingDecision.RECORD_AND_SAMPLED - : api_1.SamplingDecision.NOT_RECORD, - }; - } - toString() { - return `TraceIdRatioBased{${this._ratio}}`; - } - _normalize(ratio) { - if (typeof ratio !== 'number' || isNaN(ratio)) - return 0; - return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; - } - _accumulate(traceId) { - let accumulation = 0; - for (let i = 0; i < traceId.length / 8; i++) { - const pos = i * 8; - const part = parseInt(traceId.slice(pos, pos + 8), 16); - accumulation = (accumulation ^ part) >>> 0; - } - return accumulation; - } -} -exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; -//# sourceMappingURL=TraceIdRatioBasedSampler.js.map - -/***/ }), - -/***/ 91124: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0; -const api_1 = __nccwpck_require__(65163); -const SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING'); -function suppressTracing(context) { - return context.setValue(SUPPRESS_TRACING_KEY, true); -} -exports.suppressTracing = suppressTracing; -function unsuppressTracing(context) { - return context.deleteValue(SUPPRESS_TRACING_KEY); -} -exports.unsuppressTracing = unsuppressTracing; -function isTracingSuppressed(context) { - return context.getValue(SUPPRESS_TRACING_KEY) === true; -} -exports.isTracingSuppressed = isTracingSuppressed; -//# sourceMappingURL=suppress-tracing.js.map - -/***/ }), - -/***/ 11915: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BindOnceFuture = void 0; -const promise_1 = __nccwpck_require__(84137); -/** - * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked. - */ -class BindOnceFuture { - constructor(_callback, _that) { - this._callback = _callback; - this._that = _that; - this._isCalled = false; - this._deferred = new promise_1.Deferred(); - } - get isCalled() { - return this._isCalled; - } - get promise() { - return this._deferred.promise; - } - call(...args) { - if (!this._isCalled) { - this._isCalled = true; - try { - Promise.resolve(this._callback.call(this._that, ...args)) - .then(val => this._deferred.resolve(val), err => this._deferred.reject(err)); - } - catch (err) { - this._deferred.reject(err); - } - } - return this._deferred.promise; - } -} -exports.BindOnceFuture = BindOnceFuture; -//# sourceMappingURL=callback.js.map - -/***/ }), - -/***/ 31331: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0; -const api_1 = __nccwpck_require__(65163); -const sampling_1 = __nccwpck_require__(95803); -const DEFAULT_LIST_SEPARATOR = ','; -/** - * Environment interface to define all names - */ -const ENVIRONMENT_NUMBERS_KEYS = [ - 'OTEL_BSP_EXPORT_TIMEOUT', - 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE', - 'OTEL_BSP_MAX_QUEUE_SIZE', - 'OTEL_BSP_SCHEDULE_DELAY', - 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_EVENT_COUNT_LIMIT', - 'OTEL_SPAN_LINK_COUNT_LIMIT', - 'OTEL_EXPORTER_JAEGER_AGENT_PORT', -]; -function isEnvVarANumber(key) { - return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1); -} -const ENVIRONMENT_LISTS_KEYS = [ - 'OTEL_NO_PATCH_MODULES', - 'OTEL_PROPAGATORS', -]; -function isEnvVarAList(key) { - return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1; -} -exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity; -exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128; -/** - * Default environment variables - */ -exports.DEFAULT_ENVIRONMENT = { - CONTAINER_NAME: '', - ECS_CONTAINER_METADATA_URI_V4: '', - ECS_CONTAINER_METADATA_URI: '', - HOSTNAME: '', - KUBERNETES_SERVICE_HOST: '', - NAMESPACE: '', - OTEL_BSP_EXPORT_TIMEOUT: 30000, - OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512, - OTEL_BSP_MAX_QUEUE_SIZE: 2048, - OTEL_BSP_SCHEDULE_DELAY: 5000, - OTEL_EXPORTER_JAEGER_AGENT_HOST: '', - OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832, - OTEL_EXPORTER_JAEGER_ENDPOINT: '', - OTEL_EXPORTER_JAEGER_PASSWORD: '', - OTEL_EXPORTER_JAEGER_USER: '', - OTEL_EXPORTER_OTLP_ENDPOINT: '', - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '', - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '', - OTEL_EXPORTER_OTLP_HEADERS: '', - OTEL_EXPORTER_OTLP_TRACES_HEADERS: '', - OTEL_EXPORTER_OTLP_METRICS_HEADERS: '', - OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans', - OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO, - OTEL_NO_PATCH_MODULES: [], - OTEL_PROPAGATORS: ['tracecontext', 'baggage'], - OTEL_RESOURCE_ATTRIBUTES: '', - OTEL_SERVICE_NAME: '', - OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_EVENT_COUNT_LIMIT: 128, - OTEL_SPAN_LINK_COUNT_LIMIT: 128, - OTEL_TRACES_EXPORTER: 'none', - OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn, - OTEL_TRACES_SAMPLER_ARG: '', - OTEL_EXPORTER_OTLP_COMPRESSION: '', - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '', - OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '' -}; -/** - * Parses a variable as number with number validation - * @param name - * @param environment - * @param values - * @param min - * @param max - */ -function parseNumber(name, environment, values, min = -Infinity, max = Infinity) { - if (typeof values[name] !== 'undefined') { - const value = Number(values[name]); - if (!isNaN(value)) { - if (value < min) { - environment[name] = min; - } - else if (value > max) { - environment[name] = max; - } - else { - environment[name] = value; - } - } - } -} -/** - * Parses list-like strings from input into output. - * @param name - * @param environment - * @param values - * @param separator - */ -function parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) { - const givenValue = input[name]; - if (typeof givenValue === 'string') { - output[name] = givenValue.split(separator).map(v => v.trim()); - } -} -// The support string -> DiagLogLevel mappings -const logLevelMap = { - ALL: api_1.DiagLogLevel.ALL, - VERBOSE: api_1.DiagLogLevel.VERBOSE, - DEBUG: api_1.DiagLogLevel.DEBUG, - INFO: api_1.DiagLogLevel.INFO, - WARN: api_1.DiagLogLevel.WARN, - ERROR: api_1.DiagLogLevel.ERROR, - NONE: api_1.DiagLogLevel.NONE, -}; -/** - * Environmentally sets log level if valid log level string is provided - * @param key - * @param environment - * @param values - */ -function setLogLevelFromEnv(key, environment, values) { - const value = values[key]; - if (typeof value === 'string') { - const theLevel = logLevelMap[value.toUpperCase()]; - if (theLevel != null) { - environment[key] = theLevel; - } - } -} -/** - * Parses environment values - * @param values - */ -function parseEnvironment(values) { - const environment = {}; - for (const env in exports.DEFAULT_ENVIRONMENT) { - const key = env; - switch (key) { - case 'OTEL_LOG_LEVEL': - setLogLevelFromEnv(key, environment, values); - break; - default: - if (isEnvVarANumber(key)) { - parseNumber(key, environment, values); - } - else if (isEnvVarAList(key)) { - parseStringList(key, environment, values); - } - else { - const value = values[key]; - if (typeof value !== 'undefined' && value !== null) { - environment[key] = String(value); - } - } - } - } - return environment; -} -exports.parseEnvironment = parseEnvironment; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 73839: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPlainObject = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * based on lodash in order to support esm builds without esModuleInterop. - * lodash is using MIT License. - **/ -const objectTag = '[object Object]'; -const nullTag = '[object Null]'; -const undefinedTag = '[object Undefined]'; -const funcProto = Function.prototype; -const funcToString = funcProto.toString; -const objectCtorString = funcToString.call(Object); -const getPrototype = overArg(Object.getPrototypeOf, Object); -const objectProto = Object.prototype; -const hasOwnProperty = objectProto.hasOwnProperty; -const symToStringTag = Symbol ? Symbol.toStringTag : undefined; -const nativeObjectToString = objectProto.toString; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function (arg) { - return func(transform(arg)); - }; -} -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) !== objectTag) { - return false; - } - const proto = getPrototype(value); - if (proto === null) { - return true; - } - const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) === objectCtorString; -} -exports.isPlainObject = isPlainObject; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; - let unmasked = false; - try { - value[symToStringTag] = undefined; - unmasked = true; - } - catch (e) { - // silence - } - const result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } - else { - delete value[symToStringTag]; - } - } - return result; -} -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} -//# sourceMappingURL=lodash.merge.js.map - -/***/ }), - -/***/ 1502: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.merge = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -const lodash_merge_1 = __nccwpck_require__(73839); -const MAX_LEVEL = 20; -/** - * Merges objects together - * @param args - objects / values to be merged - */ -function merge(...args) { - let result = args.shift(); - const objects = new WeakMap(); - while (args.length > 0) { - result = mergeTwoObjects(result, args.shift(), 0, objects); - } - return result; -} -exports.merge = merge; -function takeValue(value) { - if (isArray(value)) { - return value.slice(); - } - return value; -} -/** - * Merges two objects - * @param one - first object - * @param two - second object - * @param level - current deep level - * @param objects - objects holder that has been already referenced - to prevent - * cyclic dependency - */ -function mergeTwoObjects(one, two, level = 0, objects) { - let result; - if (level > MAX_LEVEL) { - return undefined; - } - level++; - if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) { - result = takeValue(two); - } - else if (isArray(one)) { - result = one.slice(); - if (isArray(two)) { - for (let i = 0, j = two.length; i < j; i++) { - result.push(takeValue(two[i])); - } - } - else if (isObject(two)) { - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - result[key] = takeValue(two[key]); - } - } - } - else if (isObject(one)) { - if (isObject(two)) { - if (!shouldMerge(one, two)) { - return two; - } - result = Object.assign({}, one); - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - const twoValue = two[key]; - if (isPrimitive(twoValue)) { - if (typeof twoValue === 'undefined') { - delete result[key]; - } - else { - // result[key] = takeValue(twoValue); - result[key] = twoValue; - } - } - else { - const obj1 = result[key]; - const obj2 = twoValue; - if (wasObjectReferenced(one, key, objects) || - wasObjectReferenced(two, key, objects)) { - delete result[key]; - } - else { - if (isObject(obj1) && isObject(obj2)) { - const arr1 = objects.get(obj1) || []; - const arr2 = objects.get(obj2) || []; - arr1.push({ obj: one, key }); - arr2.push({ obj: two, key }); - objects.set(obj1, arr1); - objects.set(obj2, arr2); - } - result[key] = mergeTwoObjects(result[key], twoValue, level, objects); - } - } - } - } - else { - result = two; - } - } - return result; -} -/** - * Function to check if object has been already reference - * @param obj - * @param key - * @param objects - */ -function wasObjectReferenced(obj, key, objects) { - const arr = objects.get(obj[key]) || []; - for (let i = 0, j = arr.length; i < j; i++) { - const info = arr[i]; - if (info.key === key && info.obj === obj) { - return true; - } - } - return false; -} -function isArray(value) { - return Array.isArray(value); -} -function isFunction(value) { - return typeof value === 'function'; -} -function isObject(value) { - return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object'; -} -function isPrimitive(value) { - return typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean' || - typeof value === 'undefined' || - value instanceof Date || - value instanceof RegExp || - value === null; -} -function shouldMerge(one, two) { - if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) { - return false; - } - return true; -} -//# sourceMappingURL=merge.js.map - -/***/ }), - -/***/ 84137: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Deferred = void 0; -class Deferred { - constructor() { - this._promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - }); - } - get promise() { - return this._promise; - } - resolve(val) { - this._resolve(val); - } - reject(err) { - this._reject(err); - } -} -exports.Deferred = Deferred; -//# sourceMappingURL=promise.js.map - -/***/ }), - -/***/ 95803: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TracesSamplerValues = void 0; -var TracesSamplerValues; -(function (TracesSamplerValues) { - TracesSamplerValues["AlwaysOff"] = "always_off"; - TracesSamplerValues["AlwaysOn"] = "always_on"; - TracesSamplerValues["ParentBasedAlwaysOff"] = "parentbased_always_off"; - TracesSamplerValues["ParentBasedAlwaysOn"] = "parentbased_always_on"; - TracesSamplerValues["ParentBasedTraceIdRatio"] = "parentbased_traceidratio"; - TracesSamplerValues["TraceIdRatio"] = "traceidratio"; -})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {})); -//# sourceMappingURL=sampling.js.map - -/***/ }), - -/***/ 59747: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isUrlIgnored = exports.urlMatches = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function urlMatches(url, urlToMatch) { - if (typeof urlToMatch === 'string') { - return url === urlToMatch; - } - else { - return !!url.match(urlToMatch); - } -} -exports.urlMatches = urlMatches; -/** - * Check if {@param url} should be ignored when comparing against {@param ignoredUrls} - * @param url - * @param ignoredUrls - */ -function isUrlIgnored(url, ignoredUrls) { - if (!ignoredUrls) { - return false; - } - for (const ignoreUrl of ignoredUrls) { - if (urlMatches(url, ignoreUrl)) { - return true; - } - } - return false; -} -exports.isUrlIgnored = isUrlIgnored; -//# sourceMappingURL=url.js.map - -/***/ }), - -/***/ 65071: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isWrapped = void 0; -/** - * Checks if certain function has been already wrapped - * @param func - */ -function isWrapped(func) { - return (typeof func === 'function' && - typeof func.__original === 'function' && - typeof func.__unwrap === 'function' && - func.__wrapped === true); -} -exports.isWrapped = isWrapped; -//# sourceMappingURL=wrap.js.map - -/***/ }), - -/***/ 77129: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VERSION = void 0; -// this is autogenerated file, see scripts/version-update.js -exports.VERSION = '1.2.0'; -//# sourceMappingURL=version.js.map - -/***/ }), - -/***/ 22039: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(12787), exports); -__exportStar(__nccwpck_require__(43896), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 35601: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticResourceAttributes = { - /** - * Name of the cloud provider. - */ - CLOUD_PROVIDER: 'cloud.provider', - /** - * The cloud account ID the resource is assigned to. - */ - CLOUD_ACCOUNT_ID: 'cloud.account.id', - /** - * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations). - */ - CLOUD_REGION: 'cloud.region', - /** - * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. - * - * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. - */ - CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone', - /** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - */ - CLOUD_PLATFORM: 'cloud.platform', - /** - * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - */ - AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn', - /** - * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - */ - AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn', - /** - * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - */ - AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype', - /** - * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). - */ - AWS_ECS_TASK_ARN: 'aws.ecs.task.arn', - /** - * The task definition family this task definition is a member of. - */ - AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family', - /** - * The revision for this task definition. - */ - AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision', - /** - * The ARN of an EKS cluster. - */ - AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn', - /** - * The name(s) of the AWS log group(s) an application is writing to. - * - * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. - */ - AWS_LOG_GROUP_NAMES: 'aws.log.group.names', - /** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * - * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - */ - AWS_LOG_GROUP_ARNS: 'aws.log.group.arns', - /** - * The name(s) of the AWS log stream(s) an application is writing to. - */ - AWS_LOG_STREAM_NAMES: 'aws.log.stream.names', - /** - * The ARN(s) of the AWS log stream(s). - * - * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. - */ - AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns', - /** - * Container name. - */ - CONTAINER_NAME: 'container.name', - /** - * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. - */ - CONTAINER_ID: 'container.id', - /** - * The container runtime managing this container. - */ - CONTAINER_RUNTIME: 'container.runtime', - /** - * Name of the image the container was built on. - */ - CONTAINER_IMAGE_NAME: 'container.image.name', - /** - * Container image tag. - */ - CONTAINER_IMAGE_TAG: 'container.image.tag', - /** - * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). - */ - DEPLOYMENT_ENVIRONMENT: 'deployment.environment', - /** - * A unique identifier representing the device. - * - * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. - */ - DEVICE_ID: 'device.id', - /** - * The model identifier for the device. - * - * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. - */ - DEVICE_MODEL_IDENTIFIER: 'device.model.identifier', - /** - * The marketing name for the device model. - * - * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. - */ - DEVICE_MODEL_NAME: 'device.model.name', - /** - * The name of the single function that this runtime instance executes. - * - * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes). - */ - FAAS_NAME: 'faas.name', - /** - * The unique ID of the single function that this runtime instance executes. - * - * Note: Depending on the cloud provider, use: - - * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - Take care not to use the "invoked ARN" directly but replace any - [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple - different aliases. - * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) - * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id). - - On some providers, it may not be possible to determine the full ID at startup, - which is why this field cannot be made required. For example, on AWS the account ID - part of the ARN is not available without calling another AWS API - which may be deemed too slow for a short-running lambda function. - As an alternative, consider setting `faas.id` as a span attribute instead. - */ - FAAS_ID: 'faas.id', - /** - * The immutable version of the function being executed. - * - * Note: Depending on the cloud provider and platform, use: - - * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - (an integer represented as a decimal string). - * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) - (i.e., the function name plus the revision suffix). - * **Google Cloud Functions:** The value of the - [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - * **Azure Functions:** Not applicable. Do not set this attribute. - */ - FAAS_VERSION: 'faas.version', - /** - * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. - * - * Note: * **AWS Lambda:** Use the (full) log stream name. - */ - FAAS_INSTANCE: 'faas.instance', - /** - * The amount of memory available to the serverless function in MiB. - * - * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. - */ - FAAS_MAX_MEMORY: 'faas.max_memory', - /** - * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. - */ - HOST_ID: 'host.id', - /** - * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. - */ - HOST_NAME: 'host.name', - /** - * Type of host. For Cloud, this must be the machine type. - */ - HOST_TYPE: 'host.type', - /** - * The CPU architecture the host system is running on. - */ - HOST_ARCH: 'host.arch', - /** - * Name of the VM image or OS install the host was instantiated from. - */ - HOST_IMAGE_NAME: 'host.image.name', - /** - * VM image ID. For Cloud, this value is from the provider. - */ - HOST_IMAGE_ID: 'host.image.id', - /** - * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes). - */ - HOST_IMAGE_VERSION: 'host.image.version', - /** - * The name of the cluster. - */ - K8S_CLUSTER_NAME: 'k8s.cluster.name', - /** - * The name of the Node. - */ - K8S_NODE_NAME: 'k8s.node.name', - /** - * The UID of the Node. - */ - K8S_NODE_UID: 'k8s.node.uid', - /** - * The name of the namespace that the pod is running in. - */ - K8S_NAMESPACE_NAME: 'k8s.namespace.name', - /** - * The UID of the Pod. - */ - K8S_POD_UID: 'k8s.pod.uid', - /** - * The name of the Pod. - */ - K8S_POD_NAME: 'k8s.pod.name', - /** - * The name of the Container in a Pod template. - */ - K8S_CONTAINER_NAME: 'k8s.container.name', - /** - * The UID of the ReplicaSet. - */ - K8S_REPLICASET_UID: 'k8s.replicaset.uid', - /** - * The name of the ReplicaSet. - */ - K8S_REPLICASET_NAME: 'k8s.replicaset.name', - /** - * The UID of the Deployment. - */ - K8S_DEPLOYMENT_UID: 'k8s.deployment.uid', - /** - * The name of the Deployment. - */ - K8S_DEPLOYMENT_NAME: 'k8s.deployment.name', - /** - * The UID of the StatefulSet. - */ - K8S_STATEFULSET_UID: 'k8s.statefulset.uid', - /** - * The name of the StatefulSet. - */ - K8S_STATEFULSET_NAME: 'k8s.statefulset.name', - /** - * The UID of the DaemonSet. - */ - K8S_DAEMONSET_UID: 'k8s.daemonset.uid', - /** - * The name of the DaemonSet. - */ - K8S_DAEMONSET_NAME: 'k8s.daemonset.name', - /** - * The UID of the Job. - */ - K8S_JOB_UID: 'k8s.job.uid', - /** - * The name of the Job. - */ - K8S_JOB_NAME: 'k8s.job.name', - /** - * The UID of the CronJob. - */ - K8S_CRONJOB_UID: 'k8s.cronjob.uid', - /** - * The name of the CronJob. - */ - K8S_CRONJOB_NAME: 'k8s.cronjob.name', - /** - * The operating system type. - */ - OS_TYPE: 'os.type', - /** - * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. - */ - OS_DESCRIPTION: 'os.description', - /** - * Human readable operating system name. - */ - OS_NAME: 'os.name', - /** - * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes). - */ - OS_VERSION: 'os.version', - /** - * Process identifier (PID). - */ - PROCESS_PID: 'process.pid', - /** - * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_NAME: 'process.executable.name', - /** - * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_PATH: 'process.executable.path', - /** - * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. - */ - PROCESS_COMMAND: 'process.command', - /** - * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. - */ - PROCESS_COMMAND_LINE: 'process.command_line', - /** - * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. - */ - PROCESS_COMMAND_ARGS: 'process.command_args', - /** - * The username of the user that owns the process. - */ - PROCESS_OWNER: 'process.owner', - /** - * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. - */ - PROCESS_RUNTIME_NAME: 'process.runtime.name', - /** - * The version of the runtime of this process, as returned by the runtime without modification. - */ - PROCESS_RUNTIME_VERSION: 'process.runtime.version', - /** - * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. - */ - PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description', - /** - * Logical name of the service. - * - * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. - */ - SERVICE_NAME: 'service.name', - /** - * A namespace for `service.name`. - * - * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. - */ - SERVICE_NAMESPACE: 'service.namespace', - /** - * The string ID of the service instance. - * - * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). - */ - SERVICE_INSTANCE_ID: 'service.instance.id', - /** - * The version string of the service API or implementation. - */ - SERVICE_VERSION: 'service.version', - /** - * The name of the telemetry SDK as defined above. - */ - TELEMETRY_SDK_NAME: 'telemetry.sdk.name', - /** - * The language of the telemetry SDK. - */ - TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language', - /** - * The version string of the telemetry SDK. - */ - TELEMETRY_SDK_VERSION: 'telemetry.sdk.version', - /** - * The version string of the auto instrumentation agent, if used. - */ - TELEMETRY_AUTO_VERSION: 'telemetry.auto.version', - /** - * The name of the web engine. - */ - WEBENGINE_NAME: 'webengine.name', - /** - * The version of the web engine. - */ - WEBENGINE_VERSION: 'webengine.version', - /** - * Additional description of the web engine (e.g. detailed version and edition information). - */ - WEBENGINE_DESCRIPTION: 'webengine.description', -}; -exports.CloudProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.CloudPlatformValues = { - /** Alibaba Cloud Elastic Compute Service. */ - ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs', - /** Alibaba Cloud Function Compute. */ - ALIBABA_CLOUD_FC: 'alibaba_cloud_fc', - /** AWS Elastic Compute Cloud. */ - AWS_EC2: 'aws_ec2', - /** AWS Elastic Container Service. */ - AWS_ECS: 'aws_ecs', - /** AWS Elastic Kubernetes Service. */ - AWS_EKS: 'aws_eks', - /** AWS Lambda. */ - AWS_LAMBDA: 'aws_lambda', - /** AWS Elastic Beanstalk. */ - AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk', - /** Azure Virtual Machines. */ - AZURE_VM: 'azure_vm', - /** Azure Container Instances. */ - AZURE_CONTAINER_INSTANCES: 'azure_container_instances', - /** Azure Kubernetes Service. */ - AZURE_AKS: 'azure_aks', - /** Azure Functions. */ - AZURE_FUNCTIONS: 'azure_functions', - /** Azure App Service. */ - AZURE_APP_SERVICE: 'azure_app_service', - /** Google Cloud Compute Engine (GCE). */ - GCP_COMPUTE_ENGINE: 'gcp_compute_engine', - /** Google Cloud Run. */ - GCP_CLOUD_RUN: 'gcp_cloud_run', - /** Google Cloud Kubernetes Engine (GKE). */ - GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine', - /** Google Cloud Functions (GCF). */ - GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions', - /** Google Cloud App Engine (GAE). */ - GCP_APP_ENGINE: 'gcp_app_engine', -}; -exports.AwsEcsLaunchtypeValues = { - /** ec2. */ - EC2: 'ec2', - /** fargate. */ - FARGATE: 'fargate', -}; -exports.HostArchValues = { - /** AMD64. */ - AMD64: 'amd64', - /** ARM32. */ - ARM32: 'arm32', - /** ARM64. */ - ARM64: 'arm64', - /** Itanium. */ - IA64: 'ia64', - /** 32-bit PowerPC. */ - PPC32: 'ppc32', - /** 64-bit PowerPC. */ - PPC64: 'ppc64', - /** 32-bit x86. */ - X86: 'x86', -}; -exports.OsTypeValues = { - /** Microsoft Windows. */ - WINDOWS: 'windows', - /** Linux. */ - LINUX: 'linux', - /** Apple Darwin. */ - DARWIN: 'darwin', - /** FreeBSD. */ - FREEBSD: 'freebsd', - /** NetBSD. */ - NETBSD: 'netbsd', - /** OpenBSD. */ - OPENBSD: 'openbsd', - /** DragonFly BSD. */ - DRAGONFLYBSD: 'dragonflybsd', - /** HP-UX (Hewlett Packard Unix). */ - HPUX: 'hpux', - /** AIX (Advanced Interactive eXecutive). */ - AIX: 'aix', - /** Oracle Solaris. */ - SOLARIS: 'solaris', - /** IBM z/OS. */ - Z_OS: 'z_os', -}; -exports.TelemetrySdkLanguageValues = { - /** cpp. */ - CPP: 'cpp', - /** dotnet. */ - DOTNET: 'dotnet', - /** erlang. */ - ERLANG: 'erlang', - /** go. */ - GO: 'go', - /** java. */ - JAVA: 'java', - /** nodejs. */ - NODEJS: 'nodejs', - /** php. */ - PHP: 'php', - /** python. */ - PYTHON: 'python', - /** ruby. */ - RUBY: 'ruby', - /** webjs. */ - WEBJS: 'webjs', -}; -//# sourceMappingURL=SemanticResourceAttributes.js.map - -/***/ }), - -/***/ 43896: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(35601), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 92572: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticAttributes = { - /** - * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). - * - * Note: This may be different from `faas.id` if an alias is involved. - */ - AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn', - /** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - */ - DB_SYSTEM: 'db.system', - /** - * The connection string used to connect to the database. It is recommended to remove embedded credentials. - */ - DB_CONNECTION_STRING: 'db.connection_string', - /** - * Username for accessing the database. - */ - DB_USER: 'db.user', - /** - * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. - */ - DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname', - /** - * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). - * - * Note: In some SQL databases, the database name to be used is called "schema name". - */ - DB_NAME: 'db.name', - /** - * The database statement being executed. - * - * Note: The value may be sanitized to exclude sensitive information. - */ - DB_STATEMENT: 'db.statement', - /** - * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. - * - * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. - */ - DB_OPERATION: 'db.operation', - /** - * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. - * - * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). - */ - DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name', - /** - * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace', - /** - * The fetch size used for paging, i.e. how many rows will be returned at once. - */ - DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size', - /** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - */ - DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_CASSANDRA_TABLE: 'db.cassandra.table', - /** - * Whether or not the query is idempotent. - */ - DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence', - /** - * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. - */ - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count', - /** - * The ID of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id', - /** - * The data center of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc', - /** - * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_HBASE_NAMESPACE: 'db.hbase.namespace', - /** - * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. - */ - DB_REDIS_DATABASE_INDEX: 'db.redis.database_index', - /** - * The collection being accessed within the database stated in `db.name`. - */ - DB_MONGODB_COLLECTION: 'db.mongodb.collection', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_SQL_TABLE: 'db.sql.table', - /** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. - */ - EXCEPTION_TYPE: 'exception.type', - /** - * The exception message. - */ - EXCEPTION_MESSAGE: 'exception.message', - /** - * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - */ - EXCEPTION_STACKTRACE: 'exception.stacktrace', - /** - * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. - * - * Note: An exception is considered to have escaped (or left) the scope of a span, - if that span is ended while the exception is still logically "in flight". - This may be actually "in flight" in some languages (e.g. if the exception - is passed to a Context manager's `__exit__` method in Python) but will - usually be caught at the point of recording the exception in most languages. - - It is usually not possible to determine at the point where an exception is thrown - whether it will escape the scope of a span. - However, it is trivial to know that an exception - will escape, if one checks for an active exception just before ending the span, - as done in the [example above](#exception-end-example). - - It follows that an exception may still escape the scope of the span - even if the `exception.escaped` attribute was not set or set to false, - since the event might have been recorded at a time where it was not - clear whether the exception will escape. - */ - EXCEPTION_ESCAPED: 'exception.escaped', - /** - * Type of the trigger on which the function is executed. - */ - FAAS_TRIGGER: 'faas.trigger', - /** - * The execution ID of the current function execution. - */ - FAAS_EXECUTION: 'faas.execution', - /** - * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - */ - FAAS_DOCUMENT_COLLECTION: 'faas.document.collection', - /** - * Describes the type of the operation that was performed on the data. - */ - FAAS_DOCUMENT_OPERATION: 'faas.document.operation', - /** - * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_DOCUMENT_TIME: 'faas.document.time', - /** - * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. - */ - FAAS_DOCUMENT_NAME: 'faas.document.name', - /** - * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_TIME: 'faas.time', - /** - * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - */ - FAAS_CRON: 'faas.cron', - /** - * A boolean that is true if the serverless function is executed for the first time (aka cold-start). - */ - FAAS_COLDSTART: 'faas.coldstart', - /** - * The name of the invoked function. - * - * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. - */ - FAAS_INVOKED_NAME: 'faas.invoked_name', - /** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - */ - FAAS_INVOKED_PROVIDER: 'faas.invoked_provider', - /** - * The cloud region of the invoked function. - * - * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. - */ - FAAS_INVOKED_REGION: 'faas.invoked_region', - /** - * Transport protocol used. See note below. - */ - NET_TRANSPORT: 'net.transport', - /** - * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). - */ - NET_PEER_IP: 'net.peer.ip', - /** - * Remote port number. - */ - NET_PEER_PORT: 'net.peer.port', - /** - * Remote hostname or similar, see note below. - */ - NET_PEER_NAME: 'net.peer.name', - /** - * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. - */ - NET_HOST_IP: 'net.host.ip', - /** - * Like `net.peer.port` but for the host port. - */ - NET_HOST_PORT: 'net.host.port', - /** - * Local hostname or similar, see note below. - */ - NET_HOST_NAME: 'net.host.name', - /** - * The internet connection type currently being used by the host. - */ - NET_HOST_CONNECTION_TYPE: 'net.host.connection.type', - /** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - */ - NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype', - /** - * The name of the mobile carrier. - */ - NET_HOST_CARRIER_NAME: 'net.host.carrier.name', - /** - * The mobile carrier country code. - */ - NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc', - /** - * The mobile carrier network code. - */ - NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc', - /** - * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. - */ - NET_HOST_CARRIER_ICC: 'net.host.carrier.icc', - /** - * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. - */ - PEER_SERVICE: 'peer.service', - /** - * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. - */ - ENDUSER_ID: 'enduser.id', - /** - * Actual/assumed role the client is making the request under extracted from token or application security context. - */ - ENDUSER_ROLE: 'enduser.role', - /** - * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - */ - ENDUSER_SCOPE: 'enduser.scope', - /** - * Current "managed" thread ID (as opposed to OS thread ID). - */ - THREAD_ID: 'thread.id', - /** - * Current thread name. - */ - THREAD_NAME: 'thread.name', - /** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). - */ - CODE_FUNCTION: 'code.function', - /** - * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. - */ - CODE_NAMESPACE: 'code.namespace', - /** - * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). - */ - CODE_FILEPATH: 'code.filepath', - /** - * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. - */ - CODE_LINENO: 'code.lineno', - /** - * HTTP request method. - */ - HTTP_METHOD: 'http.method', - /** - * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. - * - * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`. - */ - HTTP_URL: 'http.url', - /** - * The full request target as passed in a HTTP request line or equivalent. - */ - HTTP_TARGET: 'http.target', - /** - * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note. - * - * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set. - */ - HTTP_HOST: 'http.host', - /** - * The URI scheme identifying the used protocol. - */ - HTTP_SCHEME: 'http.scheme', - /** - * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). - */ - HTTP_STATUS_CODE: 'http.status_code', - /** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - */ - HTTP_FLAVOR: 'http.flavor', - /** - * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. - */ - HTTP_USER_AGENT: 'http.user_agent', - /** - * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length', - /** - * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed', - /** - * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length', - /** - * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed', - /** - * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). - * - * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available. - */ - HTTP_SERVER_NAME: 'http.server_name', - /** - * The matched route (path template). - */ - HTTP_ROUTE: 'http.route', - /** - * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). - * - * Note: This is not necessarily the same as `net.peer.ip`, which would - identify the network-level peer, which may be a proxy. - - This attribute should be set when a source of information different - from the one used for `net.peer.ip`, is available even if that other - source just confirms the same value as `net.peer.ip`. - Rationale: For `net.peer.ip`, one typically does not know if it - comes from a proxy, reverse proxy, or the actual client. Setting - `http.client_ip` when it's the same as `net.peer.ip` means that - one is at least somewhat confident that the address is not that of - the closest proxy. - */ - HTTP_CLIENT_IP: 'http.client_ip', - /** - * The keys in the `RequestItems` object field. - */ - AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names', - /** - * The JSON-serialized value of each item in the `ConsumedCapacity` response field. - */ - AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity', - /** - * The JSON-serialized value of the `ItemCollectionMetrics` response field. - */ - AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics', - /** - * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity', - /** - * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity', - /** - * The value of the `ConsistentRead` request parameter. - */ - AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read', - /** - * The value of the `ProjectionExpression` request parameter. - */ - AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection', - /** - * The value of the `Limit` request parameter. - */ - AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit', - /** - * The value of the `AttributesToGet` request parameter. - */ - AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get', - /** - * The value of the `IndexName` request parameter. - */ - AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name', - /** - * The value of the `Select` request parameter. - */ - AWS_DYNAMODB_SELECT: 'aws.dynamodb.select', - /** - * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes', - /** - * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes', - /** - * The value of the `ExclusiveStartTableName` request parameter. - */ - AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table', - /** - * The the number of items in the `TableNames` response parameter. - */ - AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count', - /** - * The value of the `ScanIndexForward` request parameter. - */ - AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward', - /** - * The value of the `Segment` request parameter. - */ - AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment', - /** - * The value of the `TotalSegments` request parameter. - */ - AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments', - /** - * The value of the `Count` response parameter. - */ - AWS_DYNAMODB_COUNT: 'aws.dynamodb.count', - /** - * The value of the `ScannedCount` response parameter. - */ - AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count', - /** - * The JSON-serialized value of each item in the `AttributeDefinitions` request field. - */ - AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions', - /** - * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates', - /** - * A string identifying the messaging system. - */ - MESSAGING_SYSTEM: 'messaging.system', - /** - * The message destination name. This might be equal to the span name but is required nevertheless. - */ - MESSAGING_DESTINATION: 'messaging.destination', - /** - * The kind of message destination. - */ - MESSAGING_DESTINATION_KIND: 'messaging.destination_kind', - /** - * A boolean that is true if the message destination is temporary. - */ - MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination', - /** - * The name of the transport protocol. - */ - MESSAGING_PROTOCOL: 'messaging.protocol', - /** - * The version of the transport protocol. - */ - MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version', - /** - * Connection string. - */ - MESSAGING_URL: 'messaging.url', - /** - * A value used by the messaging system as an identifier for the message, represented as a string. - */ - MESSAGING_MESSAGE_ID: 'messaging.message_id', - /** - * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". - */ - MESSAGING_CONVERSATION_ID: 'messaging.conversation_id', - /** - * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. - */ - MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes', - /** - * The compressed size of the message payload in bytes. - */ - MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes', - /** - * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. - */ - MESSAGING_OPERATION: 'messaging.operation', - /** - * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. - */ - MESSAGING_CONSUMER_ID: 'messaging.consumer_id', - /** - * RabbitMQ message routing key. - */ - MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key', - /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. - * - * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. - */ - MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key', - /** - * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. - */ - MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group', - /** - * Client Id for the Consumer or Producer that is handling the message. - */ - MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id', - /** - * Partition the message is sent to. - */ - MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition', - /** - * A boolean that is true if the message is a tombstone. - */ - MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone', - /** - * A string identifying the remoting system. - */ - RPC_SYSTEM: 'rpc.system', - /** - * The full (logical) name of the service being called, including its package name, if applicable. - * - * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). - */ - RPC_SERVICE: 'rpc.service', - /** - * The name of the (logical) method being called, must be equal to the $method part in the span name. - * - * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). - */ - RPC_METHOD: 'rpc.method', - /** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - */ - RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code', - /** - * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted. - */ - RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version', - /** - * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. - */ - RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id', - /** - * `error.code` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code', - /** - * `error.message` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message', - /** - * Whether this is a received or sent message. - */ - MESSAGE_TYPE: 'message.type', - /** - * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. - * - * Note: This way we guarantee that the values will be consistent between different implementations. - */ - MESSAGE_ID: 'message.id', - /** - * Compressed size of the message in bytes. - */ - MESSAGE_COMPRESSED_SIZE: 'message.compressed_size', - /** - * Uncompressed size of the message in bytes. - */ - MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size', -}; -exports.DbSystemValues = { - /** Some other SQL database. Fallback only. See notes. */ - OTHER_SQL: 'other_sql', - /** Microsoft SQL Server. */ - MSSQL: 'mssql', - /** MySQL. */ - MYSQL: 'mysql', - /** Oracle Database. */ - ORACLE: 'oracle', - /** IBM Db2. */ - DB2: 'db2', - /** PostgreSQL. */ - POSTGRESQL: 'postgresql', - /** Amazon Redshift. */ - REDSHIFT: 'redshift', - /** Apache Hive. */ - HIVE: 'hive', - /** Cloudscape. */ - CLOUDSCAPE: 'cloudscape', - /** HyperSQL DataBase. */ - HSQLDB: 'hsqldb', - /** Progress Database. */ - PROGRESS: 'progress', - /** SAP MaxDB. */ - MAXDB: 'maxdb', - /** SAP HANA. */ - HANADB: 'hanadb', - /** Ingres. */ - INGRES: 'ingres', - /** FirstSQL. */ - FIRSTSQL: 'firstsql', - /** EnterpriseDB. */ - EDB: 'edb', - /** InterSystems Caché. */ - CACHE: 'cache', - /** Adabas (Adaptable Database System). */ - ADABAS: 'adabas', - /** Firebird. */ - FIREBIRD: 'firebird', - /** Apache Derby. */ - DERBY: 'derby', - /** FileMaker. */ - FILEMAKER: 'filemaker', - /** Informix. */ - INFORMIX: 'informix', - /** InstantDB. */ - INSTANTDB: 'instantdb', - /** InterBase. */ - INTERBASE: 'interbase', - /** MariaDB. */ - MARIADB: 'mariadb', - /** Netezza. */ - NETEZZA: 'netezza', - /** Pervasive PSQL. */ - PERVASIVE: 'pervasive', - /** PointBase. */ - POINTBASE: 'pointbase', - /** SQLite. */ - SQLITE: 'sqlite', - /** Sybase. */ - SYBASE: 'sybase', - /** Teradata. */ - TERADATA: 'teradata', - /** Vertica. */ - VERTICA: 'vertica', - /** H2. */ - H2: 'h2', - /** ColdFusion IMQ. */ - COLDFUSION: 'coldfusion', - /** Apache Cassandra. */ - CASSANDRA: 'cassandra', - /** Apache HBase. */ - HBASE: 'hbase', - /** MongoDB. */ - MONGODB: 'mongodb', - /** Redis. */ - REDIS: 'redis', - /** Couchbase. */ - COUCHBASE: 'couchbase', - /** CouchDB. */ - COUCHDB: 'couchdb', - /** Microsoft Azure Cosmos DB. */ - COSMOSDB: 'cosmosdb', - /** Amazon DynamoDB. */ - DYNAMODB: 'dynamodb', - /** Neo4j. */ - NEO4J: 'neo4j', - /** Apache Geode. */ - GEODE: 'geode', - /** Elasticsearch. */ - ELASTICSEARCH: 'elasticsearch', - /** Memcached. */ - MEMCACHED: 'memcached', - /** CockroachDB. */ - COCKROACHDB: 'cockroachdb', -}; -exports.DbCassandraConsistencyLevelValues = { - /** all. */ - ALL: 'all', - /** each_quorum. */ - EACH_QUORUM: 'each_quorum', - /** quorum. */ - QUORUM: 'quorum', - /** local_quorum. */ - LOCAL_QUORUM: 'local_quorum', - /** one. */ - ONE: 'one', - /** two. */ - TWO: 'two', - /** three. */ - THREE: 'three', - /** local_one. */ - LOCAL_ONE: 'local_one', - /** any. */ - ANY: 'any', - /** serial. */ - SERIAL: 'serial', - /** local_serial. */ - LOCAL_SERIAL: 'local_serial', -}; -exports.FaasTriggerValues = { - /** A response to some data source operation such as a database or filesystem read/write. */ - DATASOURCE: 'datasource', - /** To provide an answer to an inbound HTTP request. */ - HTTP: 'http', - /** A function is set to be executed when messages are sent to a messaging system. */ - PUBSUB: 'pubsub', - /** A function is scheduled to be executed regularly. */ - TIMER: 'timer', - /** If none of the others apply. */ - OTHER: 'other', -}; -exports.FaasDocumentOperationValues = { - /** When a new object is created. */ - INSERT: 'insert', - /** When an object is modified. */ - EDIT: 'edit', - /** When an object is deleted. */ - DELETE: 'delete', -}; -exports.FaasInvokedProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.NetTransportValues = { - /** ip_tcp. */ - IP_TCP: 'ip_tcp', - /** ip_udp. */ - IP_UDP: 'ip_udp', - /** Another IP-based protocol. */ - IP: 'ip', - /** Unix Domain socket. See below. */ - UNIX: 'unix', - /** Named or anonymous pipe. See note below. */ - PIPE: 'pipe', - /** In-process communication. */ - INPROC: 'inproc', - /** Something else (non IP-based). */ - OTHER: 'other', -}; -exports.NetHostConnectionTypeValues = { - /** wifi. */ - WIFI: 'wifi', - /** wired. */ - WIRED: 'wired', - /** cell. */ - CELL: 'cell', - /** unavailable. */ - UNAVAILABLE: 'unavailable', - /** unknown. */ - UNKNOWN: 'unknown', -}; -exports.NetHostConnectionSubtypeValues = { - /** GPRS. */ - GPRS: 'gprs', - /** EDGE. */ - EDGE: 'edge', - /** UMTS. */ - UMTS: 'umts', - /** CDMA. */ - CDMA: 'cdma', - /** EVDO Rel. 0. */ - EVDO_0: 'evdo_0', - /** EVDO Rev. A. */ - EVDO_A: 'evdo_a', - /** CDMA2000 1XRTT. */ - CDMA2000_1XRTT: 'cdma2000_1xrtt', - /** HSDPA. */ - HSDPA: 'hsdpa', - /** HSUPA. */ - HSUPA: 'hsupa', - /** HSPA. */ - HSPA: 'hspa', - /** IDEN. */ - IDEN: 'iden', - /** EVDO Rev. B. */ - EVDO_B: 'evdo_b', - /** LTE. */ - LTE: 'lte', - /** EHRPD. */ - EHRPD: 'ehrpd', - /** HSPAP. */ - HSPAP: 'hspap', - /** GSM. */ - GSM: 'gsm', - /** TD-SCDMA. */ - TD_SCDMA: 'td_scdma', - /** IWLAN. */ - IWLAN: 'iwlan', - /** 5G NR (New Radio). */ - NR: 'nr', - /** 5G NRNSA (New Radio Non-Standalone). */ - NRNSA: 'nrnsa', - /** LTE CA. */ - LTE_CA: 'lte_ca', -}; -exports.HttpFlavorValues = { - /** HTTP 1.0. */ - HTTP_1_0: '1.0', - /** HTTP 1.1. */ - HTTP_1_1: '1.1', - /** HTTP 2. */ - HTTP_2_0: '2.0', - /** SPDY protocol. */ - SPDY: 'SPDY', - /** QUIC protocol. */ - QUIC: 'QUIC', -}; -exports.MessagingDestinationKindValues = { - /** A message sent to a queue. */ - QUEUE: 'queue', - /** A message sent to a topic. */ - TOPIC: 'topic', -}; -exports.MessagingOperationValues = { - /** receive. */ - RECEIVE: 'receive', - /** process. */ - PROCESS: 'process', -}; -exports.RpcGrpcStatusCodeValues = { - /** OK. */ - OK: 0, - /** CANCELLED. */ - CANCELLED: 1, - /** UNKNOWN. */ - UNKNOWN: 2, - /** INVALID_ARGUMENT. */ - INVALID_ARGUMENT: 3, - /** DEADLINE_EXCEEDED. */ - DEADLINE_EXCEEDED: 4, - /** NOT_FOUND. */ - NOT_FOUND: 5, - /** ALREADY_EXISTS. */ - ALREADY_EXISTS: 6, - /** PERMISSION_DENIED. */ - PERMISSION_DENIED: 7, - /** RESOURCE_EXHAUSTED. */ - RESOURCE_EXHAUSTED: 8, - /** FAILED_PRECONDITION. */ - FAILED_PRECONDITION: 9, - /** ABORTED. */ - ABORTED: 10, - /** OUT_OF_RANGE. */ - OUT_OF_RANGE: 11, - /** UNIMPLEMENTED. */ - UNIMPLEMENTED: 12, - /** INTERNAL. */ - INTERNAL: 13, - /** UNAVAILABLE. */ - UNAVAILABLE: 14, - /** DATA_LOSS. */ - DATA_LOSS: 15, - /** UNAUTHENTICATED. */ - UNAUTHENTICATED: 16, -}; -exports.MessageTypeValues = { - /** sent. */ - SENT: 'SENT', - /** received. */ - RECEIVED: 'RECEIVED', -}; -//# sourceMappingURL=SemanticAttributes.js.map - -/***/ }), - -/***/ 12787: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(92572), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 26544: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPTraceExporter = void 0; -const exporter_trace_otlp_http_1 = __nccwpck_require__(35401); -const core_1 = __nccwpck_require__(96154); -const otlp_exporter_base_1 = __nccwpck_require__(11363); -const otlp_proto_exporter_base_1 = __nccwpck_require__(61216); -const DEFAULT_COLLECTOR_RESOURCE_PATH = '/v1/traces'; -const DEFAULT_COLLECTOR_URL = `http://localhost:4318${DEFAULT_COLLECTOR_RESOURCE_PATH}`; -/** - * Collector Trace Exporter for Node with protobuf - */ -class OTLPTraceExporter extends otlp_proto_exporter_base_1.OTLPProtoExporterNodeBase { - constructor(config = {}) { - super(config); - this.headers = Object.assign(this.headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS)); - } - convert(spans) { - return (0, exporter_trace_otlp_http_1.toOTLPExportTraceServiceRequest)(spans, this); - } - getDefaultUrl(config) { - return typeof config.url === 'string' - ? config.url - : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0 - ? (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0 - ? (0, otlp_exporter_base_1.appendResourcePathToUrlIfNotPresent)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH) - : DEFAULT_COLLECTOR_URL; - } - getServiceClientType() { - return otlp_proto_exporter_base_1.ServiceClientType.SPANS; - } -} -exports.OTLPTraceExporter = OTLPTraceExporter; -//# sourceMappingURL=OTLPTraceExporter.js.map - -/***/ }), - -/***/ 97859: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(26544), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 87797: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExportResultCode = void 0; -var ExportResultCode; -(function (ExportResultCode) { - ExportResultCode[ExportResultCode["SUCCESS"] = 0] = "SUCCESS"; - ExportResultCode[ExportResultCode["FAILED"] = 1] = "FAILED"; -})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {})); -//# sourceMappingURL=ExportResult.js.map - -/***/ }), - -/***/ 83211: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0; -exports.BAGGAGE_KEY_PAIR_SEPARATOR = '='; -exports.BAGGAGE_PROPERTIES_SEPARATOR = ';'; -exports.BAGGAGE_ITEMS_SEPARATOR = ','; -// Name of the http header used to propagate the baggage -exports.BAGGAGE_HEADER = 'baggage'; -// Maximum number of name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180; -// Maximum number of bytes per a single name-value pair allowed by w3c spec -exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096; -// Maximum total length of all name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 94069: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CBaggagePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(81166); -const constants_1 = __nccwpck_require__(83211); -const utils_1 = __nccwpck_require__(93336); -/** - * Propagates {@link Baggage} through Context format propagation. - * - * Based on the Baggage specification: - * https://w3c.github.io/baggage/ - */ -class W3CBaggagePropagator { - inject(context, carrier, setter) { - const baggage = api_1.propagation.getBaggage(context); - if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context)) - return; - const keyPairs = (0, utils_1.getKeyPairs)(baggage) - .filter((pair) => { - return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS; - }) - .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS); - const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs); - if (headerValue.length > 0) { - setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue); - } - } - extract(context, carrier, getter) { - const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER); - const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue; - if (!baggageString) - return context; - const baggage = {}; - if (baggageString.length === 0) { - return context; - } - const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR); - pairs.forEach(entry => { - const keyPair = (0, utils_1.parsePairKeyValue)(entry); - if (keyPair) { - const baggageEntry = { value: keyPair.value }; - if (keyPair.metadata) { - baggageEntry.metadata = keyPair.metadata; - } - baggage[keyPair.key] = baggageEntry; - } - }); - if (Object.entries(baggage).length === 0) { - return context; - } - return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage)); - } - fields() { - return [constants_1.BAGGAGE_HEADER]; - } -} -exports.W3CBaggagePropagator = W3CBaggagePropagator; -//# sourceMappingURL=W3CBaggagePropagator.js.map - -/***/ }), - -/***/ 93336: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const api_1 = __nccwpck_require__(65163); -const constants_1 = __nccwpck_require__(83211); -function serializeKeyPairs(keyPairs) { - return keyPairs.reduce((hValue, current) => { - const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`; - return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value; - }, ''); -} -exports.serializeKeyPairs = serializeKeyPairs; -function getKeyPairs(baggage) { - return baggage.getAllEntries().map(([key, value]) => { - let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`; - // include opaque metadata if provided - // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation - if (value.metadata !== undefined) { - entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString(); - } - return entry; - }); -} -exports.getKeyPairs = getKeyPairs; -function parsePairKeyValue(entry) { - const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR); - if (valueProps.length <= 0) - return; - const keyPairPart = valueProps.shift(); - if (!keyPairPart) - return; - const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR); - if (keyPair.length !== 2) - return; - const key = decodeURIComponent(keyPair[0].trim()); - const value = decodeURIComponent(keyPair[1].trim()); - let metadata; - if (valueProps.length > 0) { - metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR)); - } - return { key, value, metadata }; -} -exports.parsePairKeyValue = parsePairKeyValue; -/** - * Parse a string serialized in the baggage HTTP Format (without metadata): - * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md - */ -function parseKeyPairsIntoRecord(value) { - if (typeof value !== 'string' || value.length === 0) - return {}; - return value - .split(constants_1.BAGGAGE_ITEMS_SEPARATOR) - .map(entry => { - return parsePairKeyValue(entry); - }) - .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0) - .reduce((headers, keyPair) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - headers[keyPair.key] = keyPair.value; - return headers; - }, {}); -} -exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 27208: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isAttributeValue = exports.sanitizeAttributes = void 0; -function sanitizeAttributes(attributes) { - const out = {}; - if (attributes == null || typeof attributes !== 'object') { - return out; - } - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - for (const [k, v] of Object.entries(attributes)) { - if (isAttributeValue(v)) { - if (Array.isArray(v)) { - out[k] = v.slice(); - } - else { - out[k] = v; - } - } - } - return out; -} -exports.sanitizeAttributes = sanitizeAttributes; -function isAttributeValue(val) { - if (val == null) { - return true; - } - if (Array.isArray(val)) { - return isHomogeneousAttributeValueArray(val); - } - return isValidPrimitiveAttributeValue(val); -} -exports.isAttributeValue = isAttributeValue; -function isHomogeneousAttributeValueArray(arr) { - let type; - for (const element of arr) { - // null/undefined elements are allowed - if (element == null) - continue; - if (!type) { - if (isValidPrimitiveAttributeValue(element)) { - type = typeof element; - continue; - } - // encountered an invalid primitive - return false; - } - if (typeof element === type) { - continue; - } - return false; - } - return true; -} -function isValidPrimitiveAttributeValue(val) { - switch (typeof val) { - case 'number': - return true; - case 'boolean': - return true; - case 'string': - return true; - } - return false; -} -//# sourceMappingURL=attributes.js.map - -/***/ }), - -/***/ 80785: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.globalErrorHandler = exports.setGlobalErrorHandler = void 0; -const logging_error_handler_1 = __nccwpck_require__(54212); -/** The global error handler delegate */ -let delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)(); -/** - * Set the global error handler - * @param {ErrorHandler} handler - */ -function setGlobalErrorHandler(handler) { - delegateHandler = handler; -} -exports.setGlobalErrorHandler = setGlobalErrorHandler; -/** - * Return the global error handler - * @param {Exception} ex - */ -function globalErrorHandler(ex) { - try { - delegateHandler(ex); - } - catch (_a) { } // eslint-disable-line no-empty -} -exports.globalErrorHandler = globalErrorHandler; -//# sourceMappingURL=global-error-handler.js.map - -/***/ }), - -/***/ 54212: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.loggingErrorHandler = void 0; -const api_1 = __nccwpck_require__(65163); -/** - * Returns a function that logs an error using the provided logger, or a - * console logger if one was not provided. - */ -function loggingErrorHandler() { - return (ex) => { - api_1.diag.error(stringifyException(ex)); - }; -} -exports.loggingErrorHandler = loggingErrorHandler; -/** - * Converts an exception into a string representation - * @param {Exception} ex - */ -function stringifyException(ex) { - if (typeof ex === 'string') { - return ex; - } - else { - return JSON.stringify(flattenException(ex)); - } -} -/** - * Flattens an exception into key-value pairs by traversing the prototype chain - * and coercing values to strings. Duplicate properties will not be overwritten; - * the first insert wins. - */ -function flattenException(ex) { - const result = {}; - let current = ex; - while (current !== null) { - Object.getOwnPropertyNames(current).forEach(propertyName => { - if (result[propertyName]) - return; - const value = current[propertyName]; - if (value) { - result[propertyName] = String(value); - } - }); - current = Object.getPrototypeOf(current); - } - return result; -} -//# sourceMappingURL=logging-error-handler.js.map - -/***/ }), - -/***/ 13610: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0; -const platform_1 = __nccwpck_require__(13679); -const NANOSECOND_DIGITS = 9; -const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS); -/** - * Converts a number to HrTime, HrTime = [number, number]. - * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. - * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. - * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. - * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds: - * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. - * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: - * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000. - * This is represented in HrTime format as [1609504210, 150000000]. - * @param epochMillis - */ -function numberToHrtime(epochMillis) { - const epochSeconds = epochMillis / 1000; - // Decimals only. - const seconds = Math.trunc(epochSeconds); - // Round sub-nanosecond accuracy to nanosecond. - const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) * - SECOND_TO_NANOSECONDS; - return [seconds, nanos]; -} -function getTimeOrigin() { - let timeOrigin = platform_1.otperformance.timeOrigin; - if (typeof timeOrigin !== 'number') { - const perf = platform_1.otperformance; - timeOrigin = perf.timing && perf.timing.fetchStart; - } - return timeOrigin; -} -/** - * Returns an hrtime calculated via performance component. - * @param performanceNow - */ -function hrTime(performanceNow) { - const timeOrigin = numberToHrtime(getTimeOrigin()); - const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now()); - let seconds = timeOrigin[0] + now[0]; - let nanos = timeOrigin[1] + now[1]; - // Nanoseconds - if (nanos > SECOND_TO_NANOSECONDS) { - nanos -= SECOND_TO_NANOSECONDS; - seconds += 1; - } - return [seconds, nanos]; -} -exports.hrTime = hrTime; -/** - * - * Converts a TimeInput to an HrTime, defaults to _hrtime(). - * @param time - */ -function timeInputToHrTime(time) { - // process.hrtime - if (isTimeInputHrTime(time)) { - return time; - } - else if (typeof time === 'number') { - // Must be a performance.now() if it's smaller than process start time. - if (time < getTimeOrigin()) { - return hrTime(time); - } - else { - // epoch milliseconds or performance.timeOrigin - return numberToHrtime(time); - } - } - else if (time instanceof Date) { - return numberToHrtime(time.getTime()); - } - else { - throw TypeError('Invalid input type'); - } -} -exports.timeInputToHrTime = timeInputToHrTime; -/** - * Returns a duration of two hrTime. - * @param startTime - * @param endTime - */ -function hrTimeDuration(startTime, endTime) { - let seconds = endTime[0] - startTime[0]; - let nanos = endTime[1] - startTime[1]; - // overflow - if (nanos < 0) { - seconds -= 1; - // negate - nanos += SECOND_TO_NANOSECONDS; - } - return [seconds, nanos]; -} -exports.hrTimeDuration = hrTimeDuration; -/** - * Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z" - * @param time - */ -function hrTimeToTimeStamp(time) { - const precision = NANOSECOND_DIGITS; - const tmp = `${'0'.repeat(precision)}${time[1]}Z`; - const nanoString = tmp.substr(tmp.length - precision - 1); - const date = new Date(time[0] * 1000).toISOString(); - return date.replace('000Z', nanoString); -} -exports.hrTimeToTimeStamp = hrTimeToTimeStamp; -/** - * Convert hrTime to nanoseconds. - * @param time - */ -function hrTimeToNanoseconds(time) { - return time[0] * SECOND_TO_NANOSECONDS + time[1]; -} -exports.hrTimeToNanoseconds = hrTimeToNanoseconds; -/** - * Convert hrTime to milliseconds. - * @param time - */ -function hrTimeToMilliseconds(time) { - return Math.round(time[0] * 1e3 + time[1] / 1e6); -} -exports.hrTimeToMilliseconds = hrTimeToMilliseconds; -/** - * Convert hrTime to microseconds. - * @param time - */ -function hrTimeToMicroseconds(time) { - return Math.round(time[0] * 1e6 + time[1] / 1e3); -} -exports.hrTimeToMicroseconds = hrTimeToMicroseconds; -/** - * check if time is HrTime - * @param value - */ -function isTimeInputHrTime(value) { - return (Array.isArray(value) && - value.length === 2 && - typeof value[0] === 'number' && - typeof value[1] === 'number'); -} -exports.isTimeInputHrTime = isTimeInputHrTime; -/** - * check if input value is a correct types.TimeInput - * @param value - */ -function isTimeInput(value) { - return (isTimeInputHrTime(value) || - typeof value === 'number' || - value instanceof Date); -} -exports.isTimeInput = isTimeInput; -//# sourceMappingURL=time.js.map - -/***/ }), - -/***/ 43739: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 96154: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.baggageUtils = void 0; -__exportStar(__nccwpck_require__(94069), exports); -__exportStar(__nccwpck_require__(27208), exports); -__exportStar(__nccwpck_require__(80785), exports); -__exportStar(__nccwpck_require__(54212), exports); -__exportStar(__nccwpck_require__(13610), exports); -__exportStar(__nccwpck_require__(43739), exports); -__exportStar(__nccwpck_require__(87797), exports); -__exportStar(__nccwpck_require__(6135), exports); -exports.baggageUtils = __nccwpck_require__(93336); -__exportStar(__nccwpck_require__(13679), exports); -__exportStar(__nccwpck_require__(44842), exports); -__exportStar(__nccwpck_require__(19549), exports); -__exportStar(__nccwpck_require__(93485), exports); -__exportStar(__nccwpck_require__(65150), exports); -__exportStar(__nccwpck_require__(91438), exports); -__exportStar(__nccwpck_require__(77820), exports); -__exportStar(__nccwpck_require__(93502), exports); -__exportStar(__nccwpck_require__(22537), exports); -__exportStar(__nccwpck_require__(81166), exports); -__exportStar(__nccwpck_require__(99872), exports); -__exportStar(__nccwpck_require__(28874), exports); -__exportStar(__nccwpck_require__(49790), exports); -__exportStar(__nccwpck_require__(57701), exports); -__exportStar(__nccwpck_require__(54819), exports); -__exportStar(__nccwpck_require__(5880), exports); -__exportStar(__nccwpck_require__(645), exports); -__exportStar(__nccwpck_require__(6135), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 53135: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateValue = exports.validateKey = void 0; -const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; -const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; -const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; -const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); -const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; -/** - * Key is opaque string up to 256 characters printable. It MUST begin with a - * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, - * underscores _, dashes -, asterisks *, and forward slashes /. - * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the - * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. - * see https://www.w3.org/TR/trace-context/#key - */ -function validateKey(key) { - return VALID_KEY_REGEX.test(key); -} -exports.validateKey = validateKey; -/** - * Value is opaque string up to 256 characters printable ASCII RFC0020 - * characters (i.e., the range 0x20 to 0x7E) except comma , and =. - */ -function validateValue(value) { - return (VALID_VALUE_BASE_REGEX.test(value) && - !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); -} -exports.validateValue = validateValue; -//# sourceMappingURL=validators.js.map - -/***/ }), - -/***/ 13679: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(91991), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 12280: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RandomIdGenerator = void 0; -const SPAN_ID_BYTES = 8; -const TRACE_ID_BYTES = 16; -class RandomIdGenerator { - constructor() { - /** - * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex - * characters corresponding to 128 bits. - */ - this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); - /** - * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex - * characters corresponding to 64 bits. - */ - this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); - } -} -exports.RandomIdGenerator = RandomIdGenerator; -const SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); -function getIdGenerator(bytes) { - return function generateId() { - for (let i = 0; i < bytes / 4; i++) { - // unsigned right shift drops decimal part of the number - // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE - SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4); - } - // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated - for (let i = 0; i < bytes; i++) { - if (SHARED_BUFFER[i] > 0) { - break; - } - else if (i === bytes - 1) { - SHARED_BUFFER[bytes - 1] = 1; - } - } - return SHARED_BUFFER.toString('hex', 0, bytes); - }; -} -//# sourceMappingURL=RandomIdGenerator.js.map - -/***/ }), - -/***/ 54092: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEnv = void 0; -const os = __nccwpck_require__(22037); -const environment_1 = __nccwpck_require__(28874); -/** - * Gets the environment variables - */ -function getEnv() { - const processEnv = (0, environment_1.parseEnvironment)(process.env); - return Object.assign({ - HOSTNAME: os.hostname(), - }, environment_1.DEFAULT_ENVIRONMENT, processEnv); -} -exports.getEnv = getEnv; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 28140: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._globalThis = void 0; -/** only globals that common to node and browsers are allowed */ -// eslint-disable-next-line node/no-unsupported-features/es-builtins -exports._globalThis = typeof globalThis === 'object' ? globalThis : global; -//# sourceMappingURL=globalThis.js.map - -/***/ }), - -/***/ 38862: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hexToBase64 = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function hexToBase64(hexStr) { - const hexStrLen = hexStr.length; - let hexAsciiCharsStr = ''; - for (let i = 0; i < hexStrLen; i += 2) { - const hexPair = hexStr.substring(i, i + 2); - const hexVal = parseInt(hexPair, 16); - hexAsciiCharsStr += String.fromCharCode(hexVal); - } - return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64'); -} -exports.hexToBase64 = hexToBase64; -//# sourceMappingURL=hex-to-base64.js.map - -/***/ }), - -/***/ 91991: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(54092), exports); -__exportStar(__nccwpck_require__(28140), exports); -__exportStar(__nccwpck_require__(38862), exports); -__exportStar(__nccwpck_require__(12280), exports); -__exportStar(__nccwpck_require__(10313), exports); -__exportStar(__nccwpck_require__(38970), exports); -__exportStar(__nccwpck_require__(39979), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 10313: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.otperformance = void 0; -const perf_hooks_1 = __nccwpck_require__(4074); -exports.otperformance = perf_hooks_1.performance; -//# sourceMappingURL=performance.js.map - -/***/ }), - -/***/ 38970: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SDK_INFO = void 0; -const version_1 = __nccwpck_require__(6135); -const semantic_conventions_1 = __nccwpck_require__(82266); -/** Constants describing the SDK in use */ -exports.SDK_INFO = { - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node', - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS, - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION, -}; -//# sourceMappingURL=sdk-info.js.map - -/***/ }), - -/***/ 39979: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unrefTimer = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function unrefTimer(timer) { - timer.unref(); -} -exports.unrefTimer = unrefTimer; -//# sourceMappingURL=timer-util.js.map - -/***/ }), - -/***/ 44842: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CompositePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -/** Combines multiple propagators into a single propagator. */ -class CompositePropagator { - /** - * Construct a composite propagator from a list of propagators. - * - * @param [config] Configuration object for composite propagator - */ - constructor(config = {}) { - var _a; - this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : []; - this._fields = Array.from(new Set(this._propagators - // older propagators may not have fields function, null check to be sure - .map(p => (typeof p.fields === 'function' ? p.fields() : [])) - .reduce((x, y) => x.concat(y), []))); - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same carrier key, the propagator later in the list - * will "win". - * - * @param context Context to inject - * @param carrier Carrier into which context will be injected - */ - inject(context, carrier, setter) { - for (const propagator of this._propagators) { - try { - propagator.inject(context, carrier, setter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - } - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same context key, the propagator later in the list - * will "win". - * - * @param context Context to add values to - * @param carrier Carrier from which to extract context - */ - extract(context, carrier, getter) { - return this._propagators.reduce((ctx, propagator) => { - try { - return propagator.extract(ctx, carrier, getter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - return ctx; - }, context); - } - fields() { - // return a new array so our fields cannot be modified - return this._fields.slice(); - } -} -exports.CompositePropagator = CompositePropagator; -//# sourceMappingURL=composite.js.map - -/***/ }), - -/***/ 93485: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=IdGenerator.js.map - -/***/ }), - -/***/ 99872: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceState = void 0; -const validators_1 = __nccwpck_require__(53135); -const MAX_TRACE_STATE_ITEMS = 32; -const MAX_TRACE_STATE_LEN = 512; -const LIST_MEMBERS_SEPARATOR = ','; -const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; -/** - * TraceState must be a class and not a simple object type because of the spec - * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). - * - * Here is the list of allowed mutations: - * - New key-value pair should be added into the beginning of the list - * - The value of any key can be updated. Modified keys MUST be moved to the - * beginning of the list. - */ -class TraceState { - constructor(rawTraceState) { - this._internalState = new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - set(key, value) { - // TODO: Benchmark the different approaches(map vs list) and - // use the faster one. - const traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); - } - traceState._internalState.set(key, value); - return traceState; - } - unset(key) { - const traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - } - get(key) { - return this._internalState.get(key); - } - serialize() { - return this._keys() - .reduce((agg, key) => { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); - return agg; - }, []) - .join(LIST_MEMBERS_SEPARATOR); - } - _parse(rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN) - return; - this._internalState = rawTraceState - .split(LIST_MEMBERS_SEPARATOR) - .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning - .reduce((agg, part) => { - const listMember = part.trim(); // Optional Whitespace (OWS) handling - const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); - if (i !== -1) { - const key = listMember.slice(0, i); - const value = listMember.slice(i + 1, part.length); - if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) { - agg.set(key, value); - } - else { - // TODO: Consider to add warning log - } - } - return agg; - }, new Map()); - // Because of the reverse() requirement, trunc must be done after map is created - if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { - this._internalState = new Map(Array.from(this._internalState.entries()) - .reverse() // Use reverse same as original tracestate parse chain - .slice(0, MAX_TRACE_STATE_ITEMS)); - } - } - _keys() { - return Array.from(this._internalState.keys()).reverse(); - } - _clone() { - const traceState = new TraceState(); - traceState._internalState = new Map(this._internalState); - return traceState; - } -} -exports.TraceState = TraceState; -//# sourceMappingURL=TraceState.js.map - -/***/ }), - -/***/ 19549: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(81166); -const TraceState_1 = __nccwpck_require__(99872); -exports.TRACE_PARENT_HEADER = 'traceparent'; -exports.TRACE_STATE_HEADER = 'tracestate'; -const VERSION = '00'; -const VERSION_PART = '(?!ff)[\\da-f]{2}'; -const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}'; -const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}'; -const FLAGS_PART = '[\\da-f]{2}'; -const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`); -/** - * Parses information from the [traceparent] span tag and converts it into {@link SpanContext} - * @param traceParent - A meta property that comes from server. - * It should be dynamically generated server side to have the server's request trace Id, - * a parent span Id that was set on the server's request span, - * and the trace flags to indicate the server's sampling decision - * (01 = sampled, 00 = not sampled). - * for example: '{version}-{traceId}-{spanId}-{sampleDecision}' - * For more information see {@link https://www.w3.org/TR/trace-context/} - */ -function parseTraceParent(traceParent) { - const match = TRACE_PARENT_REGEX.exec(traceParent); - if (!match) - return null; - // According to the specification the implementation should be compatible - // with future versions. If there are more parts, we only reject it if it's using version 00 - // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent - if (match[1] === '00' && match[5]) - return null; - return { - traceId: match[2], - spanId: match[3], - traceFlags: parseInt(match[4], 16), - }; -} -exports.parseTraceParent = parseTraceParent; -/** - * Propagates {@link SpanContext} through Trace Context format propagation. - * - * Based on the Trace Context specification: - * https://www.w3.org/TR/trace-context/ - */ -class W3CTraceContextPropagator { - inject(context, carrier, setter) { - const spanContext = api_1.trace.getSpanContext(context); - if (!spanContext || - (0, suppress_tracing_1.isTracingSuppressed)(context) || - !(0, api_1.isSpanContextValid)(spanContext)) - return; - const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`; - setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent); - if (spanContext.traceState) { - setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize()); - } - } - extract(context, carrier, getter) { - const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER); - if (!traceParentHeader) - return context; - const traceParent = Array.isArray(traceParentHeader) - ? traceParentHeader[0] - : traceParentHeader; - if (typeof traceParent !== 'string') - return context; - const spanContext = parseTraceParent(traceParent); - if (!spanContext) - return context; - spanContext.isRemote = true; - const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER); - if (traceStateHeader) { - // If more than one `tracestate` header is found, we merge them into a - // single header. - const state = Array.isArray(traceStateHeader) - ? traceStateHeader.join(',') - : traceStateHeader; - spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined); - } - return api_1.trace.setSpanContext(context, spanContext); - } - fields() { - return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER]; - } -} -exports.W3CTraceContextPropagator = W3CTraceContextPropagator; -//# sourceMappingURL=W3CTraceContextPropagator.js.map - -/***/ }), - -/***/ 65150: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0; -const api_1 = __nccwpck_require__(65163); -const RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA'); -var RPCType; -(function (RPCType) { - RPCType["HTTP"] = "http"; -})(RPCType = exports.RPCType || (exports.RPCType = {})); -function setRPCMetadata(context, meta) { - return context.setValue(RPC_METADATA_KEY, meta); -} -exports.setRPCMetadata = setRPCMetadata; -function deleteRPCMetadata(context) { - return context.deleteValue(RPC_METADATA_KEY); -} -exports.deleteRPCMetadata = deleteRPCMetadata; -function getRPCMetadata(context) { - return context.getValue(RPC_METADATA_KEY); -} -exports.getRPCMetadata = getRPCMetadata; -//# sourceMappingURL=rpc-metadata.js.map - -/***/ }), - -/***/ 91438: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOffSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples no traces. */ -class AlwaysOffSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.NOT_RECORD, - }; - } - toString() { - return 'AlwaysOffSampler'; - } -} -exports.AlwaysOffSampler = AlwaysOffSampler; -//# sourceMappingURL=AlwaysOffSampler.js.map - -/***/ }), - -/***/ 77820: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOnSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples all traces. */ -class AlwaysOnSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.RECORD_AND_SAMPLED, - }; - } - toString() { - return 'AlwaysOnSampler'; - } -} -exports.AlwaysOnSampler = AlwaysOnSampler; -//# sourceMappingURL=AlwaysOnSampler.js.map - -/***/ }), - -/***/ 93502: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ParentBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -const global_error_handler_1 = __nccwpck_require__(80785); -const AlwaysOffSampler_1 = __nccwpck_require__(91438); -const AlwaysOnSampler_1 = __nccwpck_require__(77820); -/** - * A composite sampler that either respects the parent span's sampling decision - * or delegates to `delegateSampler` for root spans. - */ -class ParentBasedSampler { - constructor(config) { - var _a, _b, _c, _d; - this._root = config.root; - if (!this._root) { - (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured')); - this._root = new AlwaysOnSampler_1.AlwaysOnSampler(); - } - this._remoteParentSampled = - (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._remoteParentNotSampled = - (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler(); - this._localParentSampled = - (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._localParentNotSampled = - (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler(); - } - shouldSample(context, traceId, spanName, spanKind, attributes, links) { - const parentContext = api_1.trace.getSpanContext(context); - if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) { - return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.isRemote) { - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - toString() { - return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`; - } -} -exports.ParentBasedSampler = ParentBasedSampler; -//# sourceMappingURL=ParentBasedSampler.js.map - -/***/ }), - -/***/ 22537: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceIdRatioBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples a given fraction of traces based of trace id deterministically. */ -class TraceIdRatioBasedSampler { - constructor(_ratio = 0) { - this._ratio = _ratio; - this._ratio = this._normalize(_ratio); - this._upperBound = Math.floor(this._ratio * 0xffffffff); - } - shouldSample(context, traceId) { - return { - decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound - ? api_1.SamplingDecision.RECORD_AND_SAMPLED - : api_1.SamplingDecision.NOT_RECORD, - }; - } - toString() { - return `TraceIdRatioBased{${this._ratio}}`; - } - _normalize(ratio) { - if (typeof ratio !== 'number' || isNaN(ratio)) - return 0; - return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; - } - _accumulate(traceId) { - let accumulation = 0; - for (let i = 0; i < traceId.length / 8; i++) { - const pos = i * 8; - const part = parseInt(traceId.slice(pos, pos + 8), 16); - accumulation = (accumulation ^ part) >>> 0; - } - return accumulation; - } -} -exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; -//# sourceMappingURL=TraceIdRatioBasedSampler.js.map - -/***/ }), - -/***/ 81166: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0; -const api_1 = __nccwpck_require__(65163); -const SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING'); -function suppressTracing(context) { - return context.setValue(SUPPRESS_TRACING_KEY, true); -} -exports.suppressTracing = suppressTracing; -function unsuppressTracing(context) { - return context.deleteValue(SUPPRESS_TRACING_KEY); -} -exports.unsuppressTracing = unsuppressTracing; -function isTracingSuppressed(context) { - return context.getValue(SUPPRESS_TRACING_KEY) === true; -} -exports.isTracingSuppressed = isTracingSuppressed; -//# sourceMappingURL=suppress-tracing.js.map - -/***/ }), - -/***/ 645: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BindOnceFuture = void 0; -const promise_1 = __nccwpck_require__(20908); -/** - * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked. - */ -class BindOnceFuture { - constructor(_callback, _that) { - this._callback = _callback; - this._that = _that; - this._isCalled = false; - this._deferred = new promise_1.Deferred(); - } - get isCalled() { - return this._isCalled; - } - get promise() { - return this._deferred.promise; - } - call(...args) { - if (!this._isCalled) { - this._isCalled = true; - try { - Promise.resolve(this._callback.call(this._that, ...args)) - .then(val => this._deferred.resolve(val), err => this._deferred.reject(err)); - } - catch (err) { - this._deferred.reject(err); - } - } - return this._deferred.promise; - } -} -exports.BindOnceFuture = BindOnceFuture; -//# sourceMappingURL=callback.js.map - -/***/ }), - -/***/ 28874: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0; -const api_1 = __nccwpck_require__(65163); -const sampling_1 = __nccwpck_require__(57701); -const DEFAULT_LIST_SEPARATOR = ','; -/** - * Environment interface to define all names - */ -const ENVIRONMENT_NUMBERS_KEYS = [ - 'OTEL_BSP_EXPORT_TIMEOUT', - 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE', - 'OTEL_BSP_MAX_QUEUE_SIZE', - 'OTEL_BSP_SCHEDULE_DELAY', - 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_EVENT_COUNT_LIMIT', - 'OTEL_SPAN_LINK_COUNT_LIMIT', - 'OTEL_EXPORTER_JAEGER_AGENT_PORT', -]; -function isEnvVarANumber(key) { - return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1); -} -const ENVIRONMENT_LISTS_KEYS = [ - 'OTEL_NO_PATCH_MODULES', - 'OTEL_PROPAGATORS', -]; -function isEnvVarAList(key) { - return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1; -} -exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity; -exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128; -/** - * Default environment variables - */ -exports.DEFAULT_ENVIRONMENT = { - CONTAINER_NAME: '', - ECS_CONTAINER_METADATA_URI_V4: '', - ECS_CONTAINER_METADATA_URI: '', - HOSTNAME: '', - KUBERNETES_SERVICE_HOST: '', - NAMESPACE: '', - OTEL_BSP_EXPORT_TIMEOUT: 30000, - OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512, - OTEL_BSP_MAX_QUEUE_SIZE: 2048, - OTEL_BSP_SCHEDULE_DELAY: 5000, - OTEL_EXPORTER_JAEGER_AGENT_HOST: '', - OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832, - OTEL_EXPORTER_JAEGER_ENDPOINT: '', - OTEL_EXPORTER_JAEGER_PASSWORD: '', - OTEL_EXPORTER_JAEGER_USER: '', - OTEL_EXPORTER_OTLP_ENDPOINT: '', - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '', - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '', - OTEL_EXPORTER_OTLP_HEADERS: '', - OTEL_EXPORTER_OTLP_TRACES_HEADERS: '', - OTEL_EXPORTER_OTLP_METRICS_HEADERS: '', - OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans', - OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO, - OTEL_NO_PATCH_MODULES: [], - OTEL_PROPAGATORS: ['tracecontext', 'baggage'], - OTEL_RESOURCE_ATTRIBUTES: '', - OTEL_SERVICE_NAME: '', - OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_EVENT_COUNT_LIMIT: 128, - OTEL_SPAN_LINK_COUNT_LIMIT: 128, - OTEL_TRACES_EXPORTER: 'none', - OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn, - OTEL_TRACES_SAMPLER_ARG: '', - OTEL_EXPORTER_OTLP_COMPRESSION: '', - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '', - OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '' -}; -/** - * Parses a variable as number with number validation - * @param name - * @param environment - * @param values - * @param min - * @param max - */ -function parseNumber(name, environment, values, min = -Infinity, max = Infinity) { - if (typeof values[name] !== 'undefined') { - const value = Number(values[name]); - if (!isNaN(value)) { - if (value < min) { - environment[name] = min; - } - else if (value > max) { - environment[name] = max; - } - else { - environment[name] = value; - } - } - } -} -/** - * Parses list-like strings from input into output. - * @param name - * @param environment - * @param values - * @param separator - */ -function parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) { - const givenValue = input[name]; - if (typeof givenValue === 'string') { - output[name] = givenValue.split(separator).map(v => v.trim()); - } -} -// The support string -> DiagLogLevel mappings -const logLevelMap = { - ALL: api_1.DiagLogLevel.ALL, - VERBOSE: api_1.DiagLogLevel.VERBOSE, - DEBUG: api_1.DiagLogLevel.DEBUG, - INFO: api_1.DiagLogLevel.INFO, - WARN: api_1.DiagLogLevel.WARN, - ERROR: api_1.DiagLogLevel.ERROR, - NONE: api_1.DiagLogLevel.NONE, -}; -/** - * Environmentally sets log level if valid log level string is provided - * @param key - * @param environment - * @param values - */ -function setLogLevelFromEnv(key, environment, values) { - const value = values[key]; - if (typeof value === 'string') { - const theLevel = logLevelMap[value.toUpperCase()]; - if (theLevel != null) { - environment[key] = theLevel; - } - } -} -/** - * Parses environment values - * @param values - */ -function parseEnvironment(values) { - const environment = {}; - for (const env in exports.DEFAULT_ENVIRONMENT) { - const key = env; - switch (key) { - case 'OTEL_LOG_LEVEL': - setLogLevelFromEnv(key, environment, values); - break; - default: - if (isEnvVarANumber(key)) { - parseNumber(key, environment, values); - } - else if (isEnvVarAList(key)) { - parseStringList(key, environment, values); - } - else { - const value = values[key]; - if (typeof value !== 'undefined' && value !== null) { - environment[key] = String(value); - } - } - } - } - return environment; -} -exports.parseEnvironment = parseEnvironment; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 67321: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPlainObject = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * based on lodash in order to support esm builds without esModuleInterop. - * lodash is using MIT License. - **/ -const objectTag = '[object Object]'; -const nullTag = '[object Null]'; -const undefinedTag = '[object Undefined]'; -const funcProto = Function.prototype; -const funcToString = funcProto.toString; -const objectCtorString = funcToString.call(Object); -const getPrototype = overArg(Object.getPrototypeOf, Object); -const objectProto = Object.prototype; -const hasOwnProperty = objectProto.hasOwnProperty; -const symToStringTag = Symbol ? Symbol.toStringTag : undefined; -const nativeObjectToString = objectProto.toString; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function (arg) { - return func(transform(arg)); - }; -} -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) !== objectTag) { - return false; - } - const proto = getPrototype(value); - if (proto === null) { - return true; - } - const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) === objectCtorString; -} -exports.isPlainObject = isPlainObject; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; - let unmasked = false; - try { - value[symToStringTag] = undefined; - unmasked = true; - } - catch (e) { - // silence - } - const result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } - else { - delete value[symToStringTag]; - } - } - return result; -} -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} -//# sourceMappingURL=lodash.merge.js.map - -/***/ }), - -/***/ 49790: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.merge = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -const lodash_merge_1 = __nccwpck_require__(67321); -const MAX_LEVEL = 20; -/** - * Merges objects together - * @param args - objects / values to be merged - */ -function merge(...args) { - let result = args.shift(); - const objects = new WeakMap(); - while (args.length > 0) { - result = mergeTwoObjects(result, args.shift(), 0, objects); - } - return result; -} -exports.merge = merge; -function takeValue(value) { - if (isArray(value)) { - return value.slice(); - } - return value; -} -/** - * Merges two objects - * @param one - first object - * @param two - second object - * @param level - current deep level - * @param objects - objects holder that has been already referenced - to prevent - * cyclic dependency - */ -function mergeTwoObjects(one, two, level = 0, objects) { - let result; - if (level > MAX_LEVEL) { - return undefined; - } - level++; - if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) { - result = takeValue(two); - } - else if (isArray(one)) { - result = one.slice(); - if (isArray(two)) { - for (let i = 0, j = two.length; i < j; i++) { - result.push(takeValue(two[i])); - } - } - else if (isObject(two)) { - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - result[key] = takeValue(two[key]); - } - } - } - else if (isObject(one)) { - if (isObject(two)) { - if (!shouldMerge(one, two)) { - return two; - } - result = Object.assign({}, one); - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - const twoValue = two[key]; - if (isPrimitive(twoValue)) { - if (typeof twoValue === 'undefined') { - delete result[key]; - } - else { - // result[key] = takeValue(twoValue); - result[key] = twoValue; - } - } - else { - const obj1 = result[key]; - const obj2 = twoValue; - if (wasObjectReferenced(one, key, objects) || - wasObjectReferenced(two, key, objects)) { - delete result[key]; - } - else { - if (isObject(obj1) && isObject(obj2)) { - const arr1 = objects.get(obj1) || []; - const arr2 = objects.get(obj2) || []; - arr1.push({ obj: one, key }); - arr2.push({ obj: two, key }); - objects.set(obj1, arr1); - objects.set(obj2, arr2); - } - result[key] = mergeTwoObjects(result[key], twoValue, level, objects); - } - } - } - } - else { - result = two; - } - } - return result; -} -/** - * Function to check if object has been already reference - * @param obj - * @param key - * @param objects - */ -function wasObjectReferenced(obj, key, objects) { - const arr = objects.get(obj[key]) || []; - for (let i = 0, j = arr.length; i < j; i++) { - const info = arr[i]; - if (info.key === key && info.obj === obj) { - return true; - } - } - return false; -} -function isArray(value) { - return Array.isArray(value); -} -function isFunction(value) { - return typeof value === 'function'; -} -function isObject(value) { - return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object'; -} -function isPrimitive(value) { - return typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean' || - typeof value === 'undefined' || - value instanceof Date || - value instanceof RegExp || - value === null; -} -function shouldMerge(one, two) { - if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) { - return false; - } - return true; -} -//# sourceMappingURL=merge.js.map - -/***/ }), - -/***/ 20908: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Deferred = void 0; -class Deferred { - constructor() { - this._promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - }); - } - get promise() { - return this._promise; - } - resolve(val) { - this._resolve(val); - } - reject(err) { - this._reject(err); - } -} -exports.Deferred = Deferred; -//# sourceMappingURL=promise.js.map - -/***/ }), - -/***/ 57701: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TracesSamplerValues = void 0; -var TracesSamplerValues; -(function (TracesSamplerValues) { - TracesSamplerValues["AlwaysOff"] = "always_off"; - TracesSamplerValues["AlwaysOn"] = "always_on"; - TracesSamplerValues["ParentBasedAlwaysOff"] = "parentbased_always_off"; - TracesSamplerValues["ParentBasedAlwaysOn"] = "parentbased_always_on"; - TracesSamplerValues["ParentBasedTraceIdRatio"] = "parentbased_traceidratio"; - TracesSamplerValues["TraceIdRatio"] = "traceidratio"; -})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {})); -//# sourceMappingURL=sampling.js.map - -/***/ }), - -/***/ 54819: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isUrlIgnored = exports.urlMatches = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function urlMatches(url, urlToMatch) { - if (typeof urlToMatch === 'string') { - return url === urlToMatch; - } - else { - return !!url.match(urlToMatch); - } -} -exports.urlMatches = urlMatches; -/** - * Check if {@param url} should be ignored when comparing against {@param ignoredUrls} - * @param url - * @param ignoredUrls - */ -function isUrlIgnored(url, ignoredUrls) { - if (!ignoredUrls) { - return false; - } - for (const ignoreUrl of ignoredUrls) { - if (urlMatches(url, ignoreUrl)) { - return true; - } - } - return false; -} -exports.isUrlIgnored = isUrlIgnored; -//# sourceMappingURL=url.js.map - -/***/ }), - -/***/ 5880: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isWrapped = void 0; -/** - * Checks if certain function has been already wrapped - * @param func - */ -function isWrapped(func) { - return (typeof func === 'function' && - typeof func.__original === 'function' && - typeof func.__unwrap === 'function' && - func.__wrapped === true); -} -exports.isWrapped = isWrapped; -//# sourceMappingURL=wrap.js.map - -/***/ }), - -/***/ 6135: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VERSION = void 0; -// this is autogenerated file, see scripts/version-update.js -exports.VERSION = '1.1.1'; -//# sourceMappingURL=version.js.map - -/***/ }), - -/***/ 82266: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(31440), exports); -__exportStar(__nccwpck_require__(13438), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 59337: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticResourceAttributes = { - /** - * Name of the cloud provider. - */ - CLOUD_PROVIDER: 'cloud.provider', - /** - * The cloud account ID the resource is assigned to. - */ - CLOUD_ACCOUNT_ID: 'cloud.account.id', - /** - * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations). - */ - CLOUD_REGION: 'cloud.region', - /** - * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. - * - * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. - */ - CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone', - /** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - */ - CLOUD_PLATFORM: 'cloud.platform', - /** - * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - */ - AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn', - /** - * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - */ - AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn', - /** - * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - */ - AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype', - /** - * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). - */ - AWS_ECS_TASK_ARN: 'aws.ecs.task.arn', - /** - * The task definition family this task definition is a member of. - */ - AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family', - /** - * The revision for this task definition. - */ - AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision', - /** - * The ARN of an EKS cluster. - */ - AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn', - /** - * The name(s) of the AWS log group(s) an application is writing to. - * - * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. - */ - AWS_LOG_GROUP_NAMES: 'aws.log.group.names', - /** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * - * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - */ - AWS_LOG_GROUP_ARNS: 'aws.log.group.arns', - /** - * The name(s) of the AWS log stream(s) an application is writing to. - */ - AWS_LOG_STREAM_NAMES: 'aws.log.stream.names', - /** - * The ARN(s) of the AWS log stream(s). - * - * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. - */ - AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns', - /** - * Container name. - */ - CONTAINER_NAME: 'container.name', - /** - * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. - */ - CONTAINER_ID: 'container.id', - /** - * The container runtime managing this container. - */ - CONTAINER_RUNTIME: 'container.runtime', - /** - * Name of the image the container was built on. - */ - CONTAINER_IMAGE_NAME: 'container.image.name', - /** - * Container image tag. - */ - CONTAINER_IMAGE_TAG: 'container.image.tag', - /** - * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). - */ - DEPLOYMENT_ENVIRONMENT: 'deployment.environment', - /** - * A unique identifier representing the device. - * - * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. - */ - DEVICE_ID: 'device.id', - /** - * The model identifier for the device. - * - * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. - */ - DEVICE_MODEL_IDENTIFIER: 'device.model.identifier', - /** - * The marketing name for the device model. - * - * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. - */ - DEVICE_MODEL_NAME: 'device.model.name', - /** - * The name of the single function that this runtime instance executes. - * - * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes). - */ - FAAS_NAME: 'faas.name', - /** - * The unique ID of the single function that this runtime instance executes. - * - * Note: Depending on the cloud provider, use: - - * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - Take care not to use the "invoked ARN" directly but replace any - [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple - different aliases. - * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) - * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id). - - On some providers, it may not be possible to determine the full ID at startup, - which is why this field cannot be made required. For example, on AWS the account ID - part of the ARN is not available without calling another AWS API - which may be deemed too slow for a short-running lambda function. - As an alternative, consider setting `faas.id` as a span attribute instead. - */ - FAAS_ID: 'faas.id', - /** - * The immutable version of the function being executed. - * - * Note: Depending on the cloud provider and platform, use: - - * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - (an integer represented as a decimal string). - * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) - (i.e., the function name plus the revision suffix). - * **Google Cloud Functions:** The value of the - [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - * **Azure Functions:** Not applicable. Do not set this attribute. - */ - FAAS_VERSION: 'faas.version', - /** - * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. - * - * Note: * **AWS Lambda:** Use the (full) log stream name. - */ - FAAS_INSTANCE: 'faas.instance', - /** - * The amount of memory available to the serverless function in MiB. - * - * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. - */ - FAAS_MAX_MEMORY: 'faas.max_memory', - /** - * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. - */ - HOST_ID: 'host.id', - /** - * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. - */ - HOST_NAME: 'host.name', - /** - * Type of host. For Cloud, this must be the machine type. - */ - HOST_TYPE: 'host.type', - /** - * The CPU architecture the host system is running on. - */ - HOST_ARCH: 'host.arch', - /** - * Name of the VM image or OS install the host was instantiated from. - */ - HOST_IMAGE_NAME: 'host.image.name', - /** - * VM image ID. For Cloud, this value is from the provider. - */ - HOST_IMAGE_ID: 'host.image.id', - /** - * The version string of the VM image as defined in [Version Attributes](README.md#version-attributes). - */ - HOST_IMAGE_VERSION: 'host.image.version', - /** - * The name of the cluster. - */ - K8S_CLUSTER_NAME: 'k8s.cluster.name', - /** - * The name of the Node. - */ - K8S_NODE_NAME: 'k8s.node.name', - /** - * The UID of the Node. - */ - K8S_NODE_UID: 'k8s.node.uid', - /** - * The name of the namespace that the pod is running in. - */ - K8S_NAMESPACE_NAME: 'k8s.namespace.name', - /** - * The UID of the Pod. - */ - K8S_POD_UID: 'k8s.pod.uid', - /** - * The name of the Pod. - */ - K8S_POD_NAME: 'k8s.pod.name', - /** - * The name of the Container in a Pod template. - */ - K8S_CONTAINER_NAME: 'k8s.container.name', - /** - * The UID of the ReplicaSet. - */ - K8S_REPLICASET_UID: 'k8s.replicaset.uid', - /** - * The name of the ReplicaSet. - */ - K8S_REPLICASET_NAME: 'k8s.replicaset.name', - /** - * The UID of the Deployment. - */ - K8S_DEPLOYMENT_UID: 'k8s.deployment.uid', - /** - * The name of the Deployment. - */ - K8S_DEPLOYMENT_NAME: 'k8s.deployment.name', - /** - * The UID of the StatefulSet. - */ - K8S_STATEFULSET_UID: 'k8s.statefulset.uid', - /** - * The name of the StatefulSet. - */ - K8S_STATEFULSET_NAME: 'k8s.statefulset.name', - /** - * The UID of the DaemonSet. - */ - K8S_DAEMONSET_UID: 'k8s.daemonset.uid', - /** - * The name of the DaemonSet. - */ - K8S_DAEMONSET_NAME: 'k8s.daemonset.name', - /** - * The UID of the Job. - */ - K8S_JOB_UID: 'k8s.job.uid', - /** - * The name of the Job. - */ - K8S_JOB_NAME: 'k8s.job.name', - /** - * The UID of the CronJob. - */ - K8S_CRONJOB_UID: 'k8s.cronjob.uid', - /** - * The name of the CronJob. - */ - K8S_CRONJOB_NAME: 'k8s.cronjob.name', - /** - * The operating system type. - */ - OS_TYPE: 'os.type', - /** - * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. - */ - OS_DESCRIPTION: 'os.description', - /** - * Human readable operating system name. - */ - OS_NAME: 'os.name', - /** - * The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes). - */ - OS_VERSION: 'os.version', - /** - * Process identifier (PID). - */ - PROCESS_PID: 'process.pid', - /** - * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_NAME: 'process.executable.name', - /** - * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_PATH: 'process.executable.path', - /** - * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. - */ - PROCESS_COMMAND: 'process.command', - /** - * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. - */ - PROCESS_COMMAND_LINE: 'process.command_line', - /** - * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. - */ - PROCESS_COMMAND_ARGS: 'process.command_args', - /** - * The username of the user that owns the process. - */ - PROCESS_OWNER: 'process.owner', - /** - * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. - */ - PROCESS_RUNTIME_NAME: 'process.runtime.name', - /** - * The version of the runtime of this process, as returned by the runtime without modification. - */ - PROCESS_RUNTIME_VERSION: 'process.runtime.version', - /** - * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. - */ - PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description', - /** - * Logical name of the service. - * - * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. - */ - SERVICE_NAME: 'service.name', - /** - * A namespace for `service.name`. - * - * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. - */ - SERVICE_NAMESPACE: 'service.namespace', - /** - * The string ID of the service instance. - * - * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). - */ - SERVICE_INSTANCE_ID: 'service.instance.id', - /** - * The version string of the service API or implementation. - */ - SERVICE_VERSION: 'service.version', - /** - * The name of the telemetry SDK as defined above. - */ - TELEMETRY_SDK_NAME: 'telemetry.sdk.name', - /** - * The language of the telemetry SDK. - */ - TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language', - /** - * The version string of the telemetry SDK. - */ - TELEMETRY_SDK_VERSION: 'telemetry.sdk.version', - /** - * The version string of the auto instrumentation agent, if used. - */ - TELEMETRY_AUTO_VERSION: 'telemetry.auto.version', - /** - * The name of the web engine. - */ - WEBENGINE_NAME: 'webengine.name', - /** - * The version of the web engine. - */ - WEBENGINE_VERSION: 'webengine.version', - /** - * Additional description of the web engine (e.g. detailed version and edition information). - */ - WEBENGINE_DESCRIPTION: 'webengine.description', -}; -exports.CloudProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.CloudPlatformValues = { - /** Alibaba Cloud Elastic Compute Service. */ - ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs', - /** Alibaba Cloud Function Compute. */ - ALIBABA_CLOUD_FC: 'alibaba_cloud_fc', - /** AWS Elastic Compute Cloud. */ - AWS_EC2: 'aws_ec2', - /** AWS Elastic Container Service. */ - AWS_ECS: 'aws_ecs', - /** AWS Elastic Kubernetes Service. */ - AWS_EKS: 'aws_eks', - /** AWS Lambda. */ - AWS_LAMBDA: 'aws_lambda', - /** AWS Elastic Beanstalk. */ - AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk', - /** Azure Virtual Machines. */ - AZURE_VM: 'azure_vm', - /** Azure Container Instances. */ - AZURE_CONTAINER_INSTANCES: 'azure_container_instances', - /** Azure Kubernetes Service. */ - AZURE_AKS: 'azure_aks', - /** Azure Functions. */ - AZURE_FUNCTIONS: 'azure_functions', - /** Azure App Service. */ - AZURE_APP_SERVICE: 'azure_app_service', - /** Google Cloud Compute Engine (GCE). */ - GCP_COMPUTE_ENGINE: 'gcp_compute_engine', - /** Google Cloud Run. */ - GCP_CLOUD_RUN: 'gcp_cloud_run', - /** Google Cloud Kubernetes Engine (GKE). */ - GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine', - /** Google Cloud Functions (GCF). */ - GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions', - /** Google Cloud App Engine (GAE). */ - GCP_APP_ENGINE: 'gcp_app_engine', -}; -exports.AwsEcsLaunchtypeValues = { - /** ec2. */ - EC2: 'ec2', - /** fargate. */ - FARGATE: 'fargate', -}; -exports.HostArchValues = { - /** AMD64. */ - AMD64: 'amd64', - /** ARM32. */ - ARM32: 'arm32', - /** ARM64. */ - ARM64: 'arm64', - /** Itanium. */ - IA64: 'ia64', - /** 32-bit PowerPC. */ - PPC32: 'ppc32', - /** 64-bit PowerPC. */ - PPC64: 'ppc64', - /** 32-bit x86. */ - X86: 'x86', -}; -exports.OsTypeValues = { - /** Microsoft Windows. */ - WINDOWS: 'windows', - /** Linux. */ - LINUX: 'linux', - /** Apple Darwin. */ - DARWIN: 'darwin', - /** FreeBSD. */ - FREEBSD: 'freebsd', - /** NetBSD. */ - NETBSD: 'netbsd', - /** OpenBSD. */ - OPENBSD: 'openbsd', - /** DragonFly BSD. */ - DRAGONFLYBSD: 'dragonflybsd', - /** HP-UX (Hewlett Packard Unix). */ - HPUX: 'hpux', - /** AIX (Advanced Interactive eXecutive). */ - AIX: 'aix', - /** Oracle Solaris. */ - SOLARIS: 'solaris', - /** IBM z/OS. */ - Z_OS: 'z_os', -}; -exports.TelemetrySdkLanguageValues = { - /** cpp. */ - CPP: 'cpp', - /** dotnet. */ - DOTNET: 'dotnet', - /** erlang. */ - ERLANG: 'erlang', - /** go. */ - GO: 'go', - /** java. */ - JAVA: 'java', - /** nodejs. */ - NODEJS: 'nodejs', - /** php. */ - PHP: 'php', - /** python. */ - PYTHON: 'python', - /** ruby. */ - RUBY: 'ruby', - /** webjs. */ - WEBJS: 'webjs', -}; -//# sourceMappingURL=SemanticResourceAttributes.js.map - -/***/ }), - -/***/ 13438: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(59337), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 21804: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticAttributes = { - /** - * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). - * - * Note: This may be different from `faas.id` if an alias is involved. - */ - AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn', - /** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - */ - DB_SYSTEM: 'db.system', - /** - * The connection string used to connect to the database. It is recommended to remove embedded credentials. - */ - DB_CONNECTION_STRING: 'db.connection_string', - /** - * Username for accessing the database. - */ - DB_USER: 'db.user', - /** - * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. - */ - DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname', - /** - * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). - * - * Note: In some SQL databases, the database name to be used is called "schema name". - */ - DB_NAME: 'db.name', - /** - * The database statement being executed. - * - * Note: The value may be sanitized to exclude sensitive information. - */ - DB_STATEMENT: 'db.statement', - /** - * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. - * - * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. - */ - DB_OPERATION: 'db.operation', - /** - * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. - * - * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). - */ - DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name', - /** - * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace', - /** - * The fetch size used for paging, i.e. how many rows will be returned at once. - */ - DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size', - /** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - */ - DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_CASSANDRA_TABLE: 'db.cassandra.table', - /** - * Whether or not the query is idempotent. - */ - DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence', - /** - * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. - */ - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count', - /** - * The ID of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id', - /** - * The data center of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc', - /** - * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_HBASE_NAMESPACE: 'db.hbase.namespace', - /** - * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. - */ - DB_REDIS_DATABASE_INDEX: 'db.redis.database_index', - /** - * The collection being accessed within the database stated in `db.name`. - */ - DB_MONGODB_COLLECTION: 'db.mongodb.collection', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_SQL_TABLE: 'db.sql.table', - /** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. - */ - EXCEPTION_TYPE: 'exception.type', - /** - * The exception message. - */ - EXCEPTION_MESSAGE: 'exception.message', - /** - * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - */ - EXCEPTION_STACKTRACE: 'exception.stacktrace', - /** - * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. - * - * Note: An exception is considered to have escaped (or left) the scope of a span, - if that span is ended while the exception is still logically "in flight". - This may be actually "in flight" in some languages (e.g. if the exception - is passed to a Context manager's `__exit__` method in Python) but will - usually be caught at the point of recording the exception in most languages. - - It is usually not possible to determine at the point where an exception is thrown - whether it will escape the scope of a span. - However, it is trivial to know that an exception - will escape, if one checks for an active exception just before ending the span, - as done in the [example above](#exception-end-example). - - It follows that an exception may still escape the scope of the span - even if the `exception.escaped` attribute was not set or set to false, - since the event might have been recorded at a time where it was not - clear whether the exception will escape. - */ - EXCEPTION_ESCAPED: 'exception.escaped', - /** - * Type of the trigger on which the function is executed. - */ - FAAS_TRIGGER: 'faas.trigger', - /** - * The execution ID of the current function execution. - */ - FAAS_EXECUTION: 'faas.execution', - /** - * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - */ - FAAS_DOCUMENT_COLLECTION: 'faas.document.collection', - /** - * Describes the type of the operation that was performed on the data. - */ - FAAS_DOCUMENT_OPERATION: 'faas.document.operation', - /** - * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_DOCUMENT_TIME: 'faas.document.time', - /** - * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. - */ - FAAS_DOCUMENT_NAME: 'faas.document.name', - /** - * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_TIME: 'faas.time', - /** - * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - */ - FAAS_CRON: 'faas.cron', - /** - * A boolean that is true if the serverless function is executed for the first time (aka cold-start). - */ - FAAS_COLDSTART: 'faas.coldstart', - /** - * The name of the invoked function. - * - * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. - */ - FAAS_INVOKED_NAME: 'faas.invoked_name', - /** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - */ - FAAS_INVOKED_PROVIDER: 'faas.invoked_provider', - /** - * The cloud region of the invoked function. - * - * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. - */ - FAAS_INVOKED_REGION: 'faas.invoked_region', - /** - * Transport protocol used. See note below. - */ - NET_TRANSPORT: 'net.transport', - /** - * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). - */ - NET_PEER_IP: 'net.peer.ip', - /** - * Remote port number. - */ - NET_PEER_PORT: 'net.peer.port', - /** - * Remote hostname or similar, see note below. - */ - NET_PEER_NAME: 'net.peer.name', - /** - * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. - */ - NET_HOST_IP: 'net.host.ip', - /** - * Like `net.peer.port` but for the host port. - */ - NET_HOST_PORT: 'net.host.port', - /** - * Local hostname or similar, see note below. - */ - NET_HOST_NAME: 'net.host.name', - /** - * The internet connection type currently being used by the host. - */ - NET_HOST_CONNECTION_TYPE: 'net.host.connection.type', - /** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - */ - NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype', - /** - * The name of the mobile carrier. - */ - NET_HOST_CARRIER_NAME: 'net.host.carrier.name', - /** - * The mobile carrier country code. - */ - NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc', - /** - * The mobile carrier network code. - */ - NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc', - /** - * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. - */ - NET_HOST_CARRIER_ICC: 'net.host.carrier.icc', - /** - * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. - */ - PEER_SERVICE: 'peer.service', - /** - * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. - */ - ENDUSER_ID: 'enduser.id', - /** - * Actual/assumed role the client is making the request under extracted from token or application security context. - */ - ENDUSER_ROLE: 'enduser.role', - /** - * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - */ - ENDUSER_SCOPE: 'enduser.scope', - /** - * Current "managed" thread ID (as opposed to OS thread ID). - */ - THREAD_ID: 'thread.id', - /** - * Current thread name. - */ - THREAD_NAME: 'thread.name', - /** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). - */ - CODE_FUNCTION: 'code.function', - /** - * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. - */ - CODE_NAMESPACE: 'code.namespace', - /** - * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). - */ - CODE_FILEPATH: 'code.filepath', - /** - * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. - */ - CODE_LINENO: 'code.lineno', - /** - * HTTP request method. - */ - HTTP_METHOD: 'http.method', - /** - * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. - * - * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`. - */ - HTTP_URL: 'http.url', - /** - * The full request target as passed in a HTTP request line or equivalent. - */ - HTTP_TARGET: 'http.target', - /** - * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note. - * - * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set. - */ - HTTP_HOST: 'http.host', - /** - * The URI scheme identifying the used protocol. - */ - HTTP_SCHEME: 'http.scheme', - /** - * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). - */ - HTTP_STATUS_CODE: 'http.status_code', - /** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - */ - HTTP_FLAVOR: 'http.flavor', - /** - * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. - */ - HTTP_USER_AGENT: 'http.user_agent', - /** - * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length', - /** - * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed', - /** - * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length', - /** - * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed', - /** - * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). - * - * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available. - */ - HTTP_SERVER_NAME: 'http.server_name', - /** - * The matched route (path template). - */ - HTTP_ROUTE: 'http.route', - /** - * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). - * - * Note: This is not necessarily the same as `net.peer.ip`, which would - identify the network-level peer, which may be a proxy. - - This attribute should be set when a source of information different - from the one used for `net.peer.ip`, is available even if that other - source just confirms the same value as `net.peer.ip`. - Rationale: For `net.peer.ip`, one typically does not know if it - comes from a proxy, reverse proxy, or the actual client. Setting - `http.client_ip` when it's the same as `net.peer.ip` means that - one is at least somewhat confident that the address is not that of - the closest proxy. - */ - HTTP_CLIENT_IP: 'http.client_ip', - /** - * The keys in the `RequestItems` object field. - */ - AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names', - /** - * The JSON-serialized value of each item in the `ConsumedCapacity` response field. - */ - AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity', - /** - * The JSON-serialized value of the `ItemCollectionMetrics` response field. - */ - AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics', - /** - * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity', - /** - * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity', - /** - * The value of the `ConsistentRead` request parameter. - */ - AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read', - /** - * The value of the `ProjectionExpression` request parameter. - */ - AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection', - /** - * The value of the `Limit` request parameter. - */ - AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit', - /** - * The value of the `AttributesToGet` request parameter. - */ - AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get', - /** - * The value of the `IndexName` request parameter. - */ - AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name', - /** - * The value of the `Select` request parameter. - */ - AWS_DYNAMODB_SELECT: 'aws.dynamodb.select', - /** - * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes', - /** - * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes', - /** - * The value of the `ExclusiveStartTableName` request parameter. - */ - AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table', - /** - * The the number of items in the `TableNames` response parameter. - */ - AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count', - /** - * The value of the `ScanIndexForward` request parameter. - */ - AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward', - /** - * The value of the `Segment` request parameter. - */ - AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment', - /** - * The value of the `TotalSegments` request parameter. - */ - AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments', - /** - * The value of the `Count` response parameter. - */ - AWS_DYNAMODB_COUNT: 'aws.dynamodb.count', - /** - * The value of the `ScannedCount` response parameter. - */ - AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count', - /** - * The JSON-serialized value of each item in the `AttributeDefinitions` request field. - */ - AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions', - /** - * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates', - /** - * A string identifying the messaging system. - */ - MESSAGING_SYSTEM: 'messaging.system', - /** - * The message destination name. This might be equal to the span name but is required nevertheless. - */ - MESSAGING_DESTINATION: 'messaging.destination', - /** - * The kind of message destination. - */ - MESSAGING_DESTINATION_KIND: 'messaging.destination_kind', - /** - * A boolean that is true if the message destination is temporary. - */ - MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination', - /** - * The name of the transport protocol. - */ - MESSAGING_PROTOCOL: 'messaging.protocol', - /** - * The version of the transport protocol. - */ - MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version', - /** - * Connection string. - */ - MESSAGING_URL: 'messaging.url', - /** - * A value used by the messaging system as an identifier for the message, represented as a string. - */ - MESSAGING_MESSAGE_ID: 'messaging.message_id', - /** - * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". - */ - MESSAGING_CONVERSATION_ID: 'messaging.conversation_id', - /** - * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. - */ - MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes', - /** - * The compressed size of the message payload in bytes. - */ - MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes', - /** - * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. - */ - MESSAGING_OPERATION: 'messaging.operation', - /** - * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. - */ - MESSAGING_CONSUMER_ID: 'messaging.consumer_id', - /** - * RabbitMQ message routing key. - */ - MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key', - /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. - * - * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. - */ - MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key', - /** - * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. - */ - MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group', - /** - * Client Id for the Consumer or Producer that is handling the message. - */ - MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id', - /** - * Partition the message is sent to. - */ - MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition', - /** - * A boolean that is true if the message is a tombstone. - */ - MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone', - /** - * A string identifying the remoting system. - */ - RPC_SYSTEM: 'rpc.system', - /** - * The full (logical) name of the service being called, including its package name, if applicable. - * - * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). - */ - RPC_SERVICE: 'rpc.service', - /** - * The name of the (logical) method being called, must be equal to the $method part in the span name. - * - * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). - */ - RPC_METHOD: 'rpc.method', - /** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - */ - RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code', - /** - * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted. - */ - RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version', - /** - * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. - */ - RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id', - /** - * `error.code` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code', - /** - * `error.message` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message', - /** - * Whether this is a received or sent message. - */ - MESSAGE_TYPE: 'message.type', - /** - * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. - * - * Note: This way we guarantee that the values will be consistent between different implementations. - */ - MESSAGE_ID: 'message.id', - /** - * Compressed size of the message in bytes. - */ - MESSAGE_COMPRESSED_SIZE: 'message.compressed_size', - /** - * Uncompressed size of the message in bytes. - */ - MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size', -}; -exports.DbSystemValues = { - /** Some other SQL database. Fallback only. See notes. */ - OTHER_SQL: 'other_sql', - /** Microsoft SQL Server. */ - MSSQL: 'mssql', - /** MySQL. */ - MYSQL: 'mysql', - /** Oracle Database. */ - ORACLE: 'oracle', - /** IBM Db2. */ - DB2: 'db2', - /** PostgreSQL. */ - POSTGRESQL: 'postgresql', - /** Amazon Redshift. */ - REDSHIFT: 'redshift', - /** Apache Hive. */ - HIVE: 'hive', - /** Cloudscape. */ - CLOUDSCAPE: 'cloudscape', - /** HyperSQL DataBase. */ - HSQLDB: 'hsqldb', - /** Progress Database. */ - PROGRESS: 'progress', - /** SAP MaxDB. */ - MAXDB: 'maxdb', - /** SAP HANA. */ - HANADB: 'hanadb', - /** Ingres. */ - INGRES: 'ingres', - /** FirstSQL. */ - FIRSTSQL: 'firstsql', - /** EnterpriseDB. */ - EDB: 'edb', - /** InterSystems Caché. */ - CACHE: 'cache', - /** Adabas (Adaptable Database System). */ - ADABAS: 'adabas', - /** Firebird. */ - FIREBIRD: 'firebird', - /** Apache Derby. */ - DERBY: 'derby', - /** FileMaker. */ - FILEMAKER: 'filemaker', - /** Informix. */ - INFORMIX: 'informix', - /** InstantDB. */ - INSTANTDB: 'instantdb', - /** InterBase. */ - INTERBASE: 'interbase', - /** MariaDB. */ - MARIADB: 'mariadb', - /** Netezza. */ - NETEZZA: 'netezza', - /** Pervasive PSQL. */ - PERVASIVE: 'pervasive', - /** PointBase. */ - POINTBASE: 'pointbase', - /** SQLite. */ - SQLITE: 'sqlite', - /** Sybase. */ - SYBASE: 'sybase', - /** Teradata. */ - TERADATA: 'teradata', - /** Vertica. */ - VERTICA: 'vertica', - /** H2. */ - H2: 'h2', - /** ColdFusion IMQ. */ - COLDFUSION: 'coldfusion', - /** Apache Cassandra. */ - CASSANDRA: 'cassandra', - /** Apache HBase. */ - HBASE: 'hbase', - /** MongoDB. */ - MONGODB: 'mongodb', - /** Redis. */ - REDIS: 'redis', - /** Couchbase. */ - COUCHBASE: 'couchbase', - /** CouchDB. */ - COUCHDB: 'couchdb', - /** Microsoft Azure Cosmos DB. */ - COSMOSDB: 'cosmosdb', - /** Amazon DynamoDB. */ - DYNAMODB: 'dynamodb', - /** Neo4j. */ - NEO4J: 'neo4j', - /** Apache Geode. */ - GEODE: 'geode', - /** Elasticsearch. */ - ELASTICSEARCH: 'elasticsearch', - /** Memcached. */ - MEMCACHED: 'memcached', - /** CockroachDB. */ - COCKROACHDB: 'cockroachdb', -}; -exports.DbCassandraConsistencyLevelValues = { - /** all. */ - ALL: 'all', - /** each_quorum. */ - EACH_QUORUM: 'each_quorum', - /** quorum. */ - QUORUM: 'quorum', - /** local_quorum. */ - LOCAL_QUORUM: 'local_quorum', - /** one. */ - ONE: 'one', - /** two. */ - TWO: 'two', - /** three. */ - THREE: 'three', - /** local_one. */ - LOCAL_ONE: 'local_one', - /** any. */ - ANY: 'any', - /** serial. */ - SERIAL: 'serial', - /** local_serial. */ - LOCAL_SERIAL: 'local_serial', -}; -exports.FaasTriggerValues = { - /** A response to some data source operation such as a database or filesystem read/write. */ - DATASOURCE: 'datasource', - /** To provide an answer to an inbound HTTP request. */ - HTTP: 'http', - /** A function is set to be executed when messages are sent to a messaging system. */ - PUBSUB: 'pubsub', - /** A function is scheduled to be executed regularly. */ - TIMER: 'timer', - /** If none of the others apply. */ - OTHER: 'other', -}; -exports.FaasDocumentOperationValues = { - /** When a new object is created. */ - INSERT: 'insert', - /** When an object is modified. */ - EDIT: 'edit', - /** When an object is deleted. */ - DELETE: 'delete', -}; -exports.FaasInvokedProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.NetTransportValues = { - /** ip_tcp. */ - IP_TCP: 'ip_tcp', - /** ip_udp. */ - IP_UDP: 'ip_udp', - /** Another IP-based protocol. */ - IP: 'ip', - /** Unix Domain socket. See below. */ - UNIX: 'unix', - /** Named or anonymous pipe. See note below. */ - PIPE: 'pipe', - /** In-process communication. */ - INPROC: 'inproc', - /** Something else (non IP-based). */ - OTHER: 'other', -}; -exports.NetHostConnectionTypeValues = { - /** wifi. */ - WIFI: 'wifi', - /** wired. */ - WIRED: 'wired', - /** cell. */ - CELL: 'cell', - /** unavailable. */ - UNAVAILABLE: 'unavailable', - /** unknown. */ - UNKNOWN: 'unknown', -}; -exports.NetHostConnectionSubtypeValues = { - /** GPRS. */ - GPRS: 'gprs', - /** EDGE. */ - EDGE: 'edge', - /** UMTS. */ - UMTS: 'umts', - /** CDMA. */ - CDMA: 'cdma', - /** EVDO Rel. 0. */ - EVDO_0: 'evdo_0', - /** EVDO Rev. A. */ - EVDO_A: 'evdo_a', - /** CDMA2000 1XRTT. */ - CDMA2000_1XRTT: 'cdma2000_1xrtt', - /** HSDPA. */ - HSDPA: 'hsdpa', - /** HSUPA. */ - HSUPA: 'hsupa', - /** HSPA. */ - HSPA: 'hspa', - /** IDEN. */ - IDEN: 'iden', - /** EVDO Rev. B. */ - EVDO_B: 'evdo_b', - /** LTE. */ - LTE: 'lte', - /** EHRPD. */ - EHRPD: 'ehrpd', - /** HSPAP. */ - HSPAP: 'hspap', - /** GSM. */ - GSM: 'gsm', - /** TD-SCDMA. */ - TD_SCDMA: 'td_scdma', - /** IWLAN. */ - IWLAN: 'iwlan', - /** 5G NR (New Radio). */ - NR: 'nr', - /** 5G NRNSA (New Radio Non-Standalone). */ - NRNSA: 'nrnsa', - /** LTE CA. */ - LTE_CA: 'lte_ca', -}; -exports.HttpFlavorValues = { - /** HTTP 1.0. */ - HTTP_1_0: '1.0', - /** HTTP 1.1. */ - HTTP_1_1: '1.1', - /** HTTP 2. */ - HTTP_2_0: '2.0', - /** SPDY protocol. */ - SPDY: 'SPDY', - /** QUIC protocol. */ - QUIC: 'QUIC', -}; -exports.MessagingDestinationKindValues = { - /** A message sent to a queue. */ - QUEUE: 'queue', - /** A message sent to a topic. */ - TOPIC: 'topic', -}; -exports.MessagingOperationValues = { - /** receive. */ - RECEIVE: 'receive', - /** process. */ - PROCESS: 'process', -}; -exports.RpcGrpcStatusCodeValues = { - /** OK. */ - OK: 0, - /** CANCELLED. */ - CANCELLED: 1, - /** UNKNOWN. */ - UNKNOWN: 2, - /** INVALID_ARGUMENT. */ - INVALID_ARGUMENT: 3, - /** DEADLINE_EXCEEDED. */ - DEADLINE_EXCEEDED: 4, - /** NOT_FOUND. */ - NOT_FOUND: 5, - /** ALREADY_EXISTS. */ - ALREADY_EXISTS: 6, - /** PERMISSION_DENIED. */ - PERMISSION_DENIED: 7, - /** RESOURCE_EXHAUSTED. */ - RESOURCE_EXHAUSTED: 8, - /** FAILED_PRECONDITION. */ - FAILED_PRECONDITION: 9, - /** ABORTED. */ - ABORTED: 10, - /** OUT_OF_RANGE. */ - OUT_OF_RANGE: 11, - /** UNIMPLEMENTED. */ - UNIMPLEMENTED: 12, - /** INTERNAL. */ - INTERNAL: 13, - /** UNAVAILABLE. */ - UNAVAILABLE: 14, - /** DATA_LOSS. */ - DATA_LOSS: 15, - /** UNAUTHENTICATED. */ - UNAUTHENTICATED: 16, -}; -exports.MessageTypeValues = { - /** sent. */ - SENT: 'SENT', - /** received. */ - RECEIVED: 'RECEIVED', -}; -//# sourceMappingURL=SemanticAttributes.js.map - -/***/ }), - -/***/ 31440: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(21804), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 67684: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterBase = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(74840); -/** - * Collector Exporter abstract base class - */ -class OTLPExporterBase { - /** - * @param config - */ - constructor(config = {}) { - this._sendingPromises = []; - this.url = this.getDefaultUrl(config); - if (typeof config.hostname === 'string') { - this.hostname = config.hostname; - } - this.attributes = config.attributes; - this.shutdown = this.shutdown.bind(this); - this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this); - this._concurrencyLimit = - typeof config.concurrencyLimit === 'number' - ? config.concurrencyLimit - : Infinity; - // platform dependent - this.onInit(config); - } - /** - * Export items. - * @param items - * @param resultCallback - */ - export(items, resultCallback) { - if (this._shutdownOnce.isCalled) { - resultCallback({ - code: core_1.ExportResultCode.FAILED, - error: new Error('Exporter has been shutdown'), - }); - return; - } - if (this._sendingPromises.length >= this._concurrencyLimit) { - resultCallback({ - code: core_1.ExportResultCode.FAILED, - error: new Error('Concurrent export limit reached'), - }); - return; - } - this._export(items) - .then(() => { - resultCallback({ code: core_1.ExportResultCode.SUCCESS }); - }) - .catch((error) => { - resultCallback({ code: core_1.ExportResultCode.FAILED, error }); - }); - } - _export(items) { - return new Promise((resolve, reject) => { - try { - api_1.diag.debug('items to be sent', items); - this.send(items, resolve, reject); - } - catch (e) { - reject(e); - } - }); - } - /** - * Shutdown the exporter. - */ - shutdown() { - return this._shutdownOnce.call(); - } - /** - * Called by _shutdownOnce with BindOnceFuture - */ - _shutdown() { - api_1.diag.debug('shutdown started'); - this.onShutdown(); - return Promise.all(this._sendingPromises) - .then(() => { - /** ignore resolved values */ - }); - } -} -exports.OTLPExporterBase = OTLPExporterBase; -//# sourceMappingURL=OTLPExporterBase.js.map - -/***/ }), - -/***/ 11363: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(67684), exports); -__exportStar(__nccwpck_require__(78959), exports); -__exportStar(__nccwpck_require__(44111), exports); -__exportStar(__nccwpck_require__(14425), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 24343: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterBrowserBase = void 0; -const OTLPExporterBase_1 = __nccwpck_require__(67684); -const util_1 = __nccwpck_require__(14425); -const util_2 = __nccwpck_require__(29596); -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(74840); -/** - * Collector Metric Exporter abstract base class - */ -class OTLPExporterBrowserBase extends OTLPExporterBase_1.OTLPExporterBase { - /** - * @param config - */ - constructor(config = {}) { - super(config); - this._useXHR = false; - this._useXHR = - !!config.headers || typeof navigator.sendBeacon !== 'function'; - if (this._useXHR) { - this._headers = Object.assign({}, (0, util_1.parseHeaders)(config.headers), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)); - } - else { - this._headers = {}; - } - } - onInit() { - window.addEventListener('unload', this.shutdown); - } - onShutdown() { - window.removeEventListener('unload', this.shutdown); - } - send(items, onSuccess, onError) { - if (this._shutdownOnce.isCalled) { - api_1.diag.debug('Shutdown already started. Cannot send objects'); - return; - } - const serviceRequest = this.convert(items); - const body = JSON.stringify(serviceRequest); - const promise = new Promise((resolve, reject) => { - if (this._useXHR) { - (0, util_2.sendWithXhr)(body, this.url, this._headers, resolve, reject); - } - else { - (0, util_2.sendWithBeacon)(body, this.url, { type: 'application/json' }, resolve, reject); - } - }) - .then(onSuccess, onError); - this._sendingPromises.push(promise); - const popPromise = () => { - const index = this._sendingPromises.indexOf(promise); - this._sendingPromises.splice(index, 1); - }; - promise.then(popPromise, popPromise); - } -} -exports.OTLPExporterBrowserBase = OTLPExporterBrowserBase; -//# sourceMappingURL=OTLPExporterBrowserBase.js.map - -/***/ }), - -/***/ 51979: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(24343), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 29596: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sendWithXhr = exports.sendWithBeacon = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const api_1 = __nccwpck_require__(65163); -const types_1 = __nccwpck_require__(44111); -/** - * Send metrics/spans using browser navigator.sendBeacon - * @param body - * @param url - * @param blobPropertyBag - * @param onSuccess - * @param onError - */ -function sendWithBeacon(body, url, blobPropertyBag, onSuccess, onError) { - if (navigator.sendBeacon(url, new Blob([body], blobPropertyBag))) { - api_1.diag.debug('sendBeacon - can send', body); - onSuccess(); - } - else { - const error = new types_1.OTLPExporterError(`sendBeacon - cannot send ${body}`); - onError(error); - } -} -exports.sendWithBeacon = sendWithBeacon; -/** - * function to send metrics/spans using browser XMLHttpRequest - * used when navigator.sendBeacon is not available - * @param body - * @param url - * @param headers - * @param onSuccess - * @param onError - */ -function sendWithXhr(body, url, headers, onSuccess, onError) { - const xhr = new XMLHttpRequest(); - xhr.open('POST', url); - const defaultHeaders = { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }; - Object.entries(Object.assign(Object.assign({}, defaultHeaders), headers)).forEach(([k, v]) => { - xhr.setRequestHeader(k, v); - }); - xhr.send(body); - xhr.onreadystatechange = () => { - if (xhr.readyState === XMLHttpRequest.DONE) { - if (xhr.status >= 200 && xhr.status <= 299) { - api_1.diag.debug('xhr success', body); - onSuccess(); - } - else { - const error = new types_1.OTLPExporterError(`Failed to export with XHR (status: ${xhr.status})`, xhr.status); - onError(error); - } - } - }; -} -exports.sendWithXhr = sendWithXhr; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 78959: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterBrowserBase = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(22853), exports); -var browser_1 = __nccwpck_require__(51979); -Object.defineProperty(exports, "OTLPExporterBrowserBase", ({ enumerable: true, get: function () { return browser_1.OTLPExporterBrowserBase; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 75780: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterNodeBase = void 0; -const OTLPExporterBase_1 = __nccwpck_require__(67684); -const util_1 = __nccwpck_require__(14425); -const util_2 = __nccwpck_require__(58926); -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(74840); -/** - * Collector Metric Exporter abstract base class - */ -class OTLPExporterNodeBase extends OTLPExporterBase_1.OTLPExporterBase { - constructor(config = {}) { - super(config); - this.DEFAULT_HEADERS = {}; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (config.metadata) { - api_1.diag.warn('Metadata cannot be set when using http'); - } - this.headers = Object.assign(this.DEFAULT_HEADERS, (0, util_1.parseHeaders)(config.headers), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)); - this.agent = (0, util_2.createHttpAgent)(config); - this.compression = (0, util_2.configureCompression)(config.compression); - } - onInit(_config) { } - send(objects, onSuccess, onError) { - if (this._shutdownOnce.isCalled) { - api_1.diag.debug('Shutdown already started. Cannot send objects'); - return; - } - const serviceRequest = this.convert(objects); - const promise = new Promise((resolve, reject) => { - (0, util_2.sendWithHttp)(this, JSON.stringify(serviceRequest), 'application/json', resolve, reject); - }) - .then(onSuccess, onError); - this._sendingPromises.push(promise); - const popPromise = () => { - const index = this._sendingPromises.indexOf(promise); - this._sendingPromises.splice(index, 1); - }; - promise.then(popPromise, popPromise); - } - // TODO: end gzip stream from util.ts if not undefined - // It should perhaps be a class member here instead of a variable in util.ts - onShutdown() { } -} -exports.OTLPExporterNodeBase = OTLPExporterNodeBase; -//# sourceMappingURL=OTLPExporterNodeBase.js.map - -/***/ }), - -/***/ 22853: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(75780), exports); -__exportStar(__nccwpck_require__(58926), exports); -__exportStar(__nccwpck_require__(96572), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 96572: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CompressionAlgorithm = void 0; -var CompressionAlgorithm; -(function (CompressionAlgorithm) { - CompressionAlgorithm["NONE"] = "none"; - CompressionAlgorithm["GZIP"] = "gzip"; -})(CompressionAlgorithm = exports.CompressionAlgorithm || (exports.CompressionAlgorithm = {})); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 58926: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.configureCompression = exports.createHttpAgent = exports.sendWithHttp = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const url = __nccwpck_require__(57310); -const http = __nccwpck_require__(13685); -const https = __nccwpck_require__(95687); -const zlib = __nccwpck_require__(59796); -const stream_1 = __nccwpck_require__(12781); -const api_1 = __nccwpck_require__(65163); -const types_1 = __nccwpck_require__(96572); -const core_1 = __nccwpck_require__(74840); -const types_2 = __nccwpck_require__(44111); -let gzip; -/** - * Sends data using http - * @param collector - * @param data - * @param contentType - * @param onSuccess - * @param onError - */ -function sendWithHttp(collector, data, contentType, onSuccess, onError) { - const parsedUrl = new url.URL(collector.url); - const options = { - hostname: parsedUrl.hostname, - port: parsedUrl.port, - path: parsedUrl.pathname, - method: 'POST', - headers: Object.assign({ 'Content-Type': contentType }, collector.headers), - agent: collector.agent, - }; - const request = parsedUrl.protocol === 'http:' ? http.request : https.request; - const req = request(options, (res) => { - let responseData = ''; - res.on('data', chunk => (responseData += chunk)); - res.on('end', () => { - if (res.statusCode && res.statusCode < 299) { - api_1.diag.debug(`statusCode: ${res.statusCode}`, responseData); - onSuccess(); - } - else { - const error = new types_2.OTLPExporterError(res.statusMessage, res.statusCode, responseData); - onError(error); - } - }); - }); - req.on('error', (error) => { - onError(error); - }); - switch (collector.compression) { - case types_1.CompressionAlgorithm.GZIP: { - if (!gzip) { - gzip = zlib.createGzip(); - } - req.setHeader('Content-Encoding', 'gzip'); - const dataStream = readableFromBuffer(data); - dataStream.on('error', onError) - .pipe(gzip).on('error', onError) - .pipe(req); - break; - } - default: - req.end(data); - break; - } -} -exports.sendWithHttp = sendWithHttp; -function readableFromBuffer(buff) { - const readable = new stream_1.Readable(); - readable.push(buff); - readable.push(null); - return readable; -} -function createHttpAgent(config) { - if (config.httpAgentOptions && config.keepAlive === false) { - api_1.diag.warn('httpAgentOptions is used only when keepAlive is true'); - return undefined; - } - if (config.keepAlive === false || !config.url) - return undefined; - try { - const parsedUrl = new url.URL(config.url); - const Agent = parsedUrl.protocol === 'http:' ? http.Agent : https.Agent; - return new Agent(Object.assign({ keepAlive: true }, config.httpAgentOptions)); - } - catch (err) { - api_1.diag.error(`collector exporter failed to create http agent. err: ${err.message}`); - return undefined; - } -} -exports.createHttpAgent = createHttpAgent; -function configureCompression(compression) { - if (compression) { - return compression; - } - else { - const definedCompression = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION || (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION; - return definedCompression === types_1.CompressionAlgorithm.GZIP ? types_1.CompressionAlgorithm.GZIP : types_1.CompressionAlgorithm.NONE; - } -} -exports.configureCompression = configureCompression; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 44111: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterError = void 0; -/** - * Interface for handling error - */ -class OTLPExporterError extends Error { - constructor(message, code, data) { - super(message); - this.name = 'OTLPExporterError'; - this.data = data; - this.code = code; - } -} -exports.OTLPExporterError = OTLPExporterError; -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 14425: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.appendResourcePathToUrlIfNotPresent = exports.parseHeaders = void 0; -const api_1 = __nccwpck_require__(65163); -/** - * Parses headers from config leaving only those that have defined values - * @param partialHeaders - */ -function parseHeaders(partialHeaders = {}) { - const headers = {}; - Object.entries(partialHeaders).forEach(([key, value]) => { - if (typeof value !== 'undefined') { - headers[key] = String(value); - } - else { - api_1.diag.warn(`Header "${key}" has wrong value and will be ignored`); - } - }); - return headers; -} -exports.parseHeaders = parseHeaders; -function appendResourcePathToUrlIfNotPresent(url, path) { - if (url.match(/v\d\/(traces|metrics)$/)) - return url; - return url + path; -} -exports.appendResourcePathToUrlIfNotPresent = appendResourcePathToUrlIfNotPresent; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 91578: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExportResultCode = void 0; -var ExportResultCode; -(function (ExportResultCode) { - ExportResultCode[ExportResultCode["SUCCESS"] = 0] = "SUCCESS"; - ExportResultCode[ExportResultCode["FAILED"] = 1] = "FAILED"; -})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {})); -//# sourceMappingURL=ExportResult.js.map - -/***/ }), - -/***/ 20766: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0; -exports.BAGGAGE_KEY_PAIR_SEPARATOR = '='; -exports.BAGGAGE_PROPERTIES_SEPARATOR = ';'; -exports.BAGGAGE_ITEMS_SEPARATOR = ','; -// Name of the http header used to propagate the baggage -exports.BAGGAGE_HEADER = 'baggage'; -// Maximum number of name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180; -// Maximum number of bytes per a single name-value pair allowed by w3c spec -exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096; -// Maximum total length of all name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 18269: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CBaggagePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(68972); -const constants_1 = __nccwpck_require__(20766); -const utils_1 = __nccwpck_require__(81279); -/** - * Propagates {@link Baggage} through Context format propagation. - * - * Based on the Baggage specification: - * https://w3c.github.io/baggage/ - */ -class W3CBaggagePropagator { - inject(context, carrier, setter) { - const baggage = api_1.propagation.getBaggage(context); - if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context)) - return; - const keyPairs = (0, utils_1.getKeyPairs)(baggage) - .filter((pair) => { - return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS; - }) - .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS); - const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs); - if (headerValue.length > 0) { - setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue); - } - } - extract(context, carrier, getter) { - const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER); - const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue; - if (!baggageString) - return context; - const baggage = {}; - if (baggageString.length === 0) { - return context; - } - const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR); - pairs.forEach(entry => { - const keyPair = (0, utils_1.parsePairKeyValue)(entry); - if (keyPair) { - const baggageEntry = { value: keyPair.value }; - if (keyPair.metadata) { - baggageEntry.metadata = keyPair.metadata; - } - baggage[keyPair.key] = baggageEntry; - } - }); - if (Object.entries(baggage).length === 0) { - return context; - } - return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage)); - } - fields() { - return [constants_1.BAGGAGE_HEADER]; - } -} -exports.W3CBaggagePropagator = W3CBaggagePropagator; -//# sourceMappingURL=W3CBaggagePropagator.js.map - -/***/ }), - -/***/ 81279: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const api_1 = __nccwpck_require__(65163); -const constants_1 = __nccwpck_require__(20766); -function serializeKeyPairs(keyPairs) { - return keyPairs.reduce((hValue, current) => { - const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`; - return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value; - }, ''); -} -exports.serializeKeyPairs = serializeKeyPairs; -function getKeyPairs(baggage) { - return baggage.getAllEntries().map(([key, value]) => { - let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`; - // include opaque metadata if provided - // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation - if (value.metadata !== undefined) { - entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString(); - } - return entry; - }); -} -exports.getKeyPairs = getKeyPairs; -function parsePairKeyValue(entry) { - const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR); - if (valueProps.length <= 0) - return; - const keyPairPart = valueProps.shift(); - if (!keyPairPart) - return; - const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR); - if (keyPair.length !== 2) - return; - const key = decodeURIComponent(keyPair[0].trim()); - const value = decodeURIComponent(keyPair[1].trim()); - let metadata; - if (valueProps.length > 0) { - metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR)); - } - return { key, value, metadata }; -} -exports.parsePairKeyValue = parsePairKeyValue; -/** - * Parse a string serialized in the baggage HTTP Format (without metadata): - * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md - */ -function parseKeyPairsIntoRecord(value) { - if (typeof value !== 'string' || value.length === 0) - return {}; - return value - .split(constants_1.BAGGAGE_ITEMS_SEPARATOR) - .map(entry => { - return parsePairKeyValue(entry); - }) - .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0) - .reduce((headers, keyPair) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - headers[keyPair.key] = keyPair.value; - return headers; - }, {}); -} -exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 22868: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0; -const api_1 = __nccwpck_require__(65163); -function sanitizeAttributes(attributes) { - const out = {}; - if (typeof attributes !== 'object' || attributes == null) { - return out; - } - for (const [key, val] of Object.entries(attributes)) { - if (!isAttributeKey(key)) { - api_1.diag.warn(`Invalid attribute key: ${key}`); - continue; - } - if (!isAttributeValue(val)) { - api_1.diag.warn(`Invalid attribute value set for key: ${key}`); - continue; - } - if (Array.isArray(val)) { - out[key] = val.slice(); - } - else { - out[key] = val; - } - } - return out; -} -exports.sanitizeAttributes = sanitizeAttributes; -function isAttributeKey(key) { - return typeof key === 'string' && key.length > 0; -} -exports.isAttributeKey = isAttributeKey; -function isAttributeValue(val) { - if (val == null) { - return true; - } - if (Array.isArray(val)) { - return isHomogeneousAttributeValueArray(val); - } - return isValidPrimitiveAttributeValue(val); -} -exports.isAttributeValue = isAttributeValue; -function isHomogeneousAttributeValueArray(arr) { - let type; - for (const element of arr) { - // null/undefined elements are allowed - if (element == null) - continue; - if (!type) { - if (isValidPrimitiveAttributeValue(element)) { - type = typeof element; - continue; - } - // encountered an invalid primitive - return false; - } - if (typeof element === type) { - continue; - } - return false; - } - return true; -} -function isValidPrimitiveAttributeValue(val) { - switch (typeof val) { - case 'number': - case 'boolean': - case 'string': - return true; - } - return false; -} -//# sourceMappingURL=attributes.js.map - -/***/ }), - -/***/ 50146: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.globalErrorHandler = exports.setGlobalErrorHandler = void 0; -const logging_error_handler_1 = __nccwpck_require__(90667); -/** The global error handler delegate */ -let delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)(); -/** - * Set the global error handler - * @param {ErrorHandler} handler - */ -function setGlobalErrorHandler(handler) { - delegateHandler = handler; -} -exports.setGlobalErrorHandler = setGlobalErrorHandler; -/** - * Return the global error handler - * @param {Exception} ex - */ -function globalErrorHandler(ex) { - try { - delegateHandler(ex); - } - catch (_a) { } // eslint-disable-line no-empty -} -exports.globalErrorHandler = globalErrorHandler; -//# sourceMappingURL=global-error-handler.js.map - -/***/ }), - -/***/ 90667: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.loggingErrorHandler = void 0; -const api_1 = __nccwpck_require__(65163); -/** - * Returns a function that logs an error using the provided logger, or a - * console logger if one was not provided. - */ -function loggingErrorHandler() { - return (ex) => { - api_1.diag.error(stringifyException(ex)); - }; -} -exports.loggingErrorHandler = loggingErrorHandler; -/** - * Converts an exception into a string representation - * @param {Exception} ex - */ -function stringifyException(ex) { - if (typeof ex === 'string') { - return ex; - } - else { - return JSON.stringify(flattenException(ex)); - } -} -/** - * Flattens an exception into key-value pairs by traversing the prototype chain - * and coercing values to strings. Duplicate properties will not be overwritten; - * the first insert wins. - */ -function flattenException(ex) { - const result = {}; - let current = ex; - while (current !== null) { - Object.getOwnPropertyNames(current).forEach(propertyName => { - if (result[propertyName]) - return; - const value = current[propertyName]; - if (value) { - result[propertyName] = String(value); - } - }); - current = Object.getPrototypeOf(current); - } - return result; -} -//# sourceMappingURL=logging-error-handler.js.map - -/***/ }), - -/***/ 48713: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0; -const platform_1 = __nccwpck_require__(34613); -const NANOSECOND_DIGITS = 9; -const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS); -/** - * Converts a number to HrTime, HrTime = [number, number]. - * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. - * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. - * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. - * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds: - * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. - * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: - * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000. - * This is represented in HrTime format as [1609504210, 150000000]. - * @param epochMillis - */ -function numberToHrtime(epochMillis) { - const epochSeconds = epochMillis / 1000; - // Decimals only. - const seconds = Math.trunc(epochSeconds); - // Round sub-nanosecond accuracy to nanosecond. - const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) * - SECOND_TO_NANOSECONDS; - return [seconds, nanos]; -} -function getTimeOrigin() { - let timeOrigin = platform_1.otperformance.timeOrigin; - if (typeof timeOrigin !== 'number') { - const perf = platform_1.otperformance; - timeOrigin = perf.timing && perf.timing.fetchStart; - } - return timeOrigin; -} -/** - * Returns an hrtime calculated via performance component. - * @param performanceNow - */ -function hrTime(performanceNow) { - const timeOrigin = numberToHrtime(getTimeOrigin()); - const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now()); - let seconds = timeOrigin[0] + now[0]; - let nanos = timeOrigin[1] + now[1]; - // Nanoseconds - if (nanos > SECOND_TO_NANOSECONDS) { - nanos -= SECOND_TO_NANOSECONDS; - seconds += 1; - } - return [seconds, nanos]; -} -exports.hrTime = hrTime; -/** - * - * Converts a TimeInput to an HrTime, defaults to _hrtime(). - * @param time - */ -function timeInputToHrTime(time) { - // process.hrtime - if (isTimeInputHrTime(time)) { - return time; - } - else if (typeof time === 'number') { - // Must be a performance.now() if it's smaller than process start time. - if (time < getTimeOrigin()) { - return hrTime(time); - } - else { - // epoch milliseconds or performance.timeOrigin - return numberToHrtime(time); - } - } - else if (time instanceof Date) { - return numberToHrtime(time.getTime()); - } - else { - throw TypeError('Invalid input type'); - } -} -exports.timeInputToHrTime = timeInputToHrTime; -/** - * Returns a duration of two hrTime. - * @param startTime - * @param endTime - */ -function hrTimeDuration(startTime, endTime) { - let seconds = endTime[0] - startTime[0]; - let nanos = endTime[1] - startTime[1]; - // overflow - if (nanos < 0) { - seconds -= 1; - // negate - nanos += SECOND_TO_NANOSECONDS; - } - return [seconds, nanos]; -} -exports.hrTimeDuration = hrTimeDuration; -/** - * Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z" - * @param time - */ -function hrTimeToTimeStamp(time) { - const precision = NANOSECOND_DIGITS; - const tmp = `${'0'.repeat(precision)}${time[1]}Z`; - const nanoString = tmp.substr(tmp.length - precision - 1); - const date = new Date(time[0] * 1000).toISOString(); - return date.replace('000Z', nanoString); -} -exports.hrTimeToTimeStamp = hrTimeToTimeStamp; -/** - * Convert hrTime to nanoseconds. - * @param time - */ -function hrTimeToNanoseconds(time) { - return time[0] * SECOND_TO_NANOSECONDS + time[1]; -} -exports.hrTimeToNanoseconds = hrTimeToNanoseconds; -/** - * Convert hrTime to milliseconds. - * @param time - */ -function hrTimeToMilliseconds(time) { - return Math.round(time[0] * 1e3 + time[1] / 1e6); -} -exports.hrTimeToMilliseconds = hrTimeToMilliseconds; -/** - * Convert hrTime to microseconds. - * @param time - */ -function hrTimeToMicroseconds(time) { - return Math.round(time[0] * 1e6 + time[1] / 1e3); -} -exports.hrTimeToMicroseconds = hrTimeToMicroseconds; -/** - * check if time is HrTime - * @param value - */ -function isTimeInputHrTime(value) { - return (Array.isArray(value) && - value.length === 2 && - typeof value[0] === 'number' && - typeof value[1] === 'number'); -} -exports.isTimeInputHrTime = isTimeInputHrTime; -/** - * check if input value is a correct types.TimeInput - * @param value - */ -function isTimeInput(value) { - return (isTimeInputHrTime(value) || - typeof value === 'number' || - value instanceof Date); -} -exports.isTimeInput = isTimeInput; -//# sourceMappingURL=time.js.map - -/***/ }), - -/***/ 38750: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 74840: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.baggageUtils = void 0; -__exportStar(__nccwpck_require__(18269), exports); -__exportStar(__nccwpck_require__(22868), exports); -__exportStar(__nccwpck_require__(50146), exports); -__exportStar(__nccwpck_require__(90667), exports); -__exportStar(__nccwpck_require__(48713), exports); -__exportStar(__nccwpck_require__(38750), exports); -__exportStar(__nccwpck_require__(91578), exports); -__exportStar(__nccwpck_require__(59775), exports); -exports.baggageUtils = __nccwpck_require__(81279); -__exportStar(__nccwpck_require__(34613), exports); -__exportStar(__nccwpck_require__(32162), exports); -__exportStar(__nccwpck_require__(23620), exports); -__exportStar(__nccwpck_require__(27903), exports); -__exportStar(__nccwpck_require__(38601), exports); -__exportStar(__nccwpck_require__(88743), exports); -__exportStar(__nccwpck_require__(41257), exports); -__exportStar(__nccwpck_require__(62678), exports); -__exportStar(__nccwpck_require__(8985), exports); -__exportStar(__nccwpck_require__(68972), exports); -__exportStar(__nccwpck_require__(54957), exports); -__exportStar(__nccwpck_require__(57484), exports); -__exportStar(__nccwpck_require__(28174), exports); -__exportStar(__nccwpck_require__(77700), exports); -__exportStar(__nccwpck_require__(72750), exports); -__exportStar(__nccwpck_require__(87638), exports); -__exportStar(__nccwpck_require__(34247), exports); -__exportStar(__nccwpck_require__(59775), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 83061: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateValue = exports.validateKey = void 0; -const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; -const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; -const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; -const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); -const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; -/** - * Key is opaque string up to 256 characters printable. It MUST begin with a - * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, - * underscores _, dashes -, asterisks *, and forward slashes /. - * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the - * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. - * see https://www.w3.org/TR/trace-context/#key - */ -function validateKey(key) { - return VALID_KEY_REGEX.test(key); -} -exports.validateKey = validateKey; -/** - * Value is opaque string up to 256 characters printable ASCII RFC0020 - * characters (i.e., the range 0x20 to 0x7E) except comma , and =. - */ -function validateValue(value) { - return (VALID_VALUE_BASE_REGEX.test(value) && - !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); -} -exports.validateValue = validateValue; -//# sourceMappingURL=validators.js.map - -/***/ }), - -/***/ 34613: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__exportStar(__nccwpck_require__(61716), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 84707: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RandomIdGenerator = void 0; -const SPAN_ID_BYTES = 8; -const TRACE_ID_BYTES = 16; -class RandomIdGenerator { - constructor() { - /** - * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex - * characters corresponding to 128 bits. - */ - this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); - /** - * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex - * characters corresponding to 64 bits. - */ - this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); - } -} -exports.RandomIdGenerator = RandomIdGenerator; -const SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); -function getIdGenerator(bytes) { - return function generateId() { - for (let i = 0; i < bytes / 4; i++) { - // unsigned right shift drops decimal part of the number - // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE - SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4); - } - // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated - for (let i = 0; i < bytes; i++) { - if (SHARED_BUFFER[i] > 0) { - break; - } - else if (i === bytes - 1) { - SHARED_BUFFER[bytes - 1] = 1; - } - } - return SHARED_BUFFER.toString('hex', 0, bytes); - }; -} -//# sourceMappingURL=RandomIdGenerator.js.map - -/***/ }), - -/***/ 63000: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEnv = void 0; -const os = __nccwpck_require__(22037); -const environment_1 = __nccwpck_require__(57484); -/** - * Gets the environment variables - */ -function getEnv() { - const processEnv = (0, environment_1.parseEnvironment)(process.env); - return Object.assign({ - HOSTNAME: os.hostname(), - }, environment_1.DEFAULT_ENVIRONMENT, processEnv); -} -exports.getEnv = getEnv; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 70992: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._globalThis = void 0; -/** only globals that common to node and browsers are allowed */ -// eslint-disable-next-line node/no-unsupported-features/es-builtins -exports._globalThis = typeof globalThis === 'object' ? globalThis : global; -//# sourceMappingURL=globalThis.js.map - -/***/ }), - -/***/ 14101: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hexToBase64 = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function hexToBase64(hexStr) { - const hexStrLen = hexStr.length; - let hexAsciiCharsStr = ''; - for (let i = 0; i < hexStrLen; i += 2) { - const hexPair = hexStr.substring(i, i + 2); - const hexVal = parseInt(hexPair, 16); - hexAsciiCharsStr += String.fromCharCode(hexVal); - } - return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64'); -} -exports.hexToBase64 = hexToBase64; -//# sourceMappingURL=hex-to-base64.js.map - -/***/ }), - -/***/ 61716: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(63000), exports); -__exportStar(__nccwpck_require__(70992), exports); -__exportStar(__nccwpck_require__(14101), exports); -__exportStar(__nccwpck_require__(84707), exports); -__exportStar(__nccwpck_require__(56047), exports); -__exportStar(__nccwpck_require__(19477), exports); -__exportStar(__nccwpck_require__(67717), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 56047: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.otperformance = void 0; -const perf_hooks_1 = __nccwpck_require__(4074); -exports.otperformance = perf_hooks_1.performance; -//# sourceMappingURL=performance.js.map - -/***/ }), - -/***/ 19477: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SDK_INFO = void 0; -const version_1 = __nccwpck_require__(59775); -const semantic_conventions_1 = __nccwpck_require__(69004); -/** Constants describing the SDK in use */ -exports.SDK_INFO = { - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node', - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS, - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION, -}; -//# sourceMappingURL=sdk-info.js.map - -/***/ }), - -/***/ 67717: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unrefTimer = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function unrefTimer(timer) { - timer.unref(); -} -exports.unrefTimer = unrefTimer; -//# sourceMappingURL=timer-util.js.map + var opentelemetry = {}; + opentelemetry.proto = (function () { + /** + * Namespace proto. + * @memberof opentelemetry + * @namespace + */ + var proto = {}; + proto.common = (function () { + /** + * Namespace common. + * @memberof opentelemetry.proto + * @namespace + */ + var common = {}; + common.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.common + * @namespace + */ + var v1 = {}; + v1.AnyValue = (function () { + /** + * Properties of an AnyValue. + * @memberof opentelemetry.proto.common.v1 + * @interface IAnyValue + * @property {string|null} [stringValue] AnyValue stringValue + * @property {boolean|null} [boolValue] AnyValue boolValue + * @property {number|Long|null} [intValue] AnyValue intValue + * @property {number|null} [doubleValue] AnyValue doubleValue + * @property {opentelemetry.proto.common.v1.IArrayValue|null} [arrayValue] AnyValue arrayValue + * @property {opentelemetry.proto.common.v1.IKeyValueList|null} [kvlistValue] AnyValue kvlistValue + * @property {Uint8Array|null} [bytesValue] AnyValue bytesValue + */ + /** + * Constructs a new AnyValue. + * @memberof opentelemetry.proto.common.v1 + * @classdesc Represents an AnyValue. + * @implements IAnyValue + * @constructor + * @param {opentelemetry.proto.common.v1.IAnyValue=} [properties] Properties to set + */ + function AnyValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * AnyValue stringValue. + * @member {string|null|undefined} stringValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.stringValue = null; + /** + * AnyValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.boolValue = null; + /** + * AnyValue intValue. + * @member {number|Long|null|undefined} intValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.intValue = null; + /** + * AnyValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.doubleValue = null; + /** + * AnyValue arrayValue. + * @member {opentelemetry.proto.common.v1.IArrayValue|null|undefined} arrayValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.arrayValue = null; + /** + * AnyValue kvlistValue. + * @member {opentelemetry.proto.common.v1.IKeyValueList|null|undefined} kvlistValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.kvlistValue = null; + /** + * AnyValue bytesValue. + * @member {Uint8Array|null|undefined} bytesValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.bytesValue = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * AnyValue value. + * @member {"stringValue"|"boolValue"|"intValue"|"doubleValue"|"arrayValue"|"kvlistValue"|"bytesValue"|undefined} value + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + Object.defineProperty(AnyValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["stringValue", "boolValue", "intValue", "doubleValue", "arrayValue", "kvlistValue", "bytesValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new AnyValue instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {opentelemetry.proto.common.v1.IAnyValue=} [properties] Properties to set + * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue instance + */ + AnyValue.create = function create(properties) { + return new AnyValue(properties); + }; + /** + * Encodes the specified AnyValue message. Does not implicitly {@link opentelemetry.proto.common.v1.AnyValue.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {opentelemetry.proto.common.v1.IAnyValue} message AnyValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnyValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 2, wireType 0 =*/ 16).bool(message.boolValue); + if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) + writer.uint32(/* id 3, wireType 0 =*/ 24).int64(message.intValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 4, wireType 1 =*/ 33).double(message.doubleValue); + if (message.arrayValue != null && Object.hasOwnProperty.call(message, "arrayValue")) + $root.opentelemetry.proto.common.v1.ArrayValue.encode(message.arrayValue, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); + if (message.kvlistValue != null && Object.hasOwnProperty.call(message, "kvlistValue")) + $root.opentelemetry.proto.common.v1.KeyValueList.encode(message.kvlistValue, writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim(); + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) + writer.uint32(/* id 7, wireType 2 =*/ 58).bytes(message.bytesValue); + return writer; + }; + /** + * Encodes the specified AnyValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.AnyValue.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {opentelemetry.proto.common.v1.IAnyValue} message AnyValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnyValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an AnyValue message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnyValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.AnyValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stringValue = reader.string(); + break; + } + case 2: { + message.boolValue = reader.bool(); + break; + } + case 3: { + message.intValue = reader.int64(); + break; + } + case 4: { + message.doubleValue = reader.double(); + break; + } + case 5: { + message.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.decode(reader, reader.uint32()); + break; + } + case 6: { + message.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.decode(reader, reader.uint32()); + break; + } + case 7: { + message.bytesValue = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an AnyValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnyValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an AnyValue message. + * @function verify + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnyValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) + return "intValue: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.opentelemetry.proto.common.v1.ArrayValue.verify(message.arrayValue); + if (error) + return "arrayValue." + error; + } + } + if (message.kvlistValue != null && message.hasOwnProperty("kvlistValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.opentelemetry.proto.common.v1.KeyValueList.verify(message.kvlistValue); + if (error) + return "kvlistValue." + error; + } + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) + return "bytesValue: buffer expected"; + } + return null; + }; + /** + * Creates an AnyValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue + */ + AnyValue.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.common.v1.AnyValue) + return object; + var message = new $root.opentelemetry.proto.common.v1.AnyValue(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.intValue != null) + if ($util.Long) + (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.arrayValue != null) { + if (typeof object.arrayValue !== "object") + throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected"); + message.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.fromObject(object.arrayValue); + } + if (object.kvlistValue != null) { + if (typeof object.kvlistValue !== "object") + throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected"); + message.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.fromObject(object.kvlistValue); + } + if (object.bytesValue != null) + if (typeof object.bytesValue === "string") + $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); + else if (object.bytesValue.length >= 0) + message.bytesValue = object.bytesValue; + return message; + }; + /** + * Creates a plain object from an AnyValue message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {opentelemetry.proto.common.v1.AnyValue} message AnyValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnyValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (typeof message.intValue === "number") + object.intValue = options.longs === String ? String(message.intValue) : message.intValue; + else + 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; + if (options.oneofs) + object.value = "intValue"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.value = "doubleValue"; + } + if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { + object.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.toObject(message.arrayValue, options); + if (options.oneofs) + object.value = "arrayValue"; + } + if (message.kvlistValue != null && message.hasOwnProperty("kvlistValue")) { + object.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.toObject(message.kvlistValue, options); + if (options.oneofs) + object.value = "kvlistValue"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; + if (options.oneofs) + object.value = "bytesValue"; + } + return object; + }; + /** + * Converts this AnyValue to JSON. + * @function toJSON + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + * @returns {Object.} JSON object + */ + AnyValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for AnyValue + * @function getTypeUrl + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.common.v1.AnyValue"; + }; + return AnyValue; + })(); + v1.ArrayValue = (function () { + /** + * Properties of an ArrayValue. + * @memberof opentelemetry.proto.common.v1 + * @interface IArrayValue + * @property {Array.|null} [values] ArrayValue values + */ + /** + * Constructs a new ArrayValue. + * @memberof opentelemetry.proto.common.v1 + * @classdesc Represents an ArrayValue. + * @implements IArrayValue + * @constructor + * @param {opentelemetry.proto.common.v1.IArrayValue=} [properties] Properties to set + */ + function ArrayValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ArrayValue values. + * @member {Array.} values + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @instance + */ + ArrayValue.prototype.values = $util.emptyArray; + /** + * Creates a new ArrayValue instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {opentelemetry.proto.common.v1.IArrayValue=} [properties] Properties to set + * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue instance + */ + ArrayValue.create = function create(properties) { + return new ArrayValue(properties); + }; + /** + * Encodes the specified ArrayValue message. Does not implicitly {@link opentelemetry.proto.common.v1.ArrayValue.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {opentelemetry.proto.common.v1.IArrayValue} message ArrayValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArrayValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.opentelemetry.proto.common.v1.AnyValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ArrayValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.ArrayValue.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {opentelemetry.proto.common.v1.IArrayValue} message ArrayValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArrayValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ArrayValue message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArrayValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.ArrayValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ArrayValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArrayValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ArrayValue message. + * @function verify + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArrayValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + /** + * Creates an ArrayValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue + */ + ArrayValue.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.common.v1.ArrayValue) + return object; + var message = new $root.opentelemetry.proto.common.v1.ArrayValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected"); + message.values[i] = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.values[i]); + } + } + return message; + }; + /** + * Creates a plain object from an ArrayValue message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {opentelemetry.proto.common.v1.ArrayValue} message ArrayValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArrayValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.values[j], options); + } + return object; + }; + /** + * Converts this ArrayValue to JSON. + * @function toJSON + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @instance + * @returns {Object.} JSON object + */ + ArrayValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ArrayValue + * @function getTypeUrl + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArrayValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.common.v1.ArrayValue"; + }; + return ArrayValue; + })(); + v1.KeyValueList = (function () { + /** + * Properties of a KeyValueList. + * @memberof opentelemetry.proto.common.v1 + * @interface IKeyValueList + * @property {Array.|null} [values] KeyValueList values + */ + /** + * Constructs a new KeyValueList. + * @memberof opentelemetry.proto.common.v1 + * @classdesc Represents a KeyValueList. + * @implements IKeyValueList + * @constructor + * @param {opentelemetry.proto.common.v1.IKeyValueList=} [properties] Properties to set + */ + function KeyValueList(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * KeyValueList values. + * @member {Array.} values + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @instance + */ + KeyValueList.prototype.values = $util.emptyArray; + /** + * Creates a new KeyValueList instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {opentelemetry.proto.common.v1.IKeyValueList=} [properties] Properties to set + * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList instance + */ + KeyValueList.create = function create(properties) { + return new KeyValueList(properties); + }; + /** + * Encodes the specified KeyValueList message. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValueList.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {opentelemetry.proto.common.v1.IKeyValueList} message KeyValueList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValueList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified KeyValueList message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValueList.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {opentelemetry.proto.common.v1.IKeyValueList} message KeyValueList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValueList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a KeyValueList message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValueList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.KeyValueList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a KeyValueList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValueList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a KeyValueList message. + * @function verify + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyValueList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + /** + * Creates a KeyValueList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList + */ + KeyValueList.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.common.v1.KeyValueList) + return object; + var message = new $root.opentelemetry.proto.common.v1.KeyValueList(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected"); + message.values[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.values[i]); + } + } + return message; + }; + /** + * Creates a plain object from a KeyValueList message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {opentelemetry.proto.common.v1.KeyValueList} message KeyValueList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyValueList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.values[j], options); + } + return object; + }; + /** + * Converts this KeyValueList to JSON. + * @function toJSON + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @instance + * @returns {Object.} JSON object + */ + KeyValueList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for KeyValueList + * @function getTypeUrl + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyValueList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.common.v1.KeyValueList"; + }; + return KeyValueList; + })(); + v1.KeyValue = (function () { + /** + * Properties of a KeyValue. + * @memberof opentelemetry.proto.common.v1 + * @interface IKeyValue + * @property {string|null} [key] KeyValue key + * @property {opentelemetry.proto.common.v1.IAnyValue|null} [value] KeyValue value + */ + /** + * Constructs a new KeyValue. + * @memberof opentelemetry.proto.common.v1 + * @classdesc Represents a KeyValue. + * @implements IKeyValue + * @constructor + * @param {opentelemetry.proto.common.v1.IKeyValue=} [properties] Properties to set + */ + function KeyValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * KeyValue key. + * @member {string|null|undefined} key + * @memberof opentelemetry.proto.common.v1.KeyValue + * @instance + */ + KeyValue.prototype.key = null; + /** + * KeyValue value. + * @member {opentelemetry.proto.common.v1.IAnyValue|null|undefined} value + * @memberof opentelemetry.proto.common.v1.KeyValue + * @instance + */ + KeyValue.prototype.value = null; + /** + * Creates a new KeyValue instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {opentelemetry.proto.common.v1.IKeyValue=} [properties] Properties to set + * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue instance + */ + KeyValue.create = function create(properties) { + return new KeyValue(properties); + }; + /** + * Encodes the specified KeyValue message. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValue.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {opentelemetry.proto.common.v1.IKeyValue} message KeyValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.opentelemetry.proto.common.v1.AnyValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified KeyValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValue.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {opentelemetry.proto.common.v1.IKeyValue} message KeyValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a KeyValue message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.KeyValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = $root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a KeyValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a KeyValue message. + * @function verify + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + /** + * Creates a KeyValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue + */ + KeyValue.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.common.v1.KeyValue) + return object; + var message = new $root.opentelemetry.proto.common.v1.KeyValue(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected"); + message.value = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.value); + } + return message; + }; + /** + * Creates a plain object from a KeyValue message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {opentelemetry.proto.common.v1.KeyValue} message KeyValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.value = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.value, options); + return object; + }; + /** + * Converts this KeyValue to JSON. + * @function toJSON + * @memberof opentelemetry.proto.common.v1.KeyValue + * @instance + * @returns {Object.} JSON object + */ + KeyValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for KeyValue + * @function getTypeUrl + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.common.v1.KeyValue"; + }; + return KeyValue; + })(); + v1.InstrumentationScope = (function () { + /** + * Properties of an InstrumentationScope. + * @memberof opentelemetry.proto.common.v1 + * @interface IInstrumentationScope + * @property {string|null} [name] InstrumentationScope name + * @property {string|null} [version] InstrumentationScope version + * @property {Array.|null} [attributes] InstrumentationScope attributes + * @property {number|null} [droppedAttributesCount] InstrumentationScope droppedAttributesCount + */ + /** + * Constructs a new InstrumentationScope. + * @memberof opentelemetry.proto.common.v1 + * @classdesc Represents an InstrumentationScope. + * @implements IInstrumentationScope + * @constructor + * @param {opentelemetry.proto.common.v1.IInstrumentationScope=} [properties] Properties to set + */ + function InstrumentationScope(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * InstrumentationScope name. + * @member {string|null|undefined} name + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @instance + */ + InstrumentationScope.prototype.name = null; + /** + * InstrumentationScope version. + * @member {string|null|undefined} version + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @instance + */ + InstrumentationScope.prototype.version = null; + /** + * InstrumentationScope attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @instance + */ + InstrumentationScope.prototype.attributes = $util.emptyArray; + /** + * InstrumentationScope droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @instance + */ + InstrumentationScope.prototype.droppedAttributesCount = null; + /** + * Creates a new InstrumentationScope instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {opentelemetry.proto.common.v1.IInstrumentationScope=} [properties] Properties to set + * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope instance + */ + InstrumentationScope.create = function create(properties) { + return new InstrumentationScope(properties); + }; + /** + * Encodes the specified InstrumentationScope message. Does not implicitly {@link opentelemetry.proto.common.v1.InstrumentationScope.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {opentelemetry.proto.common.v1.IInstrumentationScope} message InstrumentationScope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstrumentationScope.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.version); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 3, wireType 2 =*/ 26).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 4, wireType 0 =*/ 32).uint32(message.droppedAttributesCount); + return writer; + }; + /** + * Encodes the specified InstrumentationScope message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.InstrumentationScope.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {opentelemetry.proto.common.v1.IInstrumentationScope} message InstrumentationScope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstrumentationScope.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an InstrumentationScope message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstrumentationScope.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.InstrumentationScope(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + case 3: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 4: { + message.droppedAttributesCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an InstrumentationScope message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstrumentationScope.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an InstrumentationScope message. + * @function verify + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstrumentationScope.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + return null; + }; + /** + * Creates an InstrumentationScope message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope + */ + InstrumentationScope.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.common.v1.InstrumentationScope) + return object; + var message = new $root.opentelemetry.proto.common.v1.InstrumentationScope(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + return message; + }; + /** + * Creates a plain object from an InstrumentationScope message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {opentelemetry.proto.common.v1.InstrumentationScope} message InstrumentationScope + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstrumentationScope.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) { + object.name = ""; + object.version = ""; + object.droppedAttributesCount = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + return object; + }; + /** + * Converts this InstrumentationScope to JSON. + * @function toJSON + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @instance + * @returns {Object.} JSON object + */ + InstrumentationScope.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for InstrumentationScope + * @function getTypeUrl + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstrumentationScope.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.common.v1.InstrumentationScope"; + }; + return InstrumentationScope; + })(); + return v1; + })(); + return common; + })(); + proto.resource = (function () { + /** + * Namespace resource. + * @memberof opentelemetry.proto + * @namespace + */ + var resource = {}; + resource.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.resource + * @namespace + */ + var v1 = {}; + v1.Resource = (function () { + /** + * Properties of a Resource. + * @memberof opentelemetry.proto.resource.v1 + * @interface IResource + * @property {Array.|null} [attributes] Resource attributes + * @property {number|null} [droppedAttributesCount] Resource droppedAttributesCount + */ + /** + * Constructs a new Resource. + * @memberof opentelemetry.proto.resource.v1 + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {opentelemetry.proto.resource.v1.IResource=} [properties] Properties to set + */ + function Resource(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Resource attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.resource.v1.Resource + * @instance + */ + Resource.prototype.attributes = $util.emptyArray; + /** + * Resource droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.resource.v1.Resource + * @instance + */ + Resource.prototype.droppedAttributesCount = null; + /** + * Creates a new Resource instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {opentelemetry.proto.resource.v1.IResource=} [properties] Properties to set + * @returns {opentelemetry.proto.resource.v1.Resource} Resource instance + */ + Resource.create = function create(properties) { + return new Resource(properties); + }; + /** + * Encodes the specified Resource message. Does not implicitly {@link opentelemetry.proto.resource.v1.Resource.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {opentelemetry.proto.resource.v1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 2, wireType 0 =*/ 16).uint32(message.droppedAttributesCount); + return writer; + }; + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link opentelemetry.proto.resource.v1.Resource.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {opentelemetry.proto.resource.v1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Resource message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.resource.v1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.resource.v1.Resource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.droppedAttributesCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.resource.v1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Resource message. + * @function verify + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Resource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + return null; + }; + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.resource.v1.Resource} Resource + */ + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.resource.v1.Resource) + return object; + var message = new $root.opentelemetry.proto.resource.v1.Resource(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + return message; + }; + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {opentelemetry.proto.resource.v1.Resource} message Resource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Resource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) + object.droppedAttributesCount = 0; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + return object; + }; + /** + * Converts this Resource to JSON. + * @function toJSON + * @memberof opentelemetry.proto.resource.v1.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Resource + * @function getTypeUrl + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.resource.v1.Resource"; + }; + return Resource; + })(); + return v1; + })(); + return resource; + })(); + proto.trace = (function () { + /** + * Namespace trace. + * @memberof opentelemetry.proto + * @namespace + */ + var trace = {}; + trace.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.trace + * @namespace + */ + var v1 = {}; + v1.TracesData = (function () { + /** + * Properties of a TracesData. + * @memberof opentelemetry.proto.trace.v1 + * @interface ITracesData + * @property {Array.|null} [resourceSpans] TracesData resourceSpans + */ + /** + * Constructs a new TracesData. + * @memberof opentelemetry.proto.trace.v1 + * @classdesc Represents a TracesData. + * @implements ITracesData + * @constructor + * @param {opentelemetry.proto.trace.v1.ITracesData=} [properties] Properties to set + */ + function TracesData(properties) { + this.resourceSpans = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * TracesData resourceSpans. + * @member {Array.} resourceSpans + * @memberof opentelemetry.proto.trace.v1.TracesData + * @instance + */ + TracesData.prototype.resourceSpans = $util.emptyArray; + /** + * Creates a new TracesData instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {opentelemetry.proto.trace.v1.ITracesData=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData instance + */ + TracesData.create = function create(properties) { + return new TracesData(properties); + }; + /** + * Encodes the specified TracesData message. Does not implicitly {@link opentelemetry.proto.trace.v1.TracesData.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {opentelemetry.proto.trace.v1.ITracesData} message TracesData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TracesData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceSpans != null && message.resourceSpans.length) + for (var i = 0; i < message.resourceSpans.length; ++i) + $root.opentelemetry.proto.trace.v1.ResourceSpans.encode(message.resourceSpans[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified TracesData message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.TracesData.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {opentelemetry.proto.trace.v1.ITracesData} message TracesData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TracesData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a TracesData message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TracesData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.TracesData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceSpans && message.resourceSpans.length)) + message.resourceSpans = []; + message.resourceSpans.push($root.opentelemetry.proto.trace.v1.ResourceSpans.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a TracesData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TracesData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a TracesData message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TracesData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceSpans != null && message.hasOwnProperty("resourceSpans")) { + if (!Array.isArray(message.resourceSpans)) + return "resourceSpans: array expected"; + for (var i = 0; i < message.resourceSpans.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.ResourceSpans.verify(message.resourceSpans[i]); + if (error) + return "resourceSpans." + error; + } + } + return null; + }; + /** + * Creates a TracesData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData + */ + TracesData.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.TracesData) + return object; + var message = new $root.opentelemetry.proto.trace.v1.TracesData(); + if (object.resourceSpans) { + if (!Array.isArray(object.resourceSpans)) + throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected"); + message.resourceSpans = []; + for (var i = 0; i < object.resourceSpans.length; ++i) { + if (typeof object.resourceSpans[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected"); + message.resourceSpans[i] = $root.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(object.resourceSpans[i]); + } + } + return message; + }; + /** + * Creates a plain object from a TracesData message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {opentelemetry.proto.trace.v1.TracesData} message TracesData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TracesData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceSpans = []; + if (message.resourceSpans && message.resourceSpans.length) { + object.resourceSpans = []; + for (var j = 0; j < message.resourceSpans.length; ++j) + object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j], options); + } + return object; + }; + /** + * Converts this TracesData to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.TracesData + * @instance + * @returns {Object.} JSON object + */ + TracesData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for TracesData + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TracesData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.TracesData"; + }; + return TracesData; + })(); + v1.ResourceSpans = (function () { + /** + * Properties of a ResourceSpans. + * @memberof opentelemetry.proto.trace.v1 + * @interface IResourceSpans + * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceSpans resource + * @property {Array.|null} [scopeSpans] ResourceSpans scopeSpans + * @property {string|null} [schemaUrl] ResourceSpans schemaUrl + */ + /** + * Constructs a new ResourceSpans. + * @memberof opentelemetry.proto.trace.v1 + * @classdesc Represents a ResourceSpans. + * @implements IResourceSpans + * @constructor + * @param {opentelemetry.proto.trace.v1.IResourceSpans=} [properties] Properties to set + */ + function ResourceSpans(properties) { + this.scopeSpans = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ResourceSpans resource. + * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @instance + */ + ResourceSpans.prototype.resource = null; + /** + * ResourceSpans scopeSpans. + * @member {Array.} scopeSpans + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @instance + */ + ResourceSpans.prototype.scopeSpans = $util.emptyArray; + /** + * ResourceSpans schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @instance + */ + ResourceSpans.prototype.schemaUrl = null; + /** + * Creates a new ResourceSpans instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {opentelemetry.proto.trace.v1.IResourceSpans=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans instance + */ + ResourceSpans.create = function create(properties) { + return new ResourceSpans(properties); + }; + /** + * Encodes the specified ResourceSpans message. Does not implicitly {@link opentelemetry.proto.trace.v1.ResourceSpans.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {opentelemetry.proto.trace.v1.IResourceSpans} message ResourceSpans message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpans.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.scopeSpans != null && message.scopeSpans.length) + for (var i = 0; i < message.scopeSpans.length; ++i) + $root.opentelemetry.proto.trace.v1.ScopeSpans.encode(message.scopeSpans[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ResourceSpans message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.ResourceSpans.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {opentelemetry.proto.trace.v1.IResourceSpans} message ResourceSpans message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpans.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ResourceSpans message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpans.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.ResourceSpans(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.scopeSpans && message.scopeSpans.length)) + message.scopeSpans = []; + message.scopeSpans.push($root.opentelemetry.proto.trace.v1.ScopeSpans.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ResourceSpans message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpans.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ResourceSpans message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSpans.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.scopeSpans != null && message.hasOwnProperty("scopeSpans")) { + if (!Array.isArray(message.scopeSpans)) + return "scopeSpans: array expected"; + for (var i = 0; i < message.scopeSpans.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.ScopeSpans.verify(message.scopeSpans[i]); + if (error) + return "scopeSpans." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ResourceSpans message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans + */ + ResourceSpans.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.ResourceSpans) + return object; + var message = new $root.opentelemetry.proto.trace.v1.ResourceSpans(); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected"); + message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource); + } + if (object.scopeSpans) { + if (!Array.isArray(object.scopeSpans)) + throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected"); + message.scopeSpans = []; + for (var i = 0; i < object.scopeSpans.length; ++i) { + if (typeof object.scopeSpans[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected"); + message.scopeSpans[i] = $root.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(object.scopeSpans[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ResourceSpans message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {opentelemetry.proto.trace.v1.ResourceSpans} message ResourceSpans + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSpans.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopeSpans = []; + if (options.defaults) { + object.resource = null; + object.schemaUrl = ""; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options); + if (message.scopeSpans && message.scopeSpans.length) { + object.scopeSpans = []; + for (var j = 0; j < message.scopeSpans.length; ++j) + object.scopeSpans[j] = $root.opentelemetry.proto.trace.v1.ScopeSpans.toObject(message.scopeSpans[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ResourceSpans to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @instance + * @returns {Object.} JSON object + */ + ResourceSpans.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ResourceSpans + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceSpans.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.ResourceSpans"; + }; + return ResourceSpans; + })(); + v1.ScopeSpans = (function () { + /** + * Properties of a ScopeSpans. + * @memberof opentelemetry.proto.trace.v1 + * @interface IScopeSpans + * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeSpans scope + * @property {Array.|null} [spans] ScopeSpans spans + * @property {string|null} [schemaUrl] ScopeSpans schemaUrl + */ + /** + * Constructs a new ScopeSpans. + * @memberof opentelemetry.proto.trace.v1 + * @classdesc Represents a ScopeSpans. + * @implements IScopeSpans + * @constructor + * @param {opentelemetry.proto.trace.v1.IScopeSpans=} [properties] Properties to set + */ + function ScopeSpans(properties) { + this.spans = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ScopeSpans scope. + * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @instance + */ + ScopeSpans.prototype.scope = null; + /** + * ScopeSpans spans. + * @member {Array.} spans + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @instance + */ + ScopeSpans.prototype.spans = $util.emptyArray; + /** + * ScopeSpans schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @instance + */ + ScopeSpans.prototype.schemaUrl = null; + /** + * Creates a new ScopeSpans instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {opentelemetry.proto.trace.v1.IScopeSpans=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans instance + */ + ScopeSpans.create = function create(properties) { + return new ScopeSpans(properties); + }; + /** + * Encodes the specified ScopeSpans message. Does not implicitly {@link opentelemetry.proto.trace.v1.ScopeSpans.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {opentelemetry.proto.trace.v1.IScopeSpans} message ScopeSpans message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeSpans.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.spans != null && message.spans.length) + for (var i = 0; i < message.spans.length; ++i) + $root.opentelemetry.proto.trace.v1.Span.encode(message.spans[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ScopeSpans message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.ScopeSpans.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {opentelemetry.proto.trace.v1.IScopeSpans} message ScopeSpans message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeSpans.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ScopeSpans message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeSpans.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.ScopeSpans(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.spans && message.spans.length)) + message.spans = []; + message.spans.push($root.opentelemetry.proto.trace.v1.Span.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ScopeSpans message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeSpans.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ScopeSpans message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScopeSpans.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope); + if (error) + return "scope." + error; + } + if (message.spans != null && message.hasOwnProperty("spans")) { + if (!Array.isArray(message.spans)) + return "spans: array expected"; + for (var i = 0; i < message.spans.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.Span.verify(message.spans[i]); + if (error) + return "spans." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ScopeSpans message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans + */ + ScopeSpans.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.ScopeSpans) + return object; + var message = new $root.opentelemetry.proto.trace.v1.ScopeSpans(); + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected"); + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope); + } + if (object.spans) { + if (!Array.isArray(object.spans)) + throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected"); + message.spans = []; + for (var i = 0; i < object.spans.length; ++i) { + if (typeof object.spans[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected"); + message.spans[i] = $root.opentelemetry.proto.trace.v1.Span.fromObject(object.spans[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ScopeSpans message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {opentelemetry.proto.trace.v1.ScopeSpans} message ScopeSpans + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScopeSpans.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.spans = []; + if (options.defaults) { + object.scope = null; + object.schemaUrl = ""; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options); + if (message.spans && message.spans.length) { + object.spans = []; + for (var j = 0; j < message.spans.length; ++j) + object.spans[j] = $root.opentelemetry.proto.trace.v1.Span.toObject(message.spans[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ScopeSpans to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @instance + * @returns {Object.} JSON object + */ + ScopeSpans.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ScopeSpans + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScopeSpans.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.ScopeSpans"; + }; + return ScopeSpans; + })(); + v1.Span = (function () { + /** + * Properties of a Span. + * @memberof opentelemetry.proto.trace.v1 + * @interface ISpan + * @property {Uint8Array|null} [traceId] Span traceId + * @property {Uint8Array|null} [spanId] Span spanId + * @property {string|null} [traceState] Span traceState + * @property {Uint8Array|null} [parentSpanId] Span parentSpanId + * @property {string|null} [name] Span name + * @property {opentelemetry.proto.trace.v1.Span.SpanKind|null} [kind] Span kind + * @property {number|Long|null} [startTimeUnixNano] Span startTimeUnixNano + * @property {number|Long|null} [endTimeUnixNano] Span endTimeUnixNano + * @property {Array.|null} [attributes] Span attributes + * @property {number|null} [droppedAttributesCount] Span droppedAttributesCount + * @property {Array.|null} [events] Span events + * @property {number|null} [droppedEventsCount] Span droppedEventsCount + * @property {Array.|null} [links] Span links + * @property {number|null} [droppedLinksCount] Span droppedLinksCount + * @property {opentelemetry.proto.trace.v1.IStatus|null} [status] Span status + */ + /** + * Constructs a new Span. + * @memberof opentelemetry.proto.trace.v1 + * @classdesc Represents a Span. + * @implements ISpan + * @constructor + * @param {opentelemetry.proto.trace.v1.ISpan=} [properties] Properties to set + */ + function Span(properties) { + this.attributes = []; + this.events = []; + this.links = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Span traceId. + * @member {Uint8Array|null|undefined} traceId + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.traceId = null; + /** + * Span spanId. + * @member {Uint8Array|null|undefined} spanId + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.spanId = null; + /** + * Span traceState. + * @member {string|null|undefined} traceState + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.traceState = null; + /** + * Span parentSpanId. + * @member {Uint8Array|null|undefined} parentSpanId + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.parentSpanId = null; + /** + * Span name. + * @member {string|null|undefined} name + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.name = null; + /** + * Span kind. + * @member {opentelemetry.proto.trace.v1.Span.SpanKind|null|undefined} kind + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.kind = null; + /** + * Span startTimeUnixNano. + * @member {number|Long|null|undefined} startTimeUnixNano + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.startTimeUnixNano = null; + /** + * Span endTimeUnixNano. + * @member {number|Long|null|undefined} endTimeUnixNano + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.endTimeUnixNano = null; + /** + * Span attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.attributes = $util.emptyArray; + /** + * Span droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.droppedAttributesCount = null; + /** + * Span events. + * @member {Array.} events + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.events = $util.emptyArray; + /** + * Span droppedEventsCount. + * @member {number|null|undefined} droppedEventsCount + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.droppedEventsCount = null; + /** + * Span links. + * @member {Array.} links + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.links = $util.emptyArray; + /** + * Span droppedLinksCount. + * @member {number|null|undefined} droppedLinksCount + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.droppedLinksCount = null; + /** + * Span status. + * @member {opentelemetry.proto.trace.v1.IStatus|null|undefined} status + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.status = null; + /** + * Creates a new Span instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {opentelemetry.proto.trace.v1.ISpan=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.Span} Span instance + */ + Span.create = function create(properties) { + return new Span(properties); + }; + /** + * Encodes the specified Span message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {opentelemetry.proto.trace.v1.ISpan} message Span message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Span.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) + writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.traceId); + if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) + writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.spanId); + if (message.traceState != null && Object.hasOwnProperty.call(message, "traceState")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.traceState); + if (message.parentSpanId != null && Object.hasOwnProperty.call(message, "parentSpanId")) + writer.uint32(/* id 4, wireType 2 =*/ 34).bytes(message.parentSpanId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.name); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 6, wireType 0 =*/ 48).int32(message.kind); + if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) + writer.uint32(/* id 7, wireType 1 =*/ 57).fixed64(message.startTimeUnixNano); + if (message.endTimeUnixNano != null && Object.hasOwnProperty.call(message, "endTimeUnixNano")) + writer.uint32(/* id 8, wireType 1 =*/ 65).fixed64(message.endTimeUnixNano); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.droppedAttributesCount); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.opentelemetry.proto.trace.v1.Span.Event.encode(message.events[i], writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim(); + if (message.droppedEventsCount != null && Object.hasOwnProperty.call(message, "droppedEventsCount")) + writer.uint32(/* id 12, wireType 0 =*/ 96).uint32(message.droppedEventsCount); + if (message.links != null && message.links.length) + for (var i = 0; i < message.links.length; ++i) + $root.opentelemetry.proto.trace.v1.Span.Link.encode(message.links[i], writer.uint32(/* id 13, wireType 2 =*/ 106).fork()).ldelim(); + if (message.droppedLinksCount != null && Object.hasOwnProperty.call(message, "droppedLinksCount")) + writer.uint32(/* id 14, wireType 0 =*/ 112).uint32(message.droppedLinksCount); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.opentelemetry.proto.trace.v1.Status.encode(message.status, writer.uint32(/* id 15, wireType 2 =*/ 122).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified Span message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {opentelemetry.proto.trace.v1.ISpan} message Span message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Span.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Span message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.Span} Span + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Span.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.traceId = reader.bytes(); + break; + } + case 2: { + message.spanId = reader.bytes(); + break; + } + case 3: { + message.traceState = reader.string(); + break; + } + case 4: { + message.parentSpanId = reader.bytes(); + break; + } + case 5: { + message.name = reader.string(); + break; + } + case 6: { + message.kind = reader.int32(); + break; + } + case 7: { + message.startTimeUnixNano = reader.fixed64(); + break; + } + case 8: { + message.endTimeUnixNano = reader.fixed64(); + break; + } + case 9: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 10: { + message.droppedAttributesCount = reader.uint32(); + break; + } + case 11: { + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.opentelemetry.proto.trace.v1.Span.Event.decode(reader, reader.uint32())); + break; + } + case 12: { + message.droppedEventsCount = reader.uint32(); + break; + } + case 13: { + if (!(message.links && message.links.length)) + message.links = []; + message.links.push($root.opentelemetry.proto.trace.v1.Span.Link.decode(reader, reader.uint32())); + break; + } + case 14: { + message.droppedLinksCount = reader.uint32(); + break; + } + case 15: { + message.status = $root.opentelemetry.proto.trace.v1.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Span message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.Span} Span + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Span.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Span message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Span.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.traceId != null && message.hasOwnProperty("traceId")) + if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) + return "traceId: buffer expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) + return "spanId: buffer expected"; + if (message.traceState != null && message.hasOwnProperty("traceState")) + if (!$util.isString(message.traceState)) + return "traceState: string expected"; + if (message.parentSpanId != null && message.hasOwnProperty("parentSpanId")) + if (!(message.parentSpanId && typeof message.parentSpanId.length === "number" || $util.isString(message.parentSpanId))) + return "parentSpanId: buffer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) + return "startTimeUnixNano: integer|Long expected"; + if (message.endTimeUnixNano != null && message.hasOwnProperty("endTimeUnixNano")) + if (!$util.isInteger(message.endTimeUnixNano) && !(message.endTimeUnixNano && $util.isInteger(message.endTimeUnixNano.low) && $util.isInteger(message.endTimeUnixNano.high))) + return "endTimeUnixNano: integer|Long expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.Span.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.droppedEventsCount != null && message.hasOwnProperty("droppedEventsCount")) + if (!$util.isInteger(message.droppedEventsCount)) + return "droppedEventsCount: integer expected"; + if (message.links != null && message.hasOwnProperty("links")) { + if (!Array.isArray(message.links)) + return "links: array expected"; + for (var i = 0; i < message.links.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.Span.Link.verify(message.links[i]); + if (error) + return "links." + error; + } + } + if (message.droppedLinksCount != null && message.hasOwnProperty("droppedLinksCount")) + if (!$util.isInteger(message.droppedLinksCount)) + return "droppedLinksCount: integer expected"; + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.opentelemetry.proto.trace.v1.Status.verify(message.status); + if (error) + return "status." + error; + } + return null; + }; + /** + * Creates a Span message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.Span} Span + */ + Span.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.Span) + return object; + var message = new $root.opentelemetry.proto.trace.v1.Span(); + if (object.traceId != null) + if (typeof object.traceId === "string") + $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); + else if (object.traceId.length >= 0) + message.traceId = object.traceId; + if (object.spanId != null) + if (typeof object.spanId === "string") + $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); + else if (object.spanId.length >= 0) + message.spanId = object.spanId; + if (object.traceState != null) + message.traceState = String(object.traceState); + if (object.parentSpanId != null) + if (typeof object.parentSpanId === "string") + $util.base64.decode(object.parentSpanId, message.parentSpanId = $util.newBuffer($util.base64.length(object.parentSpanId)), 0); + else if (object.parentSpanId.length >= 0) + message.parentSpanId = object.parentSpanId; + if (object.name != null) + message.name = String(object.name); + switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; + case "SPAN_KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "SPAN_KIND_INTERNAL": + case 1: + message.kind = 1; + break; + case "SPAN_KIND_SERVER": + case 2: + message.kind = 2; + break; + case "SPAN_KIND_CLIENT": + case 3: + message.kind = 3; + break; + case "SPAN_KIND_PRODUCER": + case 4: + message.kind = 4; + break; + case "SPAN_KIND_CONSUMER": + case 5: + message.kind = 5; + break; + } + if (object.startTimeUnixNano != null) + if ($util.Long) + (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; + else if (typeof object.startTimeUnixNano === "string") + message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); + else if (typeof object.startTimeUnixNano === "number") + message.startTimeUnixNano = object.startTimeUnixNano; + else if (typeof object.startTimeUnixNano === "object") + message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); + if (object.endTimeUnixNano != null) + if ($util.Long) + (message.endTimeUnixNano = $util.Long.fromValue(object.endTimeUnixNano)).unsigned = false; + else if (typeof object.endTimeUnixNano === "string") + message.endTimeUnixNano = parseInt(object.endTimeUnixNano, 10); + else if (typeof object.endTimeUnixNano === "number") + message.endTimeUnixNano = object.endTimeUnixNano; + else if (typeof object.endTimeUnixNano === "object") + message.endTimeUnixNano = new $util.LongBits(object.endTimeUnixNano.low >>> 0, object.endTimeUnixNano.high >>> 0).toNumber(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected"); + message.events[i] = $root.opentelemetry.proto.trace.v1.Span.Event.fromObject(object.events[i]); + } + } + if (object.droppedEventsCount != null) + message.droppedEventsCount = object.droppedEventsCount >>> 0; + if (object.links) { + if (!Array.isArray(object.links)) + throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected"); + message.links = []; + for (var i = 0; i < object.links.length; ++i) { + if (typeof object.links[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected"); + message.links[i] = $root.opentelemetry.proto.trace.v1.Span.Link.fromObject(object.links[i]); + } + } + if (object.droppedLinksCount != null) + message.droppedLinksCount = object.droppedLinksCount >>> 0; + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected"); + message.status = $root.opentelemetry.proto.trace.v1.Status.fromObject(object.status); + } + return message; + }; + /** + * Creates a plain object from a Span message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {opentelemetry.proto.trace.v1.Span} message Span + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Span.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.attributes = []; + object.events = []; + object.links = []; + } + if (options.defaults) { + if (options.bytes === String) + object.traceId = ""; + else { + object.traceId = []; + if (options.bytes !== Array) + object.traceId = $util.newBuffer(object.traceId); + } + if (options.bytes === String) + object.spanId = ""; + else { + object.spanId = []; + if (options.bytes !== Array) + object.spanId = $util.newBuffer(object.spanId); + } + object.traceState = ""; + if (options.bytes === String) + object.parentSpanId = ""; + else { + object.parentSpanId = []; + if (options.bytes !== Array) + object.parentSpanId = $util.newBuffer(object.parentSpanId); + } + object.name = ""; + object.kind = options.enums === String ? "SPAN_KIND_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.startTimeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.endTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.endTimeUnixNano = options.longs === String ? "0" : 0; + object.droppedAttributesCount = 0; + object.droppedEventsCount = 0; + object.droppedLinksCount = 0; + object.status = null; + } + if (message.traceId != null && message.hasOwnProperty("traceId")) + object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; + if (message.traceState != null && message.hasOwnProperty("traceState")) + object.traceState = message.traceState; + if (message.parentSpanId != null && message.hasOwnProperty("parentSpanId")) + object.parentSpanId = options.bytes === String ? $util.base64.encode(message.parentSpanId, 0, message.parentSpanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentSpanId) : message.parentSpanId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.opentelemetry.proto.trace.v1.Span.SpanKind[message.kind] === undefined ? message.kind : $root.opentelemetry.proto.trace.v1.Span.SpanKind[message.kind] : message.kind; + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (typeof message.startTimeUnixNano === "number") + object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; + else + object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; + if (message.endTimeUnixNano != null && message.hasOwnProperty("endTimeUnixNano")) + if (typeof message.endTimeUnixNano === "number") + object.endTimeUnixNano = options.longs === String ? String(message.endTimeUnixNano) : message.endTimeUnixNano; + else + object.endTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.endTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.endTimeUnixNano.low >>> 0, message.endTimeUnixNano.high >>> 0).toNumber() : message.endTimeUnixNano; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.opentelemetry.proto.trace.v1.Span.Event.toObject(message.events[j], options); + } + if (message.droppedEventsCount != null && message.hasOwnProperty("droppedEventsCount")) + object.droppedEventsCount = message.droppedEventsCount; + if (message.links && message.links.length) { + object.links = []; + for (var j = 0; j < message.links.length; ++j) + object.links[j] = $root.opentelemetry.proto.trace.v1.Span.Link.toObject(message.links[j], options); + } + if (message.droppedLinksCount != null && message.hasOwnProperty("droppedLinksCount")) + object.droppedLinksCount = message.droppedLinksCount; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.opentelemetry.proto.trace.v1.Status.toObject(message.status, options); + return object; + }; + /** + * Converts this Span to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + * @returns {Object.} JSON object + */ + Span.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Span + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Span.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Span"; + }; + /** + * SpanKind enum. + * @name opentelemetry.proto.trace.v1.Span.SpanKind + * @enum {number} + * @property {number} SPAN_KIND_UNSPECIFIED=0 SPAN_KIND_UNSPECIFIED value + * @property {number} SPAN_KIND_INTERNAL=1 SPAN_KIND_INTERNAL value + * @property {number} SPAN_KIND_SERVER=2 SPAN_KIND_SERVER value + * @property {number} SPAN_KIND_CLIENT=3 SPAN_KIND_CLIENT value + * @property {number} SPAN_KIND_PRODUCER=4 SPAN_KIND_PRODUCER value + * @property {number} SPAN_KIND_CONSUMER=5 SPAN_KIND_CONSUMER value + */ + Span.SpanKind = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPAN_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPAN_KIND_INTERNAL"] = 1; + values[valuesById[2] = "SPAN_KIND_SERVER"] = 2; + values[valuesById[3] = "SPAN_KIND_CLIENT"] = 3; + values[valuesById[4] = "SPAN_KIND_PRODUCER"] = 4; + values[valuesById[5] = "SPAN_KIND_CONSUMER"] = 5; + return values; + })(); + Span.Event = (function () { + /** + * Properties of an Event. + * @memberof opentelemetry.proto.trace.v1.Span + * @interface IEvent + * @property {number|Long|null} [timeUnixNano] Event timeUnixNano + * @property {string|null} [name] Event name + * @property {Array.|null} [attributes] Event attributes + * @property {number|null} [droppedAttributesCount] Event droppedAttributesCount + */ + /** + * Constructs a new Event. + * @memberof opentelemetry.proto.trace.v1.Span + * @classdesc Represents an Event. + * @implements IEvent + * @constructor + * @param {opentelemetry.proto.trace.v1.Span.IEvent=} [properties] Properties to set + */ + function Event(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Event timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @instance + */ + Event.prototype.timeUnixNano = null; + /** + * Event name. + * @member {string|null|undefined} name + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @instance + */ + Event.prototype.name = null; + /** + * Event attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @instance + */ + Event.prototype.attributes = $util.emptyArray; + /** + * Event droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @instance + */ + Event.prototype.droppedAttributesCount = null; + /** + * Creates a new Event instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {opentelemetry.proto.trace.v1.Span.IEvent=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.Span.Event} Event instance + */ + Event.create = function create(properties) { + return new Event(properties); + }; + /** + * Encodes the specified Event message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Event.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {opentelemetry.proto.trace.v1.Span.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 1, wireType 1 =*/ 9).fixed64(message.timeUnixNano); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 3, wireType 2 =*/ 26).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 4, wireType 0 =*/ 32).uint32(message.droppedAttributesCount); + return writer; + }; + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Event.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {opentelemetry.proto.trace.v1.Span.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an Event message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.Span.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span.Event(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 4: { + message.droppedAttributesCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.Span.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an Event message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Event.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + return null; + }; + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.Span.Event} Event + */ + Event.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.Span.Event) + return object; + var message = new $root.opentelemetry.proto.trace.v1.Span.Event(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.name != null) + message.name = String(object.name); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + return message; + }; + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {opentelemetry.proto.trace.v1.Span.Event} message Event + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Event.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + object.name = ""; + object.droppedAttributesCount = 0; + } + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + return object; + }; + /** + * Converts this Event to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @instance + * @returns {Object.} JSON object + */ + Event.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Event + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Event.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Span.Event"; + }; + return Event; + })(); + Span.Link = (function () { + /** + * Properties of a Link. + * @memberof opentelemetry.proto.trace.v1.Span + * @interface ILink + * @property {Uint8Array|null} [traceId] Link traceId + * @property {Uint8Array|null} [spanId] Link spanId + * @property {string|null} [traceState] Link traceState + * @property {Array.|null} [attributes] Link attributes + * @property {number|null} [droppedAttributesCount] Link droppedAttributesCount + */ + /** + * Constructs a new Link. + * @memberof opentelemetry.proto.trace.v1.Span + * @classdesc Represents a Link. + * @implements ILink + * @constructor + * @param {opentelemetry.proto.trace.v1.Span.ILink=} [properties] Properties to set + */ + function Link(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Link traceId. + * @member {Uint8Array|null|undefined} traceId + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + */ + Link.prototype.traceId = null; + /** + * Link spanId. + * @member {Uint8Array|null|undefined} spanId + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + */ + Link.prototype.spanId = null; + /** + * Link traceState. + * @member {string|null|undefined} traceState + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + */ + Link.prototype.traceState = null; + /** + * Link attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + */ + Link.prototype.attributes = $util.emptyArray; + /** + * Link droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + */ + Link.prototype.droppedAttributesCount = null; + /** + * Creates a new Link instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {opentelemetry.proto.trace.v1.Span.ILink=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.Span.Link} Link instance + */ + Link.create = function create(properties) { + return new Link(properties); + }; + /** + * Encodes the specified Link message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Link.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {opentelemetry.proto.trace.v1.Span.ILink} message Link message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Link.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) + writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.traceId); + if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) + writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.spanId); + if (message.traceState != null && Object.hasOwnProperty.call(message, "traceState")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.traceState); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 4, wireType 2 =*/ 34).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 5, wireType 0 =*/ 40).uint32(message.droppedAttributesCount); + return writer; + }; + /** + * Encodes the specified Link message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Link.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {opentelemetry.proto.trace.v1.Span.ILink} message Link message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Link.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Link message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.Span.Link} Link + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Link.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span.Link(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.traceId = reader.bytes(); + break; + } + case 2: { + message.spanId = reader.bytes(); + break; + } + case 3: { + message.traceState = reader.string(); + break; + } + case 4: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 5: { + message.droppedAttributesCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Link message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.Span.Link} Link + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Link.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Link message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Link.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.traceId != null && message.hasOwnProperty("traceId")) + if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) + return "traceId: buffer expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) + return "spanId: buffer expected"; + if (message.traceState != null && message.hasOwnProperty("traceState")) + if (!$util.isString(message.traceState)) + return "traceState: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + return null; + }; + /** + * Creates a Link message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.Span.Link} Link + */ + Link.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.Span.Link) + return object; + var message = new $root.opentelemetry.proto.trace.v1.Span.Link(); + if (object.traceId != null) + if (typeof object.traceId === "string") + $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); + else if (object.traceId.length >= 0) + message.traceId = object.traceId; + if (object.spanId != null) + if (typeof object.spanId === "string") + $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); + else if (object.spanId.length >= 0) + message.spanId = object.spanId; + if (object.traceState != null) + message.traceState = String(object.traceState); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + return message; + }; + /** + * Creates a plain object from a Link message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {opentelemetry.proto.trace.v1.Span.Link} message Link + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Link.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) { + if (options.bytes === String) + object.traceId = ""; + else { + object.traceId = []; + if (options.bytes !== Array) + object.traceId = $util.newBuffer(object.traceId); + } + if (options.bytes === String) + object.spanId = ""; + else { + object.spanId = []; + if (options.bytes !== Array) + object.spanId = $util.newBuffer(object.spanId); + } + object.traceState = ""; + object.droppedAttributesCount = 0; + } + if (message.traceId != null && message.hasOwnProperty("traceId")) + object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; + if (message.traceState != null && message.hasOwnProperty("traceState")) + object.traceState = message.traceState; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + return object; + }; + /** + * Converts this Link to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + * @returns {Object.} JSON object + */ + Link.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Link + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Link.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Span.Link"; + }; + return Link; + })(); + return Span; + })(); + v1.Status = (function () { + /** + * Properties of a Status. + * @memberof opentelemetry.proto.trace.v1 + * @interface IStatus + * @property {string|null} [message] Status message + * @property {opentelemetry.proto.trace.v1.Status.StatusCode|null} [code] Status code + */ + /** + * Constructs a new Status. + * @memberof opentelemetry.proto.trace.v1 + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {opentelemetry.proto.trace.v1.IStatus=} [properties] Properties to set + */ + function Status(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Status message. + * @member {string|null|undefined} message + * @memberof opentelemetry.proto.trace.v1.Status + * @instance + */ + Status.prototype.message = null; + /** + * Status code. + * @member {opentelemetry.proto.trace.v1.Status.StatusCode|null|undefined} code + * @memberof opentelemetry.proto.trace.v1.Status + * @instance + */ + Status.prototype.code = null; + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {opentelemetry.proto.trace.v1.IStatus=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + /** + * Encodes the specified Status message. Does not implicitly {@link opentelemetry.proto.trace.v1.Status.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {opentelemetry.proto.trace.v1.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.message); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 3, wireType 0 =*/ 24).int32(message.code); + return writer; + }; + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {opentelemetry.proto.trace.v1.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.code = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Status message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.Status) + return object; + var message = new $root.opentelemetry.proto.trace.v1.Status(); + if (object.message != null) + message.message = String(object.message); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "STATUS_CODE_UNSET": + case 0: + message.code = 0; + break; + case "STATUS_CODE_OK": + case 1: + message.code = 1; + break; + case "STATUS_CODE_ERROR": + case 2: + message.code = 2; + break; + } + return message; + }; + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {opentelemetry.proto.trace.v1.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.code = options.enums === String ? "STATUS_CODE_UNSET" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.opentelemetry.proto.trace.v1.Status.StatusCode[message.code] === undefined ? message.code : $root.opentelemetry.proto.trace.v1.Status.StatusCode[message.code] : message.code; + return object; + }; + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Status"; + }; + /** + * StatusCode enum. + * @name opentelemetry.proto.trace.v1.Status.StatusCode + * @enum {number} + * @property {number} STATUS_CODE_UNSET=0 STATUS_CODE_UNSET value + * @property {number} STATUS_CODE_OK=1 STATUS_CODE_OK value + * @property {number} STATUS_CODE_ERROR=2 STATUS_CODE_ERROR value + */ + Status.StatusCode = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_CODE_UNSET"] = 0; + values[valuesById[1] = "STATUS_CODE_OK"] = 1; + values[valuesById[2] = "STATUS_CODE_ERROR"] = 2; + return values; + })(); + return Status; + })(); + return v1; + })(); + return trace; + })(); + proto.collector = (function () { + /** + * Namespace collector. + * @memberof opentelemetry.proto + * @namespace + */ + var collector = {}; + collector.trace = (function () { + /** + * Namespace trace. + * @memberof opentelemetry.proto.collector + * @namespace + */ + var trace = {}; + trace.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.collector.trace + * @namespace + */ + var v1 = {}; + v1.TraceService = (function () { + /** + * Constructs a new TraceService service. + * @memberof opentelemetry.proto.collector.trace.v1 + * @classdesc Represents a TraceService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function TraceService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + (TraceService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TraceService; + /** + * Creates new TraceService service using the specified rpc implementation. + * @function create + * @memberof opentelemetry.proto.collector.trace.v1.TraceService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {TraceService} RPC service. Useful where requests and/or responses are streamed. + */ + TraceService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + /** + * Callback as used by {@link opentelemetry.proto.collector.trace.v1.TraceService#export_}. + * @memberof opentelemetry.proto.collector.trace.v1.TraceService + * @typedef ExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} [response] ExportTraceServiceResponse + */ + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.trace.v1.TraceService + * @instance + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} request ExportTraceServiceRequest message or plain object + * @param {opentelemetry.proto.collector.trace.v1.TraceService.ExportCallback} callback Node-style callback called with the error, if any, and ExportTraceServiceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TraceService.prototype["export"] = function export_(request, callback) { + return this.rpcCall(export_, $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest, $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse, request, callback); + }, "name", { value: "Export" }); + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.trace.v1.TraceService + * @instance + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} request ExportTraceServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return TraceService; + })(); + v1.ExportTraceServiceRequest = (function () { + /** + * Properties of an ExportTraceServiceRequest. + * @memberof opentelemetry.proto.collector.trace.v1 + * @interface IExportTraceServiceRequest + * @property {Array.|null} [resourceSpans] ExportTraceServiceRequest resourceSpans + */ + /** + * Constructs a new ExportTraceServiceRequest. + * @memberof opentelemetry.proto.collector.trace.v1 + * @classdesc Represents an ExportTraceServiceRequest. + * @implements IExportTraceServiceRequest + * @constructor + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest=} [properties] Properties to set + */ + function ExportTraceServiceRequest(properties) { + this.resourceSpans = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportTraceServiceRequest resourceSpans. + * @member {Array.} resourceSpans + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @instance + */ + ExportTraceServiceRequest.prototype.resourceSpans = $util.emptyArray; + /** + * Creates a new ExportTraceServiceRequest instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest instance + */ + ExportTraceServiceRequest.create = function create(properties) { + return new ExportTraceServiceRequest(properties); + }; + /** + * Encodes the specified ExportTraceServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} message ExportTraceServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTraceServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceSpans != null && message.resourceSpans.length) + for (var i = 0; i < message.resourceSpans.length; ++i) + $root.opentelemetry.proto.trace.v1.ResourceSpans.encode(message.resourceSpans[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportTraceServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} message ExportTraceServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTraceServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportTraceServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTraceServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceSpans && message.resourceSpans.length)) + message.resourceSpans = []; + message.resourceSpans.push($root.opentelemetry.proto.trace.v1.ResourceSpans.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportTraceServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTraceServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportTraceServiceRequest message. + * @function verify + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportTraceServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceSpans != null && message.hasOwnProperty("resourceSpans")) { + if (!Array.isArray(message.resourceSpans)) + return "resourceSpans: array expected"; + for (var i = 0; i < message.resourceSpans.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.ResourceSpans.verify(message.resourceSpans[i]); + if (error) + return "resourceSpans." + error; + } + } + return null; + }; + /** + * Creates an ExportTraceServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest + */ + ExportTraceServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) + return object; + var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest(); + if (object.resourceSpans) { + if (!Array.isArray(object.resourceSpans)) + throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected"); + message.resourceSpans = []; + for (var i = 0; i < object.resourceSpans.length; ++i) { + if (typeof object.resourceSpans[i] !== "object") + throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected"); + message.resourceSpans[i] = $root.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(object.resourceSpans[i]); + } + } + return message; + }; + /** + * Creates a plain object from an ExportTraceServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} message ExportTraceServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportTraceServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceSpans = []; + if (message.resourceSpans && message.resourceSpans.length) { + object.resourceSpans = []; + for (var j = 0; j < message.resourceSpans.length; ++j) + object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j], options); + } + return object; + }; + /** + * Converts this ExportTraceServiceRequest to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @instance + * @returns {Object.} JSON object + */ + ExportTraceServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportTraceServiceRequest + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportTraceServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"; + }; + return ExportTraceServiceRequest; + })(); + v1.ExportTraceServiceResponse = (function () { + /** + * Properties of an ExportTraceServiceResponse. + * @memberof opentelemetry.proto.collector.trace.v1 + * @interface IExportTraceServiceResponse + * @property {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess|null} [partialSuccess] ExportTraceServiceResponse partialSuccess + */ + /** + * Constructs a new ExportTraceServiceResponse. + * @memberof opentelemetry.proto.collector.trace.v1 + * @classdesc Represents an ExportTraceServiceResponse. + * @implements IExportTraceServiceResponse + * @constructor + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse=} [properties] Properties to set + */ + function ExportTraceServiceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportTraceServiceResponse partialSuccess. + * @member {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess|null|undefined} partialSuccess + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @instance + */ + ExportTraceServiceResponse.prototype.partialSuccess = null; + /** + * Creates a new ExportTraceServiceResponse instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse instance + */ + ExportTraceServiceResponse.create = function create(properties) { + return new ExportTraceServiceResponse(properties); + }; + /** + * Encodes the specified ExportTraceServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse} message ExportTraceServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTraceServiceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) + $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportTraceServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse} message ExportTraceServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTraceServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportTraceServiceResponse message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTraceServiceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportTraceServiceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTraceServiceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportTraceServiceResponse message. + * @function verify + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportTraceServiceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) { + var error = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(message.partialSuccess); + if (error) + return "partialSuccess." + error; + } + return null; + }; + /** + * Creates an ExportTraceServiceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse + */ + ExportTraceServiceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) + return object; + var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse(); + if (object.partialSuccess != null) { + if (typeof object.partialSuccess !== "object") + throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected"); + message.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(object.partialSuccess); + } + return message; + }; + /** + * Creates a plain object from an ExportTraceServiceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} message ExportTraceServiceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportTraceServiceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.partialSuccess = null; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(message.partialSuccess, options); + return object; + }; + /** + * Converts this ExportTraceServiceResponse to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @instance + * @returns {Object.} JSON object + */ + ExportTraceServiceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportTraceServiceResponse + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportTraceServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"; + }; + return ExportTraceServiceResponse; + })(); + v1.ExportTracePartialSuccess = (function () { + /** + * Properties of an ExportTracePartialSuccess. + * @memberof opentelemetry.proto.collector.trace.v1 + * @interface IExportTracePartialSuccess + * @property {number|Long|null} [rejectedSpans] ExportTracePartialSuccess rejectedSpans + * @property {string|null} [errorMessage] ExportTracePartialSuccess errorMessage + */ + /** + * Constructs a new ExportTracePartialSuccess. + * @memberof opentelemetry.proto.collector.trace.v1 + * @classdesc Represents an ExportTracePartialSuccess. + * @implements IExportTracePartialSuccess + * @constructor + * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess=} [properties] Properties to set + */ + function ExportTracePartialSuccess(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportTracePartialSuccess rejectedSpans. + * @member {number|Long|null|undefined} rejectedSpans + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @instance + */ + ExportTracePartialSuccess.prototype.rejectedSpans = null; + /** + * ExportTracePartialSuccess errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @instance + */ + ExportTracePartialSuccess.prototype.errorMessage = null; + /** + * Creates a new ExportTracePartialSuccess instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess instance + */ + ExportTracePartialSuccess.create = function create(properties) { + return new ExportTracePartialSuccess(properties); + }; + /** + * Encodes the specified ExportTracePartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess} message ExportTracePartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTracePartialSuccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rejectedSpans != null && Object.hasOwnProperty.call(message, "rejectedSpans")) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedSpans); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage); + return writer; + }; + /** + * Encodes the specified ExportTracePartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess} message ExportTracePartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTracePartialSuccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportTracePartialSuccess message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTracePartialSuccess.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rejectedSpans = reader.int64(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportTracePartialSuccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTracePartialSuccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportTracePartialSuccess message. + * @function verify + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportTracePartialSuccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rejectedSpans != null && message.hasOwnProperty("rejectedSpans")) + if (!$util.isInteger(message.rejectedSpans) && !(message.rejectedSpans && $util.isInteger(message.rejectedSpans.low) && $util.isInteger(message.rejectedSpans.high))) + return "rejectedSpans: integer|Long expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + return null; + }; + /** + * Creates an ExportTracePartialSuccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess + */ + ExportTracePartialSuccess.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) + return object; + var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess(); + if (object.rejectedSpans != null) + if ($util.Long) + (message.rejectedSpans = $util.Long.fromValue(object.rejectedSpans)).unsigned = false; + else if (typeof object.rejectedSpans === "string") + message.rejectedSpans = parseInt(object.rejectedSpans, 10); + else if (typeof object.rejectedSpans === "number") + message.rejectedSpans = object.rejectedSpans; + else if (typeof object.rejectedSpans === "object") + message.rejectedSpans = new $util.LongBits(object.rejectedSpans.low >>> 0, object.rejectedSpans.high >>> 0).toNumber(); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + return message; + }; + /** + * Creates a plain object from an ExportTracePartialSuccess message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} message ExportTracePartialSuccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportTracePartialSuccess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rejectedSpans = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.rejectedSpans = options.longs === String ? "0" : 0; + object.errorMessage = ""; + } + if (message.rejectedSpans != null && message.hasOwnProperty("rejectedSpans")) + if (typeof message.rejectedSpans === "number") + object.rejectedSpans = options.longs === String ? String(message.rejectedSpans) : message.rejectedSpans; + else + object.rejectedSpans = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedSpans) : options.longs === Number ? new $util.LongBits(message.rejectedSpans.low >>> 0, message.rejectedSpans.high >>> 0).toNumber() : message.rejectedSpans; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + return object; + }; + /** + * Converts this ExportTracePartialSuccess to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @instance + * @returns {Object.} JSON object + */ + ExportTracePartialSuccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportTracePartialSuccess + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportTracePartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"; + }; + return ExportTracePartialSuccess; + })(); + return v1; + })(); + return trace; + })(); + collector.metrics = (function () { + /** + * Namespace metrics. + * @memberof opentelemetry.proto.collector + * @namespace + */ + var metrics = {}; + metrics.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.collector.metrics + * @namespace + */ + var v1 = {}; + v1.MetricsService = (function () { + /** + * Constructs a new MetricsService service. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @classdesc Represents a MetricsService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function MetricsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + (MetricsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsService; + /** + * Creates new MetricsService service using the specified rpc implementation. + * @function create + * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MetricsService} RPC service. Useful where requests and/or responses are streamed. + */ + MetricsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + /** + * Callback as used by {@link opentelemetry.proto.collector.metrics.v1.MetricsService#export_}. + * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService + * @typedef ExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} [response] ExportMetricsServiceResponse + */ + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService + * @instance + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} request ExportMetricsServiceRequest message or plain object + * @param {opentelemetry.proto.collector.metrics.v1.MetricsService.ExportCallback} callback Node-style callback called with the error, if any, and ExportMetricsServiceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsService.prototype["export"] = function export_(request, callback) { + return this.rpcCall(export_, $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest, $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse, request, callback); + }, "name", { value: "Export" }); + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService + * @instance + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} request ExportMetricsServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return MetricsService; + })(); + v1.ExportMetricsServiceRequest = (function () { + /** + * Properties of an ExportMetricsServiceRequest. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @interface IExportMetricsServiceRequest + * @property {Array.|null} [resourceMetrics] ExportMetricsServiceRequest resourceMetrics + */ + /** + * Constructs a new ExportMetricsServiceRequest. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @classdesc Represents an ExportMetricsServiceRequest. + * @implements IExportMetricsServiceRequest + * @constructor + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest=} [properties] Properties to set + */ + function ExportMetricsServiceRequest(properties) { + this.resourceMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportMetricsServiceRequest resourceMetrics. + * @member {Array.} resourceMetrics + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @instance + */ + ExportMetricsServiceRequest.prototype.resourceMetrics = $util.emptyArray; + /** + * Creates a new ExportMetricsServiceRequest instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest instance + */ + ExportMetricsServiceRequest.create = function create(properties) { + return new ExportMetricsServiceRequest(properties); + }; + /** + * Encodes the specified ExportMetricsServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} message ExportMetricsServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceMetrics != null && message.resourceMetrics.length) + for (var i = 0; i < message.resourceMetrics.length; ++i) + $root.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(message.resourceMetrics[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportMetricsServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} message ExportMetricsServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportMetricsServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceMetrics && message.resourceMetrics.length)) + message.resourceMetrics = []; + message.resourceMetrics.push($root.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportMetricsServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportMetricsServiceRequest message. + * @function verify + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportMetricsServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceMetrics != null && message.hasOwnProperty("resourceMetrics")) { + if (!Array.isArray(message.resourceMetrics)) + return "resourceMetrics: array expected"; + for (var i = 0; i < message.resourceMetrics.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(message.resourceMetrics[i]); + if (error) + return "resourceMetrics." + error; + } + } + return null; + }; + /** + * Creates an ExportMetricsServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest + */ + ExportMetricsServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest) + return object; + var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest(); + if (object.resourceMetrics) { + if (!Array.isArray(object.resourceMetrics)) + throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected"); + message.resourceMetrics = []; + for (var i = 0; i < object.resourceMetrics.length; ++i) { + if (typeof object.resourceMetrics[i] !== "object") + throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected"); + message.resourceMetrics[i] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(object.resourceMetrics[i]); + } + } + return message; + }; + /** + * Creates a plain object from an ExportMetricsServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} message ExportMetricsServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportMetricsServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceMetrics = []; + if (message.resourceMetrics && message.resourceMetrics.length) { + object.resourceMetrics = []; + for (var j = 0; j < message.resourceMetrics.length; ++j) + object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j], options); + } + return object; + }; + /** + * Converts this ExportMetricsServiceRequest to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @instance + * @returns {Object.} JSON object + */ + ExportMetricsServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportMetricsServiceRequest + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportMetricsServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"; + }; + return ExportMetricsServiceRequest; + })(); + v1.ExportMetricsServiceResponse = (function () { + /** + * Properties of an ExportMetricsServiceResponse. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @interface IExportMetricsServiceResponse + * @property {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess|null} [partialSuccess] ExportMetricsServiceResponse partialSuccess + */ + /** + * Constructs a new ExportMetricsServiceResponse. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @classdesc Represents an ExportMetricsServiceResponse. + * @implements IExportMetricsServiceResponse + * @constructor + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse=} [properties] Properties to set + */ + function ExportMetricsServiceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportMetricsServiceResponse partialSuccess. + * @member {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess|null|undefined} partialSuccess + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @instance + */ + ExportMetricsServiceResponse.prototype.partialSuccess = null; + /** + * Creates a new ExportMetricsServiceResponse instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse instance + */ + ExportMetricsServiceResponse.create = function create(properties) { + return new ExportMetricsServiceResponse(properties); + }; + /** + * Encodes the specified ExportMetricsServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse} message ExportMetricsServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsServiceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) + $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportMetricsServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse} message ExportMetricsServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportMetricsServiceResponse message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsServiceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportMetricsServiceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsServiceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportMetricsServiceResponse message. + * @function verify + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportMetricsServiceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) { + var error = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(message.partialSuccess); + if (error) + return "partialSuccess." + error; + } + return null; + }; + /** + * Creates an ExportMetricsServiceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse + */ + ExportMetricsServiceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse) + return object; + var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse(); + if (object.partialSuccess != null) { + if (typeof object.partialSuccess !== "object") + throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected"); + message.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(object.partialSuccess); + } + return message; + }; + /** + * Creates a plain object from an ExportMetricsServiceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} message ExportMetricsServiceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportMetricsServiceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.partialSuccess = null; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(message.partialSuccess, options); + return object; + }; + /** + * Converts this ExportMetricsServiceResponse to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @instance + * @returns {Object.} JSON object + */ + ExportMetricsServiceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportMetricsServiceResponse + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportMetricsServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"; + }; + return ExportMetricsServiceResponse; + })(); + v1.ExportMetricsPartialSuccess = (function () { + /** + * Properties of an ExportMetricsPartialSuccess. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @interface IExportMetricsPartialSuccess + * @property {number|Long|null} [rejectedDataPoints] ExportMetricsPartialSuccess rejectedDataPoints + * @property {string|null} [errorMessage] ExportMetricsPartialSuccess errorMessage + */ + /** + * Constructs a new ExportMetricsPartialSuccess. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @classdesc Represents an ExportMetricsPartialSuccess. + * @implements IExportMetricsPartialSuccess + * @constructor + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess=} [properties] Properties to set + */ + function ExportMetricsPartialSuccess(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportMetricsPartialSuccess rejectedDataPoints. + * @member {number|Long|null|undefined} rejectedDataPoints + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @instance + */ + ExportMetricsPartialSuccess.prototype.rejectedDataPoints = null; + /** + * ExportMetricsPartialSuccess errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @instance + */ + ExportMetricsPartialSuccess.prototype.errorMessage = null; + /** + * Creates a new ExportMetricsPartialSuccess instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess instance + */ + ExportMetricsPartialSuccess.create = function create(properties) { + return new ExportMetricsPartialSuccess(properties); + }; + /** + * Encodes the specified ExportMetricsPartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess} message ExportMetricsPartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsPartialSuccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rejectedDataPoints != null && Object.hasOwnProperty.call(message, "rejectedDataPoints")) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedDataPoints); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage); + return writer; + }; + /** + * Encodes the specified ExportMetricsPartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess} message ExportMetricsPartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsPartialSuccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportMetricsPartialSuccess message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsPartialSuccess.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rejectedDataPoints = reader.int64(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportMetricsPartialSuccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsPartialSuccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportMetricsPartialSuccess message. + * @function verify + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportMetricsPartialSuccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rejectedDataPoints != null && message.hasOwnProperty("rejectedDataPoints")) + if (!$util.isInteger(message.rejectedDataPoints) && !(message.rejectedDataPoints && $util.isInteger(message.rejectedDataPoints.low) && $util.isInteger(message.rejectedDataPoints.high))) + return "rejectedDataPoints: integer|Long expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + return null; + }; + /** + * Creates an ExportMetricsPartialSuccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess + */ + ExportMetricsPartialSuccess.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess) + return object; + var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess(); + if (object.rejectedDataPoints != null) + if ($util.Long) + (message.rejectedDataPoints = $util.Long.fromValue(object.rejectedDataPoints)).unsigned = false; + else if (typeof object.rejectedDataPoints === "string") + message.rejectedDataPoints = parseInt(object.rejectedDataPoints, 10); + else if (typeof object.rejectedDataPoints === "number") + message.rejectedDataPoints = object.rejectedDataPoints; + else if (typeof object.rejectedDataPoints === "object") + message.rejectedDataPoints = new $util.LongBits(object.rejectedDataPoints.low >>> 0, object.rejectedDataPoints.high >>> 0).toNumber(); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + return message; + }; + /** + * Creates a plain object from an ExportMetricsPartialSuccess message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} message ExportMetricsPartialSuccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportMetricsPartialSuccess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rejectedDataPoints = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.rejectedDataPoints = options.longs === String ? "0" : 0; + object.errorMessage = ""; + } + if (message.rejectedDataPoints != null && message.hasOwnProperty("rejectedDataPoints")) + if (typeof message.rejectedDataPoints === "number") + object.rejectedDataPoints = options.longs === String ? String(message.rejectedDataPoints) : message.rejectedDataPoints; + else + object.rejectedDataPoints = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedDataPoints) : options.longs === Number ? new $util.LongBits(message.rejectedDataPoints.low >>> 0, message.rejectedDataPoints.high >>> 0).toNumber() : message.rejectedDataPoints; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + return object; + }; + /** + * Converts this ExportMetricsPartialSuccess to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @instance + * @returns {Object.} JSON object + */ + ExportMetricsPartialSuccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportMetricsPartialSuccess + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportMetricsPartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"; + }; + return ExportMetricsPartialSuccess; + })(); + return v1; + })(); + return metrics; + })(); + collector.logs = (function () { + /** + * Namespace logs. + * @memberof opentelemetry.proto.collector + * @namespace + */ + var logs = {}; + logs.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.collector.logs + * @namespace + */ + var v1 = {}; + v1.LogsService = (function () { + /** + * Constructs a new LogsService service. + * @memberof opentelemetry.proto.collector.logs.v1 + * @classdesc Represents a LogsService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function LogsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + (LogsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LogsService; + /** + * Creates new LogsService service using the specified rpc implementation. + * @function create + * @memberof opentelemetry.proto.collector.logs.v1.LogsService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LogsService} RPC service. Useful where requests and/or responses are streamed. + */ + LogsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + /** + * Callback as used by {@link opentelemetry.proto.collector.logs.v1.LogsService#export_}. + * @memberof opentelemetry.proto.collector.logs.v1.LogsService + * @typedef ExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} [response] ExportLogsServiceResponse + */ + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.logs.v1.LogsService + * @instance + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} request ExportLogsServiceRequest message or plain object + * @param {opentelemetry.proto.collector.logs.v1.LogsService.ExportCallback} callback Node-style callback called with the error, if any, and ExportLogsServiceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LogsService.prototype["export"] = function export_(request, callback) { + return this.rpcCall(export_, $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest, $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse, request, callback); + }, "name", { value: "Export" }); + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.logs.v1.LogsService + * @instance + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} request ExportLogsServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return LogsService; + })(); + v1.ExportLogsServiceRequest = (function () { + /** + * Properties of an ExportLogsServiceRequest. + * @memberof opentelemetry.proto.collector.logs.v1 + * @interface IExportLogsServiceRequest + * @property {Array.|null} [resourceLogs] ExportLogsServiceRequest resourceLogs + */ + /** + * Constructs a new ExportLogsServiceRequest. + * @memberof opentelemetry.proto.collector.logs.v1 + * @classdesc Represents an ExportLogsServiceRequest. + * @implements IExportLogsServiceRequest + * @constructor + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest=} [properties] Properties to set + */ + function ExportLogsServiceRequest(properties) { + this.resourceLogs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportLogsServiceRequest resourceLogs. + * @member {Array.} resourceLogs + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @instance + */ + ExportLogsServiceRequest.prototype.resourceLogs = $util.emptyArray; + /** + * Creates a new ExportLogsServiceRequest instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest instance + */ + ExportLogsServiceRequest.create = function create(properties) { + return new ExportLogsServiceRequest(properties); + }; + /** + * Encodes the specified ExportLogsServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} message ExportLogsServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceLogs != null && message.resourceLogs.length) + for (var i = 0; i < message.resourceLogs.length; ++i) + $root.opentelemetry.proto.logs.v1.ResourceLogs.encode(message.resourceLogs[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportLogsServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} message ExportLogsServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportLogsServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceLogs && message.resourceLogs.length)) + message.resourceLogs = []; + message.resourceLogs.push($root.opentelemetry.proto.logs.v1.ResourceLogs.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportLogsServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportLogsServiceRequest message. + * @function verify + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportLogsServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceLogs != null && message.hasOwnProperty("resourceLogs")) { + if (!Array.isArray(message.resourceLogs)) + return "resourceLogs: array expected"; + for (var i = 0; i < message.resourceLogs.length; ++i) { + var error = $root.opentelemetry.proto.logs.v1.ResourceLogs.verify(message.resourceLogs[i]); + if (error) + return "resourceLogs." + error; + } + } + return null; + }; + /** + * Creates an ExportLogsServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest + */ + ExportLogsServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest) + return object; + var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest(); + if (object.resourceLogs) { + if (!Array.isArray(object.resourceLogs)) + throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected"); + message.resourceLogs = []; + for (var i = 0; i < object.resourceLogs.length; ++i) { + if (typeof object.resourceLogs[i] !== "object") + throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected"); + message.resourceLogs[i] = $root.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(object.resourceLogs[i]); + } + } + return message; + }; + /** + * Creates a plain object from an ExportLogsServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} message ExportLogsServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportLogsServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceLogs = []; + if (message.resourceLogs && message.resourceLogs.length) { + object.resourceLogs = []; + for (var j = 0; j < message.resourceLogs.length; ++j) + object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j], options); + } + return object; + }; + /** + * Converts this ExportLogsServiceRequest to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @instance + * @returns {Object.} JSON object + */ + ExportLogsServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportLogsServiceRequest + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportLogsServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"; + }; + return ExportLogsServiceRequest; + })(); + v1.ExportLogsServiceResponse = (function () { + /** + * Properties of an ExportLogsServiceResponse. + * @memberof opentelemetry.proto.collector.logs.v1 + * @interface IExportLogsServiceResponse + * @property {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess|null} [partialSuccess] ExportLogsServiceResponse partialSuccess + */ + /** + * Constructs a new ExportLogsServiceResponse. + * @memberof opentelemetry.proto.collector.logs.v1 + * @classdesc Represents an ExportLogsServiceResponse. + * @implements IExportLogsServiceResponse + * @constructor + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse=} [properties] Properties to set + */ + function ExportLogsServiceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportLogsServiceResponse partialSuccess. + * @member {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess|null|undefined} partialSuccess + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @instance + */ + ExportLogsServiceResponse.prototype.partialSuccess = null; + /** + * Creates a new ExportLogsServiceResponse instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse instance + */ + ExportLogsServiceResponse.create = function create(properties) { + return new ExportLogsServiceResponse(properties); + }; + /** + * Encodes the specified ExportLogsServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse} message ExportLogsServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsServiceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) + $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportLogsServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse} message ExportLogsServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportLogsServiceResponse message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsServiceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportLogsServiceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsServiceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportLogsServiceResponse message. + * @function verify + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportLogsServiceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) { + var error = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(message.partialSuccess); + if (error) + return "partialSuccess." + error; + } + return null; + }; + /** + * Creates an ExportLogsServiceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse + */ + ExportLogsServiceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse) + return object; + var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse(); + if (object.partialSuccess != null) { + if (typeof object.partialSuccess !== "object") + throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected"); + message.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(object.partialSuccess); + } + return message; + }; + /** + * Creates a plain object from an ExportLogsServiceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} message ExportLogsServiceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportLogsServiceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.partialSuccess = null; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(message.partialSuccess, options); + return object; + }; + /** + * Converts this ExportLogsServiceResponse to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @instance + * @returns {Object.} JSON object + */ + ExportLogsServiceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportLogsServiceResponse + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportLogsServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"; + }; + return ExportLogsServiceResponse; + })(); + v1.ExportLogsPartialSuccess = (function () { + /** + * Properties of an ExportLogsPartialSuccess. + * @memberof opentelemetry.proto.collector.logs.v1 + * @interface IExportLogsPartialSuccess + * @property {number|Long|null} [rejectedLogRecords] ExportLogsPartialSuccess rejectedLogRecords + * @property {string|null} [errorMessage] ExportLogsPartialSuccess errorMessage + */ + /** + * Constructs a new ExportLogsPartialSuccess. + * @memberof opentelemetry.proto.collector.logs.v1 + * @classdesc Represents an ExportLogsPartialSuccess. + * @implements IExportLogsPartialSuccess + * @constructor + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess=} [properties] Properties to set + */ + function ExportLogsPartialSuccess(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportLogsPartialSuccess rejectedLogRecords. + * @member {number|Long|null|undefined} rejectedLogRecords + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @instance + */ + ExportLogsPartialSuccess.prototype.rejectedLogRecords = null; + /** + * ExportLogsPartialSuccess errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @instance + */ + ExportLogsPartialSuccess.prototype.errorMessage = null; + /** + * Creates a new ExportLogsPartialSuccess instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess instance + */ + ExportLogsPartialSuccess.create = function create(properties) { + return new ExportLogsPartialSuccess(properties); + }; + /** + * Encodes the specified ExportLogsPartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess} message ExportLogsPartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsPartialSuccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rejectedLogRecords != null && Object.hasOwnProperty.call(message, "rejectedLogRecords")) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedLogRecords); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage); + return writer; + }; + /** + * Encodes the specified ExportLogsPartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess} message ExportLogsPartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsPartialSuccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportLogsPartialSuccess message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsPartialSuccess.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rejectedLogRecords = reader.int64(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportLogsPartialSuccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsPartialSuccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportLogsPartialSuccess message. + * @function verify + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportLogsPartialSuccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rejectedLogRecords != null && message.hasOwnProperty("rejectedLogRecords")) + if (!$util.isInteger(message.rejectedLogRecords) && !(message.rejectedLogRecords && $util.isInteger(message.rejectedLogRecords.low) && $util.isInteger(message.rejectedLogRecords.high))) + return "rejectedLogRecords: integer|Long expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + return null; + }; + /** + * Creates an ExportLogsPartialSuccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess + */ + ExportLogsPartialSuccess.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess) + return object; + var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess(); + if (object.rejectedLogRecords != null) + if ($util.Long) + (message.rejectedLogRecords = $util.Long.fromValue(object.rejectedLogRecords)).unsigned = false; + else if (typeof object.rejectedLogRecords === "string") + message.rejectedLogRecords = parseInt(object.rejectedLogRecords, 10); + else if (typeof object.rejectedLogRecords === "number") + message.rejectedLogRecords = object.rejectedLogRecords; + else if (typeof object.rejectedLogRecords === "object") + message.rejectedLogRecords = new $util.LongBits(object.rejectedLogRecords.low >>> 0, object.rejectedLogRecords.high >>> 0).toNumber(); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + return message; + }; + /** + * Creates a plain object from an ExportLogsPartialSuccess message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} message ExportLogsPartialSuccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportLogsPartialSuccess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rejectedLogRecords = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.rejectedLogRecords = options.longs === String ? "0" : 0; + object.errorMessage = ""; + } + if (message.rejectedLogRecords != null && message.hasOwnProperty("rejectedLogRecords")) + if (typeof message.rejectedLogRecords === "number") + object.rejectedLogRecords = options.longs === String ? String(message.rejectedLogRecords) : message.rejectedLogRecords; + else + object.rejectedLogRecords = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedLogRecords) : options.longs === Number ? new $util.LongBits(message.rejectedLogRecords.low >>> 0, message.rejectedLogRecords.high >>> 0).toNumber() : message.rejectedLogRecords; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + return object; + }; + /** + * Converts this ExportLogsPartialSuccess to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @instance + * @returns {Object.} JSON object + */ + ExportLogsPartialSuccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportLogsPartialSuccess + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportLogsPartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"; + }; + return ExportLogsPartialSuccess; + })(); + return v1; + })(); + return logs; + })(); + return collector; + })(); + proto.metrics = (function () { + /** + * Namespace metrics. + * @memberof opentelemetry.proto + * @namespace + */ + var metrics = {}; + metrics.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.metrics + * @namespace + */ + var v1 = {}; + v1.MetricsData = (function () { + /** + * Properties of a MetricsData. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IMetricsData + * @property {Array.|null} [resourceMetrics] MetricsData resourceMetrics + */ + /** + * Constructs a new MetricsData. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a MetricsData. + * @implements IMetricsData + * @constructor + * @param {opentelemetry.proto.metrics.v1.IMetricsData=} [properties] Properties to set + */ + function MetricsData(properties) { + this.resourceMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * MetricsData resourceMetrics. + * @member {Array.} resourceMetrics + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @instance + */ + MetricsData.prototype.resourceMetrics = $util.emptyArray; + /** + * Creates a new MetricsData instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {opentelemetry.proto.metrics.v1.IMetricsData=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData instance + */ + MetricsData.create = function create(properties) { + return new MetricsData(properties); + }; + /** + * Encodes the specified MetricsData message. Does not implicitly {@link opentelemetry.proto.metrics.v1.MetricsData.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {opentelemetry.proto.metrics.v1.IMetricsData} message MetricsData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricsData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceMetrics != null && message.resourceMetrics.length) + for (var i = 0; i < message.resourceMetrics.length; ++i) + $root.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(message.resourceMetrics[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified MetricsData message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.MetricsData.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {opentelemetry.proto.metrics.v1.IMetricsData} message MetricsData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricsData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a MetricsData message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricsData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.MetricsData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceMetrics && message.resourceMetrics.length)) + message.resourceMetrics = []; + message.resourceMetrics.push($root.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a MetricsData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricsData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a MetricsData message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricsData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceMetrics != null && message.hasOwnProperty("resourceMetrics")) { + if (!Array.isArray(message.resourceMetrics)) + return "resourceMetrics: array expected"; + for (var i = 0; i < message.resourceMetrics.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(message.resourceMetrics[i]); + if (error) + return "resourceMetrics." + error; + } + } + return null; + }; + /** + * Creates a MetricsData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData + */ + MetricsData.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.MetricsData) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.MetricsData(); + if (object.resourceMetrics) { + if (!Array.isArray(object.resourceMetrics)) + throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected"); + message.resourceMetrics = []; + for (var i = 0; i < object.resourceMetrics.length; ++i) { + if (typeof object.resourceMetrics[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected"); + message.resourceMetrics[i] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(object.resourceMetrics[i]); + } + } + return message; + }; + /** + * Creates a plain object from a MetricsData message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {opentelemetry.proto.metrics.v1.MetricsData} message MetricsData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricsData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceMetrics = []; + if (message.resourceMetrics && message.resourceMetrics.length) { + object.resourceMetrics = []; + for (var j = 0; j < message.resourceMetrics.length; ++j) + object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j], options); + } + return object; + }; + /** + * Converts this MetricsData to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @instance + * @returns {Object.} JSON object + */ + MetricsData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for MetricsData + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.MetricsData"; + }; + return MetricsData; + })(); + v1.ResourceMetrics = (function () { + /** + * Properties of a ResourceMetrics. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IResourceMetrics + * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceMetrics resource + * @property {Array.|null} [scopeMetrics] ResourceMetrics scopeMetrics + * @property {string|null} [schemaUrl] ResourceMetrics schemaUrl + */ + /** + * Constructs a new ResourceMetrics. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a ResourceMetrics. + * @implements IResourceMetrics + * @constructor + * @param {opentelemetry.proto.metrics.v1.IResourceMetrics=} [properties] Properties to set + */ + function ResourceMetrics(properties) { + this.scopeMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ResourceMetrics resource. + * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @instance + */ + ResourceMetrics.prototype.resource = null; + /** + * ResourceMetrics scopeMetrics. + * @member {Array.} scopeMetrics + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @instance + */ + ResourceMetrics.prototype.scopeMetrics = $util.emptyArray; + /** + * ResourceMetrics schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @instance + */ + ResourceMetrics.prototype.schemaUrl = null; + /** + * Creates a new ResourceMetrics instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IResourceMetrics=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics instance + */ + ResourceMetrics.create = function create(properties) { + return new ResourceMetrics(properties); + }; + /** + * Encodes the specified ResourceMetrics message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ResourceMetrics.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IResourceMetrics} message ResourceMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.scopeMetrics != null && message.scopeMetrics.length) + for (var i = 0; i < message.scopeMetrics.length; ++i) + $root.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(message.scopeMetrics[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ResourceMetrics message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ResourceMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IResourceMetrics} message ResourceMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ResourceMetrics message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ResourceMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.scopeMetrics && message.scopeMetrics.length)) + message.scopeMetrics = []; + message.scopeMetrics.push($root.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ResourceMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ResourceMetrics message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.scopeMetrics != null && message.hasOwnProperty("scopeMetrics")) { + if (!Array.isArray(message.scopeMetrics)) + return "scopeMetrics: array expected"; + for (var i = 0; i < message.scopeMetrics.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(message.scopeMetrics[i]); + if (error) + return "scopeMetrics." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ResourceMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics + */ + ResourceMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.ResourceMetrics) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.ResourceMetrics(); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected"); + message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource); + } + if (object.scopeMetrics) { + if (!Array.isArray(object.scopeMetrics)) + throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected"); + message.scopeMetrics = []; + for (var i = 0; i < object.scopeMetrics.length; ++i) { + if (typeof object.scopeMetrics[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected"); + message.scopeMetrics[i] = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(object.scopeMetrics[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ResourceMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.ResourceMetrics} message ResourceMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopeMetrics = []; + if (options.defaults) { + object.resource = null; + object.schemaUrl = ""; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options); + if (message.scopeMetrics && message.scopeMetrics.length) { + object.scopeMetrics = []; + for (var j = 0; j < message.scopeMetrics.length; ++j) + object.scopeMetrics[j] = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(message.scopeMetrics[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ResourceMetrics to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @instance + * @returns {Object.} JSON object + */ + ResourceMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ResourceMetrics + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ResourceMetrics"; + }; + return ResourceMetrics; + })(); + v1.ScopeMetrics = (function () { + /** + * Properties of a ScopeMetrics. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IScopeMetrics + * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeMetrics scope + * @property {Array.|null} [metrics] ScopeMetrics metrics + * @property {string|null} [schemaUrl] ScopeMetrics schemaUrl + */ + /** + * Constructs a new ScopeMetrics. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a ScopeMetrics. + * @implements IScopeMetrics + * @constructor + * @param {opentelemetry.proto.metrics.v1.IScopeMetrics=} [properties] Properties to set + */ + function ScopeMetrics(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ScopeMetrics scope. + * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @instance + */ + ScopeMetrics.prototype.scope = null; + /** + * ScopeMetrics metrics. + * @member {Array.} metrics + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @instance + */ + ScopeMetrics.prototype.metrics = $util.emptyArray; + /** + * ScopeMetrics schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @instance + */ + ScopeMetrics.prototype.schemaUrl = null; + /** + * Creates a new ScopeMetrics instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IScopeMetrics=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics instance + */ + ScopeMetrics.create = function create(properties) { + return new ScopeMetrics(properties); + }; + /** + * Encodes the specified ScopeMetrics message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ScopeMetrics.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IScopeMetrics} message ScopeMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.opentelemetry.proto.metrics.v1.Metric.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ScopeMetrics message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ScopeMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IScopeMetrics} message ScopeMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ScopeMetrics message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ScopeMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.opentelemetry.proto.metrics.v1.Metric.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ScopeMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ScopeMetrics message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScopeMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope); + if (error) + return "scope." + error; + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ScopeMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics + */ + ScopeMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.ScopeMetrics) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.ScopeMetrics(); + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected"); + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope); + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected"); + message.metrics[i] = $root.opentelemetry.proto.metrics.v1.Metric.fromObject(object.metrics[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ScopeMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.ScopeMetrics} message ScopeMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScopeMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) { + object.scope = null; + object.schemaUrl = ""; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options); + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.opentelemetry.proto.metrics.v1.Metric.toObject(message.metrics[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ScopeMetrics to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @instance + * @returns {Object.} JSON object + */ + ScopeMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ScopeMetrics + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScopeMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ScopeMetrics"; + }; + return ScopeMetrics; + })(); + v1.Metric = (function () { + /** + * Properties of a Metric. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IMetric + * @property {string|null} [name] Metric name + * @property {string|null} [description] Metric description + * @property {string|null} [unit] Metric unit + * @property {opentelemetry.proto.metrics.v1.IGauge|null} [gauge] Metric gauge + * @property {opentelemetry.proto.metrics.v1.ISum|null} [sum] Metric sum + * @property {opentelemetry.proto.metrics.v1.IHistogram|null} [histogram] Metric histogram + * @property {opentelemetry.proto.metrics.v1.IExponentialHistogram|null} [exponentialHistogram] Metric exponentialHistogram + * @property {opentelemetry.proto.metrics.v1.ISummary|null} [summary] Metric summary + */ + /** + * Constructs a new Metric. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {opentelemetry.proto.metrics.v1.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Metric name. + * @member {string|null|undefined} name + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.name = null; + /** + * Metric description. + * @member {string|null|undefined} description + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.description = null; + /** + * Metric unit. + * @member {string|null|undefined} unit + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.unit = null; + /** + * Metric gauge. + * @member {opentelemetry.proto.metrics.v1.IGauge|null|undefined} gauge + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.gauge = null; + /** + * Metric sum. + * @member {opentelemetry.proto.metrics.v1.ISum|null|undefined} sum + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.sum = null; + /** + * Metric histogram. + * @member {opentelemetry.proto.metrics.v1.IHistogram|null|undefined} histogram + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.histogram = null; + /** + * Metric exponentialHistogram. + * @member {opentelemetry.proto.metrics.v1.IExponentialHistogram|null|undefined} exponentialHistogram + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.exponentialHistogram = null; + /** + * Metric summary. + * @member {opentelemetry.proto.metrics.v1.ISummary|null|undefined} summary + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.summary = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * Metric data. + * @member {"gauge"|"sum"|"histogram"|"exponentialHistogram"|"summary"|undefined} data + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Object.defineProperty(Metric.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["gauge", "sum", "histogram", "exponentialHistogram", "summary"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {opentelemetry.proto.metrics.v1.IMetric=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + /** + * Encodes the specified Metric message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Metric.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {opentelemetry.proto.metrics.v1.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.description); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.unit); + if (message.gauge != null && Object.hasOwnProperty.call(message, "gauge")) + $root.opentelemetry.proto.metrics.v1.Gauge.encode(message.gauge, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + $root.opentelemetry.proto.metrics.v1.Sum.encode(message.sum, writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); + if (message.histogram != null && Object.hasOwnProperty.call(message, "histogram")) + $root.opentelemetry.proto.metrics.v1.Histogram.encode(message.histogram, writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); + if (message.exponentialHistogram != null && Object.hasOwnProperty.call(message, "exponentialHistogram")) + $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(message.exponentialHistogram, writer.uint32(/* id 10, wireType 2 =*/ 82).fork()).ldelim(); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + $root.opentelemetry.proto.metrics.v1.Summary.encode(message.summary, writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {opentelemetry.proto.metrics.v1.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.unit = reader.string(); + break; + } + case 5: { + message.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.decode(reader, reader.uint32()); + break; + } + case 7: { + message.sum = $root.opentelemetry.proto.metrics.v1.Sum.decode(reader, reader.uint32()); + break; + } + case 9: { + message.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.decode(reader, reader.uint32()); + break; + } + case 10: { + message.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(reader, reader.uint32()); + break; + } + case 11: { + message.summary = $root.opentelemetry.proto.metrics.v1.Summary.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Metric message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.gauge != null && message.hasOwnProperty("gauge")) { + properties.data = 1; + { + var error = $root.opentelemetry.proto.metrics.v1.Gauge.verify(message.gauge); + if (error) + return "gauge." + error; + } + } + if (message.sum != null && message.hasOwnProperty("sum")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.opentelemetry.proto.metrics.v1.Sum.verify(message.sum); + if (error) + return "sum." + error; + } + } + if (message.histogram != null && message.hasOwnProperty("histogram")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.opentelemetry.proto.metrics.v1.Histogram.verify(message.histogram); + if (error) + return "histogram." + error; + } + } + if (message.exponentialHistogram != null && message.hasOwnProperty("exponentialHistogram")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(message.exponentialHistogram); + if (error) + return "exponentialHistogram." + error; + } + } + if (message.summary != null && message.hasOwnProperty("summary")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.opentelemetry.proto.metrics.v1.Summary.verify(message.summary); + if (error) + return "summary." + error; + } + } + return null; + }; + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Metric) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Metric(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.unit != null) + message.unit = String(object.unit); + if (object.gauge != null) { + if (typeof object.gauge !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected"); + message.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.fromObject(object.gauge); + } + if (object.sum != null) { + if (typeof object.sum !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected"); + message.sum = $root.opentelemetry.proto.metrics.v1.Sum.fromObject(object.sum); + } + if (object.histogram != null) { + if (typeof object.histogram !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected"); + message.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.fromObject(object.histogram); + } + if (object.exponentialHistogram != null) { + if (typeof object.exponentialHistogram !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected"); + message.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(object.exponentialHistogram); + } + if (object.summary != null) { + if (typeof object.summary !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected"); + message.summary = $root.opentelemetry.proto.metrics.v1.Summary.fromObject(object.summary); + } + return message; + }; + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {opentelemetry.proto.metrics.v1.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.unit = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + if (message.gauge != null && message.hasOwnProperty("gauge")) { + object.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.toObject(message.gauge, options); + if (options.oneofs) + object.data = "gauge"; + } + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = $root.opentelemetry.proto.metrics.v1.Sum.toObject(message.sum, options); + if (options.oneofs) + object.data = "sum"; + } + if (message.histogram != null && message.hasOwnProperty("histogram")) { + object.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.toObject(message.histogram, options); + if (options.oneofs) + object.data = "histogram"; + } + if (message.exponentialHistogram != null && message.hasOwnProperty("exponentialHistogram")) { + object.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(message.exponentialHistogram, options); + if (options.oneofs) + object.data = "exponentialHistogram"; + } + if (message.summary != null && message.hasOwnProperty("summary")) { + object.summary = $root.opentelemetry.proto.metrics.v1.Summary.toObject(message.summary, options); + if (options.oneofs) + object.data = "summary"; + } + return object; + }; + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Metric"; + }; + return Metric; + })(); + v1.Gauge = (function () { + /** + * Properties of a Gauge. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IGauge + * @property {Array.|null} [dataPoints] Gauge dataPoints + */ + /** + * Constructs a new Gauge. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a Gauge. + * @implements IGauge + * @constructor + * @param {opentelemetry.proto.metrics.v1.IGauge=} [properties] Properties to set + */ + function Gauge(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Gauge dataPoints. + * @member {Array.} dataPoints + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @instance + */ + Gauge.prototype.dataPoints = $util.emptyArray; + /** + * Creates a new Gauge instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {opentelemetry.proto.metrics.v1.IGauge=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge instance + */ + Gauge.create = function create(properties) { + return new Gauge(properties); + }; + /** + * Encodes the specified Gauge message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Gauge.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {opentelemetry.proto.metrics.v1.IGauge} message Gauge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gauge.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified Gauge message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Gauge.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {opentelemetry.proto.metrics.v1.IGauge} message Gauge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gauge.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Gauge message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gauge.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Gauge(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Gauge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gauge.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Gauge message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Gauge.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + return null; + }; + /** + * Creates a Gauge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge + */ + Gauge.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Gauge) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Gauge(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected"); + message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(object.dataPoints[i]); + } + } + return message; + }; + /** + * Creates a plain object from a Gauge message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {opentelemetry.proto.metrics.v1.Gauge} message Gauge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Gauge.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j], options); + } + return object; + }; + /** + * Converts this Gauge to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @instance + * @returns {Object.} JSON object + */ + Gauge.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Gauge + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Gauge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Gauge"; + }; + return Gauge; + })(); + v1.Sum = (function () { + /** + * Properties of a Sum. + * @memberof opentelemetry.proto.metrics.v1 + * @interface ISum + * @property {Array.|null} [dataPoints] Sum dataPoints + * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] Sum aggregationTemporality + * @property {boolean|null} [isMonotonic] Sum isMonotonic + */ + /** + * Constructs a new Sum. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a Sum. + * @implements ISum + * @constructor + * @param {opentelemetry.proto.metrics.v1.ISum=} [properties] Properties to set + */ + function Sum(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Sum dataPoints. + * @member {Array.} dataPoints + * @memberof opentelemetry.proto.metrics.v1.Sum + * @instance + */ + Sum.prototype.dataPoints = $util.emptyArray; + /** + * Sum aggregationTemporality. + * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality + * @memberof opentelemetry.proto.metrics.v1.Sum + * @instance + */ + Sum.prototype.aggregationTemporality = null; + /** + * Sum isMonotonic. + * @member {boolean|null|undefined} isMonotonic + * @memberof opentelemetry.proto.metrics.v1.Sum + * @instance + */ + Sum.prototype.isMonotonic = null; + /** + * Creates a new Sum instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {opentelemetry.proto.metrics.v1.ISum=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Sum} Sum instance + */ + Sum.create = function create(properties) { + return new Sum(properties); + }; + /** + * Encodes the specified Sum message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Sum.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {opentelemetry.proto.metrics.v1.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, "aggregationTemporality")) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality); + if (message.isMonotonic != null && Object.hasOwnProperty.call(message, "isMonotonic")) + writer.uint32(/* id 3, wireType 0 =*/ 24).bool(message.isMonotonic); + return writer; + }; + /** + * Encodes the specified Sum message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Sum.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {opentelemetry.proto.metrics.v1.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Sum message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Sum(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(reader, reader.uint32())); + break; + } + case 2: { + message.aggregationTemporality = reader.int32(); + break; + } + case 3: { + message.isMonotonic = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Sum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Sum message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + switch (message.aggregationTemporality) { + default: + return "aggregationTemporality: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.isMonotonic != null && message.hasOwnProperty("isMonotonic")) + if (typeof message.isMonotonic !== "boolean") + return "isMonotonic: boolean expected"; + return null; + }; + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Sum} Sum + */ + Sum.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Sum) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Sum(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected"); + message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(object.dataPoints[i]); + } + } + switch (object.aggregationTemporality) { + default: + if (typeof object.aggregationTemporality === "number") { + message.aggregationTemporality = object.aggregationTemporality; + break; + } + break; + case "AGGREGATION_TEMPORALITY_UNSPECIFIED": + case 0: + message.aggregationTemporality = 0; + break; + case "AGGREGATION_TEMPORALITY_DELTA": + case 1: + message.aggregationTemporality = 1; + break; + case "AGGREGATION_TEMPORALITY_CUMULATIVE": + case 2: + message.aggregationTemporality = 2; + break; + } + if (object.isMonotonic != null) + message.isMonotonic = Boolean(object.isMonotonic); + return message; + }; + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {opentelemetry.proto.metrics.v1.Sum} message Sum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sum.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (options.defaults) { + object.aggregationTemporality = options.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0; + object.isMonotonic = false; + } + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j], options); + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality; + if (message.isMonotonic != null && message.hasOwnProperty("isMonotonic")) + object.isMonotonic = message.isMonotonic; + return object; + }; + /** + * Converts this Sum to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Sum + * @instance + * @returns {Object.} JSON object + */ + Sum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Sum + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Sum"; + }; + return Sum; + })(); + v1.Histogram = (function () { + /** + * Properties of a Histogram. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IHistogram + * @property {Array.|null} [dataPoints] Histogram dataPoints + * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] Histogram aggregationTemporality + */ + /** + * Constructs a new Histogram. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a Histogram. + * @implements IHistogram + * @constructor + * @param {opentelemetry.proto.metrics.v1.IHistogram=} [properties] Properties to set + */ + function Histogram(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Histogram dataPoints. + * @member {Array.} dataPoints + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @instance + */ + Histogram.prototype.dataPoints = $util.emptyArray; + /** + * Histogram aggregationTemporality. + * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @instance + */ + Histogram.prototype.aggregationTemporality = null; + /** + * Creates a new Histogram instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogram=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram instance + */ + Histogram.create = function create(properties) { + return new Histogram(properties); + }; + /** + * Encodes the specified Histogram message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Histogram.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogram} message Histogram message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Histogram.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, "aggregationTemporality")) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality); + return writer; + }; + /** + * Encodes the specified Histogram message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Histogram.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogram} message Histogram message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Histogram.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Histogram message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Histogram.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Histogram(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(reader, reader.uint32())); + break; + } + case 2: { + message.aggregationTemporality = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Histogram message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Histogram.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Histogram message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Histogram.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + switch (message.aggregationTemporality) { + default: + return "aggregationTemporality: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + /** + * Creates a Histogram message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram + */ + Histogram.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Histogram) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Histogram(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected"); + message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(object.dataPoints[i]); + } + } + switch (object.aggregationTemporality) { + default: + if (typeof object.aggregationTemporality === "number") { + message.aggregationTemporality = object.aggregationTemporality; + break; + } + break; + case "AGGREGATION_TEMPORALITY_UNSPECIFIED": + case 0: + message.aggregationTemporality = 0; + break; + case "AGGREGATION_TEMPORALITY_DELTA": + case 1: + message.aggregationTemporality = 1; + break; + case "AGGREGATION_TEMPORALITY_CUMULATIVE": + case 2: + message.aggregationTemporality = 2; + break; + } + return message; + }; + /** + * Creates a plain object from a Histogram message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {opentelemetry.proto.metrics.v1.Histogram} message Histogram + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Histogram.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (options.defaults) + object.aggregationTemporality = options.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0; + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(message.dataPoints[j], options); + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality; + return object; + }; + /** + * Converts this Histogram to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @instance + * @returns {Object.} JSON object + */ + Histogram.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Histogram + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Histogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Histogram"; + }; + return Histogram; + })(); + v1.ExponentialHistogram = (function () { + /** + * Properties of an ExponentialHistogram. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IExponentialHistogram + * @property {Array.|null} [dataPoints] ExponentialHistogram dataPoints + * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] ExponentialHistogram aggregationTemporality + */ + /** + * Constructs a new ExponentialHistogram. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents an ExponentialHistogram. + * @implements IExponentialHistogram + * @constructor + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram=} [properties] Properties to set + */ + function ExponentialHistogram(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExponentialHistogram dataPoints. + * @member {Array.} dataPoints + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @instance + */ + ExponentialHistogram.prototype.dataPoints = $util.emptyArray; + /** + * ExponentialHistogram aggregationTemporality. + * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @instance + */ + ExponentialHistogram.prototype.aggregationTemporality = null; + /** + * Creates a new ExponentialHistogram instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram instance + */ + ExponentialHistogram.create = function create(properties) { + return new ExponentialHistogram(properties); + }; + /** + * Encodes the specified ExponentialHistogram message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogram.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram} message ExponentialHistogram message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExponentialHistogram.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, "aggregationTemporality")) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality); + return writer; + }; + /** + * Encodes the specified ExponentialHistogram message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogram.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram} message ExponentialHistogram message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExponentialHistogram.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExponentialHistogram message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExponentialHistogram.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogram(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(reader, reader.uint32())); + break; + } + case 2: { + message.aggregationTemporality = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExponentialHistogram message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExponentialHistogram.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExponentialHistogram message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExponentialHistogram.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + switch (message.aggregationTemporality) { + default: + return "aggregationTemporality: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + /** + * Creates an ExponentialHistogram message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram + */ + ExponentialHistogram.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogram) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogram(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected"); + message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(object.dataPoints[i]); + } + } + switch (object.aggregationTemporality) { + default: + if (typeof object.aggregationTemporality === "number") { + message.aggregationTemporality = object.aggregationTemporality; + break; + } + break; + case "AGGREGATION_TEMPORALITY_UNSPECIFIED": + case 0: + message.aggregationTemporality = 0; + break; + case "AGGREGATION_TEMPORALITY_DELTA": + case 1: + message.aggregationTemporality = 1; + break; + case "AGGREGATION_TEMPORALITY_CUMULATIVE": + case 2: + message.aggregationTemporality = 2; + break; + } + return message; + }; + /** + * Creates a plain object from an ExponentialHistogram message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogram} message ExponentialHistogram + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExponentialHistogram.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (options.defaults) + object.aggregationTemporality = options.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0; + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(message.dataPoints[j], options); + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality; + return object; + }; + /** + * Converts this ExponentialHistogram to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @instance + * @returns {Object.} JSON object + */ + ExponentialHistogram.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExponentialHistogram + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExponentialHistogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ExponentialHistogram"; + }; + return ExponentialHistogram; + })(); + v1.Summary = (function () { + /** + * Properties of a Summary. + * @memberof opentelemetry.proto.metrics.v1 + * @interface ISummary + * @property {Array.|null} [dataPoints] Summary dataPoints + */ + /** + * Constructs a new Summary. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a Summary. + * @implements ISummary + * @constructor + * @param {opentelemetry.proto.metrics.v1.ISummary=} [properties] Properties to set + */ + function Summary(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Summary dataPoints. + * @member {Array.} dataPoints + * @memberof opentelemetry.proto.metrics.v1.Summary + * @instance + */ + Summary.prototype.dataPoints = $util.emptyArray; + /** + * Creates a new Summary instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {opentelemetry.proto.metrics.v1.ISummary=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Summary} Summary instance + */ + Summary.create = function create(properties) { + return new Summary(properties); + }; + /** + * Encodes the specified Summary message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Summary.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {opentelemetry.proto.metrics.v1.ISummary} message Summary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Summary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified Summary message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Summary.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {opentelemetry.proto.metrics.v1.ISummary} message Summary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Summary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Summary message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Summary} Summary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Summary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Summary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Summary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Summary} Summary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Summary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Summary message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Summary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + return null; + }; + /** + * Creates a Summary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Summary} Summary + */ + Summary.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Summary) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Summary(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected"); + message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(object.dataPoints[i]); + } + } + return message; + }; + /** + * Creates a plain object from a Summary message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {opentelemetry.proto.metrics.v1.Summary} message Summary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Summary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(message.dataPoints[j], options); + } + return object; + }; + /** + * Converts this Summary to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Summary + * @instance + * @returns {Object.} JSON object + */ + Summary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Summary + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Summary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Summary"; + }; + return Summary; + })(); + /** + * AggregationTemporality enum. + * @name opentelemetry.proto.metrics.v1.AggregationTemporality + * @enum {number} + * @property {number} AGGREGATION_TEMPORALITY_UNSPECIFIED=0 AGGREGATION_TEMPORALITY_UNSPECIFIED value + * @property {number} AGGREGATION_TEMPORALITY_DELTA=1 AGGREGATION_TEMPORALITY_DELTA value + * @property {number} AGGREGATION_TEMPORALITY_CUMULATIVE=2 AGGREGATION_TEMPORALITY_CUMULATIVE value + */ + v1.AggregationTemporality = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AGGREGATION_TEMPORALITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "AGGREGATION_TEMPORALITY_DELTA"] = 1; + values[valuesById[2] = "AGGREGATION_TEMPORALITY_CUMULATIVE"] = 2; + return values; + })(); + /** + * DataPointFlags enum. + * @name opentelemetry.proto.metrics.v1.DataPointFlags + * @enum {number} + * @property {number} DATA_POINT_FLAGS_DO_NOT_USE=0 DATA_POINT_FLAGS_DO_NOT_USE value + * @property {number} DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK=1 DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK value + */ + v1.DataPointFlags = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_POINT_FLAGS_DO_NOT_USE"] = 0; + values[valuesById[1] = "DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"] = 1; + return values; + })(); + v1.NumberDataPoint = (function () { + /** + * Properties of a NumberDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @interface INumberDataPoint + * @property {Array.|null} [attributes] NumberDataPoint attributes + * @property {number|Long|null} [startTimeUnixNano] NumberDataPoint startTimeUnixNano + * @property {number|Long|null} [timeUnixNano] NumberDataPoint timeUnixNano + * @property {number|null} [asDouble] NumberDataPoint asDouble + * @property {number|Long|null} [asInt] NumberDataPoint asInt + * @property {Array.|null} [exemplars] NumberDataPoint exemplars + * @property {number|null} [flags] NumberDataPoint flags + */ + /** + * Constructs a new NumberDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a NumberDataPoint. + * @implements INumberDataPoint + * @constructor + * @param {opentelemetry.proto.metrics.v1.INumberDataPoint=} [properties] Properties to set + */ + function NumberDataPoint(properties) { + this.attributes = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * NumberDataPoint attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.attributes = $util.emptyArray; + /** + * NumberDataPoint startTimeUnixNano. + * @member {number|Long|null|undefined} startTimeUnixNano + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.startTimeUnixNano = null; + /** + * NumberDataPoint timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.timeUnixNano = null; + /** + * NumberDataPoint asDouble. + * @member {number|null|undefined} asDouble + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.asDouble = null; + /** + * NumberDataPoint asInt. + * @member {number|Long|null|undefined} asInt + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.asInt = null; + /** + * NumberDataPoint exemplars. + * @member {Array.} exemplars + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.exemplars = $util.emptyArray; + /** + * NumberDataPoint flags. + * @member {number|null|undefined} flags + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.flags = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * NumberDataPoint value. + * @member {"asDouble"|"asInt"|undefined} value + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + Object.defineProperty(NumberDataPoint.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["asDouble", "asInt"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new NumberDataPoint instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.INumberDataPoint=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint instance + */ + NumberDataPoint.create = function create(properties) { + return new NumberDataPoint(properties); + }; + /** + * Encodes the specified NumberDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.NumberDataPoint.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.INumberDataPoint} message NumberDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumberDataPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) + writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); + if (message.asDouble != null && Object.hasOwnProperty.call(message, "asDouble")) + writer.uint32(/* id 4, wireType 1 =*/ 33).double(message.asDouble); + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); + if (message.asInt != null && Object.hasOwnProperty.call(message, "asInt")) + writer.uint32(/* id 6, wireType 1 =*/ 49).sfixed64(message.asInt); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 8, wireType 0 =*/ 64).uint32(message.flags); + return writer; + }; + /** + * Encodes the specified NumberDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.NumberDataPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.INumberDataPoint} message NumberDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumberDataPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a NumberDataPoint message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumberDataPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.NumberDataPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.startTimeUnixNano = reader.fixed64(); + break; + } + case 3: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 4: { + message.asDouble = reader.double(); + break; + } + case 6: { + message.asInt = reader.sfixed64(); + break; + } + case 5: { + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32())); + break; + } + case 8: { + message.flags = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a NumberDataPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumberDataPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a NumberDataPoint message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumberDataPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) + return "startTimeUnixNano: integer|Long expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.asDouble != null && message.hasOwnProperty("asDouble")) { + properties.value = 1; + if (typeof message.asDouble !== "number") + return "asDouble: number expected"; + } + if (message.asInt != null && message.hasOwnProperty("asInt")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.asInt) && !(message.asInt && $util.isInteger(message.asInt.low) && $util.isInteger(message.asInt.high))) + return "asInt: integer|Long expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + return null; + }; + /** + * Creates a NumberDataPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint + */ + NumberDataPoint.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.NumberDataPoint) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.NumberDataPoint(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.startTimeUnixNano != null) + if ($util.Long) + (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; + else if (typeof object.startTimeUnixNano === "string") + message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); + else if (typeof object.startTimeUnixNano === "number") + message.startTimeUnixNano = object.startTimeUnixNano; + else if (typeof object.startTimeUnixNano === "object") + message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.asDouble != null) + message.asDouble = Number(object.asDouble); + if (object.asInt != null) + if ($util.Long) + (message.asInt = $util.Long.fromValue(object.asInt)).unsigned = false; + else if (typeof object.asInt === "string") + message.asInt = parseInt(object.asInt, 10); + else if (typeof object.asInt === "number") + message.asInt = object.asInt; + else if (typeof object.asInt === "object") + message.asInt = new $util.LongBits(object.asInt.low >>> 0, object.asInt.high >>> 0).toNumber(); + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected"); + message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]); + } + } + if (object.flags != null) + message.flags = object.flags >>> 0; + return message; + }; + /** + * Creates a plain object from a NumberDataPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.NumberDataPoint} message NumberDataPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumberDataPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.exemplars = []; + object.attributes = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.startTimeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + object.flags = 0; + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (typeof message.startTimeUnixNano === "number") + object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; + else + object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.asDouble != null && message.hasOwnProperty("asDouble")) { + object.asDouble = options.json && !isFinite(message.asDouble) ? String(message.asDouble) : message.asDouble; + if (options.oneofs) + object.value = "asDouble"; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options); + } + if (message.asInt != null && message.hasOwnProperty("asInt")) { + if (typeof message.asInt === "number") + object.asInt = options.longs === String ? String(message.asInt) : message.asInt; + else + object.asInt = options.longs === String ? $util.Long.prototype.toString.call(message.asInt) : options.longs === Number ? new $util.LongBits(message.asInt.low >>> 0, message.asInt.high >>> 0).toNumber() : message.asInt; + if (options.oneofs) + object.value = "asInt"; + } + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + return object; + }; + /** + * Converts this NumberDataPoint to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + * @returns {Object.} JSON object + */ + NumberDataPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for NumberDataPoint + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumberDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.NumberDataPoint"; + }; + return NumberDataPoint; + })(); + v1.HistogramDataPoint = (function () { + /** + * Properties of a HistogramDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IHistogramDataPoint + * @property {Array.|null} [attributes] HistogramDataPoint attributes + * @property {number|Long|null} [startTimeUnixNano] HistogramDataPoint startTimeUnixNano + * @property {number|Long|null} [timeUnixNano] HistogramDataPoint timeUnixNano + * @property {number|Long|null} [count] HistogramDataPoint count + * @property {number|null} [sum] HistogramDataPoint sum + * @property {Array.|null} [bucketCounts] HistogramDataPoint bucketCounts + * @property {Array.|null} [explicitBounds] HistogramDataPoint explicitBounds + * @property {Array.|null} [exemplars] HistogramDataPoint exemplars + * @property {number|null} [flags] HistogramDataPoint flags + * @property {number|null} [min] HistogramDataPoint min + * @property {number|null} [max] HistogramDataPoint max + */ + /** + * Constructs a new HistogramDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a HistogramDataPoint. + * @implements IHistogramDataPoint + * @constructor + * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint=} [properties] Properties to set + */ + function HistogramDataPoint(properties) { + this.attributes = []; + this.bucketCounts = []; + this.explicitBounds = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * HistogramDataPoint attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.attributes = $util.emptyArray; + /** + * HistogramDataPoint startTimeUnixNano. + * @member {number|Long|null|undefined} startTimeUnixNano + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.startTimeUnixNano = null; + /** + * HistogramDataPoint timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.timeUnixNano = null; + /** + * HistogramDataPoint count. + * @member {number|Long|null|undefined} count + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.count = null; + /** + * HistogramDataPoint sum. + * @member {number|null|undefined} sum + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.sum = null; + /** + * HistogramDataPoint bucketCounts. + * @member {Array.} bucketCounts + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.bucketCounts = $util.emptyArray; + /** + * HistogramDataPoint explicitBounds. + * @member {Array.} explicitBounds + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.explicitBounds = $util.emptyArray; + /** + * HistogramDataPoint exemplars. + * @member {Array.} exemplars + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.exemplars = $util.emptyArray; + /** + * HistogramDataPoint flags. + * @member {number|null|undefined} flags + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.flags = null; + /** + * HistogramDataPoint min. + * @member {number|null|undefined} min + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.min = null; + /** + * HistogramDataPoint max. + * @member {number|null|undefined} max + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.max = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * HistogramDataPoint _sum. + * @member {"sum"|undefined} _sum + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + Object.defineProperty(HistogramDataPoint.prototype, "_sum", { + get: $util.oneOfGetter($oneOfFields = ["sum"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * HistogramDataPoint _min. + * @member {"min"|undefined} _min + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + Object.defineProperty(HistogramDataPoint.prototype, "_min", { + get: $util.oneOfGetter($oneOfFields = ["min"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * HistogramDataPoint _max. + * @member {"max"|undefined} _max + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + Object.defineProperty(HistogramDataPoint.prototype, "_max", { + get: $util.oneOfGetter($oneOfFields = ["max"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new HistogramDataPoint instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint instance + */ + HistogramDataPoint.create = function create(properties) { + return new HistogramDataPoint(properties); + }; + /** + * Encodes the specified HistogramDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.HistogramDataPoint.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint} message HistogramDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistogramDataPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) + writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 6, wireType 2 =*/ 50).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.fixed64(message.bucketCounts[i]); + writer.ldelim(); + } + if (message.explicitBounds != null && message.explicitBounds.length) { + writer.uint32(/* id 7, wireType 2 =*/ 58).fork(); + for (var i = 0; i < message.explicitBounds.length; ++i) + writer.double(message.explicitBounds[i]); + writer.ldelim(); + } + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 8, wireType 2 =*/ 66).fork()).ldelim(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.flags); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 11, wireType 1 =*/ 89).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 12, wireType 1 =*/ 97).double(message.max); + return writer; + }; + /** + * Encodes the specified HistogramDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.HistogramDataPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint} message HistogramDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistogramDataPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a HistogramDataPoint message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistogramDataPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.HistogramDataPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 9: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.startTimeUnixNano = reader.fixed64(); + break; + } + case 3: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 4: { + message.count = reader.fixed64(); + break; + } + case 5: { + message.sum = reader.double(); + break; + } + case 6: { + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.fixed64()); + } + else + message.bucketCounts.push(reader.fixed64()); + break; + } + case 7: { + if (!(message.explicitBounds && message.explicitBounds.length)) + message.explicitBounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.explicitBounds.push(reader.double()); + } + else + message.explicitBounds.push(reader.double()); + break; + } + case 8: { + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32())); + break; + } + case 10: { + message.flags = reader.uint32(); + break; + } + case 11: { + message.min = reader.double(); + break; + } + case 12: { + message.max = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a HistogramDataPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistogramDataPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a HistogramDataPoint message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistogramDataPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) + return "startTimeUnixNano: integer|Long expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.sum != null && message.hasOwnProperty("sum")) { + properties._sum = 1; + if (typeof message.sum !== "number") + return "sum: number expected"; + } + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + if (message.explicitBounds != null && message.hasOwnProperty("explicitBounds")) { + if (!Array.isArray(message.explicitBounds)) + return "explicitBounds: array expected"; + for (var i = 0; i < message.explicitBounds.length; ++i) + if (typeof message.explicitBounds[i] !== "number") + return "explicitBounds: number[] expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + if (message.min != null && message.hasOwnProperty("min")) { + properties._min = 1; + if (typeof message.min !== "number") + return "min: number expected"; + } + if (message.max != null && message.hasOwnProperty("max")) { + properties._max = 1; + if (typeof message.max !== "number") + return "max: number expected"; + } + return null; + }; + /** + * Creates a HistogramDataPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint + */ + HistogramDataPoint.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.HistogramDataPoint) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.HistogramDataPoint(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.startTimeUnixNano != null) + if ($util.Long) + (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; + else if (typeof object.startTimeUnixNano === "string") + message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); + else if (typeof object.startTimeUnixNano === "number") + message.startTimeUnixNano = object.startTimeUnixNano; + else if (typeof object.startTimeUnixNano === "object") + message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.sum != null) + message.sum = Number(object.sum); + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + } + if (object.explicitBounds) { + if (!Array.isArray(object.explicitBounds)) + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected"); + message.explicitBounds = []; + for (var i = 0; i < object.explicitBounds.length; ++i) + message.explicitBounds[i] = Number(object.explicitBounds[i]); + } + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected"); + message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]); + } + } + if (object.flags != null) + message.flags = object.flags >>> 0; + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + return message; + }; + /** + * Creates a plain object from a HistogramDataPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.HistogramDataPoint} message HistogramDataPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistogramDataPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bucketCounts = []; + object.explicitBounds = []; + object.exemplars = []; + object.attributes = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.startTimeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.count = options.longs === String ? "0" : 0; + object.flags = 0; + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (typeof message.startTimeUnixNano === "number") + object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; + else + object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum; + if (options.oneofs) + object._sum = "sum"; + } + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + } + if (message.explicitBounds && message.explicitBounds.length) { + object.explicitBounds = []; + for (var j = 0; j < message.explicitBounds.length; ++j) + object.explicitBounds[j] = options.json && !isFinite(message.explicitBounds[j]) ? String(message.explicitBounds[j]) : message.explicitBounds[j]; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options); + } + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + if (message.min != null && message.hasOwnProperty("min")) { + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (options.oneofs) + object._min = "min"; + } + if (message.max != null && message.hasOwnProperty("max")) { + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + if (options.oneofs) + object._max = "max"; + } + return object; + }; + /** + * Converts this HistogramDataPoint to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + * @returns {Object.} JSON object + */ + HistogramDataPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for HistogramDataPoint + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HistogramDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.HistogramDataPoint"; + }; + return HistogramDataPoint; + })(); + v1.ExponentialHistogramDataPoint = (function () { + /** + * Properties of an ExponentialHistogramDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IExponentialHistogramDataPoint + * @property {Array.|null} [attributes] ExponentialHistogramDataPoint attributes + * @property {number|Long|null} [startTimeUnixNano] ExponentialHistogramDataPoint startTimeUnixNano + * @property {number|Long|null} [timeUnixNano] ExponentialHistogramDataPoint timeUnixNano + * @property {number|Long|null} [count] ExponentialHistogramDataPoint count + * @property {number|null} [sum] ExponentialHistogramDataPoint sum + * @property {number|null} [scale] ExponentialHistogramDataPoint scale + * @property {number|Long|null} [zeroCount] ExponentialHistogramDataPoint zeroCount + * @property {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null} [positive] ExponentialHistogramDataPoint positive + * @property {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null} [negative] ExponentialHistogramDataPoint negative + * @property {number|null} [flags] ExponentialHistogramDataPoint flags + * @property {Array.|null} [exemplars] ExponentialHistogramDataPoint exemplars + * @property {number|null} [min] ExponentialHistogramDataPoint min + * @property {number|null} [max] ExponentialHistogramDataPoint max + * @property {number|null} [zeroThreshold] ExponentialHistogramDataPoint zeroThreshold + */ + /** + * Constructs a new ExponentialHistogramDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents an ExponentialHistogramDataPoint. + * @implements IExponentialHistogramDataPoint + * @constructor + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint=} [properties] Properties to set + */ + function ExponentialHistogramDataPoint(properties) { + this.attributes = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExponentialHistogramDataPoint attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.attributes = $util.emptyArray; + /** + * ExponentialHistogramDataPoint startTimeUnixNano. + * @member {number|Long|null|undefined} startTimeUnixNano + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.startTimeUnixNano = null; + /** + * ExponentialHistogramDataPoint timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.timeUnixNano = null; + /** + * ExponentialHistogramDataPoint count. + * @member {number|Long|null|undefined} count + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.count = null; + /** + * ExponentialHistogramDataPoint sum. + * @member {number|null|undefined} sum + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.sum = null; + /** + * ExponentialHistogramDataPoint scale. + * @member {number|null|undefined} scale + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.scale = null; + /** + * ExponentialHistogramDataPoint zeroCount. + * @member {number|Long|null|undefined} zeroCount + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.zeroCount = null; + /** + * ExponentialHistogramDataPoint positive. + * @member {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null|undefined} positive + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.positive = null; + /** + * ExponentialHistogramDataPoint negative. + * @member {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null|undefined} negative + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.negative = null; + /** + * ExponentialHistogramDataPoint flags. + * @member {number|null|undefined} flags + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.flags = null; + /** + * ExponentialHistogramDataPoint exemplars. + * @member {Array.} exemplars + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.exemplars = $util.emptyArray; + /** + * ExponentialHistogramDataPoint min. + * @member {number|null|undefined} min + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.min = null; + /** + * ExponentialHistogramDataPoint max. + * @member {number|null|undefined} max + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.max = null; + /** + * ExponentialHistogramDataPoint zeroThreshold. + * @member {number|null|undefined} zeroThreshold + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.zeroThreshold = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * ExponentialHistogramDataPoint _sum. + * @member {"sum"|undefined} _sum + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + Object.defineProperty(ExponentialHistogramDataPoint.prototype, "_sum", { + get: $util.oneOfGetter($oneOfFields = ["sum"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * ExponentialHistogramDataPoint _min. + * @member {"min"|undefined} _min + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + Object.defineProperty(ExponentialHistogramDataPoint.prototype, "_min", { + get: $util.oneOfGetter($oneOfFields = ["min"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * ExponentialHistogramDataPoint _max. + * @member {"max"|undefined} _max + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + Object.defineProperty(ExponentialHistogramDataPoint.prototype, "_max", { + get: $util.oneOfGetter($oneOfFields = ["max"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new ExponentialHistogramDataPoint instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint instance + */ + ExponentialHistogramDataPoint.create = function create(properties) { + return new ExponentialHistogramDataPoint(properties); + }; + /** + * Encodes the specified ExponentialHistogramDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint} message ExponentialHistogramDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExponentialHistogramDataPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) + writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 6, wireType 0 =*/ 48).sint32(message.scale); + if (message.zeroCount != null && Object.hasOwnProperty.call(message, "zeroCount")) + writer.uint32(/* id 7, wireType 1 =*/ 57).fixed64(message.zeroCount); + if (message.positive != null && Object.hasOwnProperty.call(message, "positive")) + $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(message.positive, writer.uint32(/* id 8, wireType 2 =*/ 66).fork()).ldelim(); + if (message.negative != null && Object.hasOwnProperty.call(message, "negative")) + $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(message.negative, writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.flags); + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 12, wireType 1 =*/ 97).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 13, wireType 1 =*/ 105).double(message.max); + if (message.zeroThreshold != null && Object.hasOwnProperty.call(message, "zeroThreshold")) + writer.uint32(/* id 14, wireType 1 =*/ 113).double(message.zeroThreshold); + return writer; + }; + /** + * Encodes the specified ExponentialHistogramDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint} message ExponentialHistogramDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExponentialHistogramDataPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExponentialHistogramDataPoint message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExponentialHistogramDataPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.startTimeUnixNano = reader.fixed64(); + break; + } + case 3: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 4: { + message.count = reader.fixed64(); + break; + } + case 5: { + message.sum = reader.double(); + break; + } + case 6: { + message.scale = reader.sint32(); + break; + } + case 7: { + message.zeroCount = reader.fixed64(); + break; + } + case 8: { + message.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(reader, reader.uint32()); + break; + } + case 9: { + message.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(reader, reader.uint32()); + break; + } + case 10: { + message.flags = reader.uint32(); + break; + } + case 11: { + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32())); + break; + } + case 12: { + message.min = reader.double(); + break; + } + case 13: { + message.max = reader.double(); + break; + } + case 14: { + message.zeroThreshold = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExponentialHistogramDataPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExponentialHistogramDataPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExponentialHistogramDataPoint message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExponentialHistogramDataPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) + return "startTimeUnixNano: integer|Long expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.sum != null && message.hasOwnProperty("sum")) { + properties._sum = 1; + if (typeof message.sum !== "number") + return "sum: number expected"; + } + if (message.scale != null && message.hasOwnProperty("scale")) + if (!$util.isInteger(message.scale)) + return "scale: integer expected"; + if (message.zeroCount != null && message.hasOwnProperty("zeroCount")) + if (!$util.isInteger(message.zeroCount) && !(message.zeroCount && $util.isInteger(message.zeroCount.low) && $util.isInteger(message.zeroCount.high))) + return "zeroCount: integer|Long expected"; + if (message.positive != null && message.hasOwnProperty("positive")) { + var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(message.positive); + if (error) + return "positive." + error; + } + if (message.negative != null && message.hasOwnProperty("negative")) { + var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(message.negative); + if (error) + return "negative." + error; + } + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + if (message.min != null && message.hasOwnProperty("min")) { + properties._min = 1; + if (typeof message.min !== "number") + return "min: number expected"; + } + if (message.max != null && message.hasOwnProperty("max")) { + properties._max = 1; + if (typeof message.max !== "number") + return "max: number expected"; + } + if (message.zeroThreshold != null && message.hasOwnProperty("zeroThreshold")) + if (typeof message.zeroThreshold !== "number") + return "zeroThreshold: number expected"; + return null; + }; + /** + * Creates an ExponentialHistogramDataPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint + */ + ExponentialHistogramDataPoint.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.startTimeUnixNano != null) + if ($util.Long) + (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; + else if (typeof object.startTimeUnixNano === "string") + message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); + else if (typeof object.startTimeUnixNano === "number") + message.startTimeUnixNano = object.startTimeUnixNano; + else if (typeof object.startTimeUnixNano === "object") + message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.sum != null) + message.sum = Number(object.sum); + if (object.scale != null) + message.scale = object.scale | 0; + if (object.zeroCount != null) + if ($util.Long) + (message.zeroCount = $util.Long.fromValue(object.zeroCount)).unsigned = false; + else if (typeof object.zeroCount === "string") + message.zeroCount = parseInt(object.zeroCount, 10); + else if (typeof object.zeroCount === "number") + message.zeroCount = object.zeroCount; + else if (typeof object.zeroCount === "object") + message.zeroCount = new $util.LongBits(object.zeroCount.low >>> 0, object.zeroCount.high >>> 0).toNumber(); + if (object.positive != null) { + if (typeof object.positive !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected"); + message.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(object.positive); + } + if (object.negative != null) { + if (typeof object.negative !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected"); + message.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(object.negative); + } + if (object.flags != null) + message.flags = object.flags >>> 0; + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected"); + message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]); + } + } + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + if (object.zeroThreshold != null) + message.zeroThreshold = Number(object.zeroThreshold); + return message; + }; + /** + * Creates a plain object from an ExponentialHistogramDataPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} message ExponentialHistogramDataPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExponentialHistogramDataPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.attributes = []; + object.exemplars = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.startTimeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.count = options.longs === String ? "0" : 0; + object.scale = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.zeroCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.zeroCount = options.longs === String ? "0" : 0; + object.positive = null; + object.negative = null; + object.flags = 0; + object.zeroThreshold = 0; + } + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (typeof message.startTimeUnixNano === "number") + object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; + else + object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum; + if (options.oneofs) + object._sum = "sum"; + } + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = message.scale; + if (message.zeroCount != null && message.hasOwnProperty("zeroCount")) + if (typeof message.zeroCount === "number") + object.zeroCount = options.longs === String ? String(message.zeroCount) : message.zeroCount; + else + object.zeroCount = options.longs === String ? $util.Long.prototype.toString.call(message.zeroCount) : options.longs === Number ? new $util.LongBits(message.zeroCount.low >>> 0, message.zeroCount.high >>> 0).toNumber() : message.zeroCount; + if (message.positive != null && message.hasOwnProperty("positive")) + object.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.positive, options); + if (message.negative != null && message.hasOwnProperty("negative")) + object.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.negative, options); + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options); + } + if (message.min != null && message.hasOwnProperty("min")) { + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (options.oneofs) + object._min = "min"; + } + if (message.max != null && message.hasOwnProperty("max")) { + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + if (options.oneofs) + object._max = "max"; + } + if (message.zeroThreshold != null && message.hasOwnProperty("zeroThreshold")) + object.zeroThreshold = options.json && !isFinite(message.zeroThreshold) ? String(message.zeroThreshold) : message.zeroThreshold; + return object; + }; + /** + * Converts this ExponentialHistogramDataPoint to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + * @returns {Object.} JSON object + */ + ExponentialHistogramDataPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExponentialHistogramDataPoint + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExponentialHistogramDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"; + }; + ExponentialHistogramDataPoint.Buckets = (function () { + /** + * Properties of a Buckets. + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @interface IBuckets + * @property {number|null} [offset] Buckets offset + * @property {Array.|null} [bucketCounts] Buckets bucketCounts + */ + /** + * Constructs a new Buckets. + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @classdesc Represents a Buckets. + * @implements IBuckets + * @constructor + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets=} [properties] Properties to set + */ + function Buckets(properties) { + this.bucketCounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Buckets offset. + * @member {number|null|undefined} offset + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @instance + */ + Buckets.prototype.offset = null; + /** + * Buckets bucketCounts. + * @member {Array.} bucketCounts + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @instance + */ + Buckets.prototype.bucketCounts = $util.emptyArray; + /** + * Creates a new Buckets instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets instance + */ + Buckets.create = function create(properties) { + return new Buckets(properties); + }; + /** + * Encodes the specified Buckets message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets} message Buckets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Buckets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 1, wireType 0 =*/ 8).sint32(message.offset); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.uint64(message.bucketCounts[i]); + writer.ldelim(); + } + return writer; + }; + /** + * Encodes the specified Buckets message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets} message Buckets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Buckets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Buckets message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Buckets.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.offset = reader.sint32(); + break; + } + case 2: { + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.uint64()); + } + else + message.bucketCounts.push(reader.uint64()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Buckets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Buckets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Buckets message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Buckets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset)) + return "offset: integer expected"; + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + return null; + }; + /** + * Creates a Buckets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets + */ + Buckets.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets(); + if (object.offset != null) + message.offset = object.offset | 0; + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = true; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(true); + } + return message; + }; + /** + * Creates a plain object from a Buckets message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} message Buckets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Buckets.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bucketCounts = []; + if (options.defaults) + object.offset = 0; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = message.offset; + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber(true) : message.bucketCounts[j]; + } + return object; + }; + /** + * Converts this Buckets to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @instance + * @returns {Object.} JSON object + */ + Buckets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Buckets + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Buckets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"; + }; + return Buckets; + })(); + return ExponentialHistogramDataPoint; + })(); + v1.SummaryDataPoint = (function () { + /** + * Properties of a SummaryDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @interface ISummaryDataPoint + * @property {Array.|null} [attributes] SummaryDataPoint attributes + * @property {number|Long|null} [startTimeUnixNano] SummaryDataPoint startTimeUnixNano + * @property {number|Long|null} [timeUnixNano] SummaryDataPoint timeUnixNano + * @property {number|Long|null} [count] SummaryDataPoint count + * @property {number|null} [sum] SummaryDataPoint sum + * @property {Array.|null} [quantileValues] SummaryDataPoint quantileValues + * @property {number|null} [flags] SummaryDataPoint flags + */ + /** + * Constructs a new SummaryDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a SummaryDataPoint. + * @implements ISummaryDataPoint + * @constructor + * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint=} [properties] Properties to set + */ + function SummaryDataPoint(properties) { + this.attributes = []; + this.quantileValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * SummaryDataPoint attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.attributes = $util.emptyArray; + /** + * SummaryDataPoint startTimeUnixNano. + * @member {number|Long|null|undefined} startTimeUnixNano + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.startTimeUnixNano = null; + /** + * SummaryDataPoint timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.timeUnixNano = null; + /** + * SummaryDataPoint count. + * @member {number|Long|null|undefined} count + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.count = null; + /** + * SummaryDataPoint sum. + * @member {number|null|undefined} sum + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.sum = null; + /** + * SummaryDataPoint quantileValues. + * @member {Array.} quantileValues + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.quantileValues = $util.emptyArray; + /** + * SummaryDataPoint flags. + * @member {number|null|undefined} flags + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.flags = null; + /** + * Creates a new SummaryDataPoint instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint instance + */ + SummaryDataPoint.create = function create(properties) { + return new SummaryDataPoint(properties); + }; + /** + * Encodes the specified SummaryDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint} message SummaryDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummaryDataPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) + writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum); + if (message.quantileValues != null && message.quantileValues.length) + for (var i = 0; i < message.quantileValues.length; ++i) + $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(message.quantileValues[i], writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 8, wireType 0 =*/ 64).uint32(message.flags); + return writer; + }; + /** + * Encodes the specified SummaryDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint} message SummaryDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummaryDataPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a SummaryDataPoint message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummaryDataPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.startTimeUnixNano = reader.fixed64(); + break; + } + case 3: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 4: { + message.count = reader.fixed64(); + break; + } + case 5: { + message.sum = reader.double(); + break; + } + case 6: { + if (!(message.quantileValues && message.quantileValues.length)) + message.quantileValues = []; + message.quantileValues.push($root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(reader, reader.uint32())); + break; + } + case 8: { + message.flags = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a SummaryDataPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummaryDataPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a SummaryDataPoint message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummaryDataPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) + return "startTimeUnixNano: integer|Long expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.sum != null && message.hasOwnProperty("sum")) + if (typeof message.sum !== "number") + return "sum: number expected"; + if (message.quantileValues != null && message.hasOwnProperty("quantileValues")) { + if (!Array.isArray(message.quantileValues)) + return "quantileValues: array expected"; + for (var i = 0; i < message.quantileValues.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(message.quantileValues[i]); + if (error) + return "quantileValues." + error; + } + } + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + return null; + }; + /** + * Creates a SummaryDataPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint + */ + SummaryDataPoint.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.SummaryDataPoint) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.startTimeUnixNano != null) + if ($util.Long) + (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; + else if (typeof object.startTimeUnixNano === "string") + message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); + else if (typeof object.startTimeUnixNano === "number") + message.startTimeUnixNano = object.startTimeUnixNano; + else if (typeof object.startTimeUnixNano === "object") + message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.sum != null) + message.sum = Number(object.sum); + if (object.quantileValues) { + if (!Array.isArray(object.quantileValues)) + throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected"); + message.quantileValues = []; + for (var i = 0; i < object.quantileValues.length; ++i) { + if (typeof object.quantileValues[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected"); + message.quantileValues[i] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(object.quantileValues[i]); + } + } + if (object.flags != null) + message.flags = object.flags >>> 0; + return message; + }; + /** + * Creates a plain object from a SummaryDataPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint} message SummaryDataPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummaryDataPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.quantileValues = []; + object.attributes = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.startTimeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.count = options.longs === String ? "0" : 0; + object.sum = 0; + object.flags = 0; + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (typeof message.startTimeUnixNano === "number") + object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; + else + object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.sum != null && message.hasOwnProperty("sum")) + object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum; + if (message.quantileValues && message.quantileValues.length) { + object.quantileValues = []; + for (var j = 0; j < message.quantileValues.length; ++j) + object.quantileValues[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(message.quantileValues[j], options); + } + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + return object; + }; + /** + * Converts this SummaryDataPoint to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + * @returns {Object.} JSON object + */ + SummaryDataPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for SummaryDataPoint + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummaryDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.SummaryDataPoint"; + }; + SummaryDataPoint.ValueAtQuantile = (function () { + /** + * Properties of a ValueAtQuantile. + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @interface IValueAtQuantile + * @property {number|null} [quantile] ValueAtQuantile quantile + * @property {number|null} [value] ValueAtQuantile value + */ + /** + * Constructs a new ValueAtQuantile. + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @classdesc Represents a ValueAtQuantile. + * @implements IValueAtQuantile + * @constructor + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile=} [properties] Properties to set + */ + function ValueAtQuantile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ValueAtQuantile quantile. + * @member {number|null|undefined} quantile + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @instance + */ + ValueAtQuantile.prototype.quantile = null; + /** + * ValueAtQuantile value. + * @member {number|null|undefined} value + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @instance + */ + ValueAtQuantile.prototype.value = null; + /** + * Creates a new ValueAtQuantile instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile instance + */ + ValueAtQuantile.create = function create(properties) { + return new ValueAtQuantile(properties); + }; + /** + * Encodes the specified ValueAtQuantile message. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile} message ValueAtQuantile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueAtQuantile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quantile != null && Object.hasOwnProperty.call(message, "quantile")) + writer.uint32(/* id 1, wireType 1 =*/ 9).double(message.quantile); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 1 =*/ 17).double(message.value); + return writer; + }; + /** + * Encodes the specified ValueAtQuantile message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile} message ValueAtQuantile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueAtQuantile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ValueAtQuantile message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueAtQuantile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.quantile = reader.double(); + break; + } + case 2: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ValueAtQuantile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueAtQuantile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ValueAtQuantile message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueAtQuantile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.quantile != null && message.hasOwnProperty("quantile")) + if (typeof message.quantile !== "number") + return "quantile: number expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + /** + * Creates a ValueAtQuantile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile + */ + ValueAtQuantile.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile(); + if (object.quantile != null) + message.quantile = Number(object.quantile); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + /** + * Creates a plain object from a ValueAtQuantile message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} message ValueAtQuantile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueAtQuantile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.quantile = 0; + object.value = 0; + } + if (message.quantile != null && message.hasOwnProperty("quantile")) + object.quantile = options.json && !isFinite(message.quantile) ? String(message.quantile) : message.quantile; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + /** + * Converts this ValueAtQuantile to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @instance + * @returns {Object.} JSON object + */ + ValueAtQuantile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ValueAtQuantile + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValueAtQuantile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"; + }; + return ValueAtQuantile; + })(); + return SummaryDataPoint; + })(); + v1.Exemplar = (function () { + /** + * Properties of an Exemplar. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IExemplar + * @property {Array.|null} [filteredAttributes] Exemplar filteredAttributes + * @property {number|Long|null} [timeUnixNano] Exemplar timeUnixNano + * @property {number|null} [asDouble] Exemplar asDouble + * @property {number|Long|null} [asInt] Exemplar asInt + * @property {Uint8Array|null} [spanId] Exemplar spanId + * @property {Uint8Array|null} [traceId] Exemplar traceId + */ + /** + * Constructs a new Exemplar. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents an Exemplar. + * @implements IExemplar + * @constructor + * @param {opentelemetry.proto.metrics.v1.IExemplar=} [properties] Properties to set + */ + function Exemplar(properties) { + this.filteredAttributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Exemplar filteredAttributes. + * @member {Array.} filteredAttributes + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.filteredAttributes = $util.emptyArray; + /** + * Exemplar timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.timeUnixNano = null; + /** + * Exemplar asDouble. + * @member {number|null|undefined} asDouble + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.asDouble = null; + /** + * Exemplar asInt. + * @member {number|Long|null|undefined} asInt + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.asInt = null; + /** + * Exemplar spanId. + * @member {Uint8Array|null|undefined} spanId + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.spanId = null; + /** + * Exemplar traceId. + * @member {Uint8Array|null|undefined} traceId + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.traceId = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * Exemplar value. + * @member {"asDouble"|"asInt"|undefined} value + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Object.defineProperty(Exemplar.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["asDouble", "asInt"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new Exemplar instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {opentelemetry.proto.metrics.v1.IExemplar=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar instance + */ + Exemplar.create = function create(properties) { + return new Exemplar(properties); + }; + /** + * Encodes the specified Exemplar message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Exemplar.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {opentelemetry.proto.metrics.v1.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.timeUnixNano); + if (message.asDouble != null && Object.hasOwnProperty.call(message, "asDouble")) + writer.uint32(/* id 3, wireType 1 =*/ 25).double(message.asDouble); + if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) + writer.uint32(/* id 4, wireType 2 =*/ 34).bytes(message.spanId); + if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) + writer.uint32(/* id 5, wireType 2 =*/ 42).bytes(message.traceId); + if (message.asInt != null && Object.hasOwnProperty.call(message, "asInt")) + writer.uint32(/* id 6, wireType 1 =*/ 49).sfixed64(message.asInt); + if (message.filteredAttributes != null && message.filteredAttributes.length) + for (var i = 0; i < message.filteredAttributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.filteredAttributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Exemplar.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {opentelemetry.proto.metrics.v1.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Exemplar(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + if (!(message.filteredAttributes && message.filteredAttributes.length)) + message.filteredAttributes = []; + message.filteredAttributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 3: { + message.asDouble = reader.double(); + break; + } + case 6: { + message.asInt = reader.sfixed64(); + break; + } + case 4: { + message.spanId = reader.bytes(); + break; + } + case 5: { + message.traceId = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an Exemplar message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exemplar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.filteredAttributes != null && message.hasOwnProperty("filteredAttributes")) { + if (!Array.isArray(message.filteredAttributes)) + return "filteredAttributes: array expected"; + for (var i = 0; i < message.filteredAttributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.filteredAttributes[i]); + if (error) + return "filteredAttributes." + error; + } + } + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.asDouble != null && message.hasOwnProperty("asDouble")) { + properties.value = 1; + if (typeof message.asDouble !== "number") + return "asDouble: number expected"; + } + if (message.asInt != null && message.hasOwnProperty("asInt")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.asInt) && !(message.asInt && $util.isInteger(message.asInt.low) && $util.isInteger(message.asInt.high))) + return "asInt: integer|Long expected"; + } + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) + return "spanId: buffer expected"; + if (message.traceId != null && message.hasOwnProperty("traceId")) + if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) + return "traceId: buffer expected"; + return null; + }; + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar + */ + Exemplar.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Exemplar) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Exemplar(); + if (object.filteredAttributes) { + if (!Array.isArray(object.filteredAttributes)) + throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected"); + message.filteredAttributes = []; + for (var i = 0; i < object.filteredAttributes.length; ++i) { + if (typeof object.filteredAttributes[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected"); + message.filteredAttributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.filteredAttributes[i]); + } + } + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.asDouble != null) + message.asDouble = Number(object.asDouble); + if (object.asInt != null) + if ($util.Long) + (message.asInt = $util.Long.fromValue(object.asInt)).unsigned = false; + else if (typeof object.asInt === "string") + message.asInt = parseInt(object.asInt, 10); + else if (typeof object.asInt === "number") + message.asInt = object.asInt; + else if (typeof object.asInt === "object") + message.asInt = new $util.LongBits(object.asInt.low >>> 0, object.asInt.high >>> 0).toNumber(); + if (object.spanId != null) + if (typeof object.spanId === "string") + $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); + else if (object.spanId.length >= 0) + message.spanId = object.spanId; + if (object.traceId != null) + if (typeof object.traceId === "string") + $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); + else if (object.traceId.length >= 0) + message.traceId = object.traceId; + return message; + }; + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {opentelemetry.proto.metrics.v1.Exemplar} message Exemplar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exemplar.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filteredAttributes = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.spanId = ""; + else { + object.spanId = []; + if (options.bytes !== Array) + object.spanId = $util.newBuffer(object.spanId); + } + if (options.bytes === String) + object.traceId = ""; + else { + object.traceId = []; + if (options.bytes !== Array) + object.traceId = $util.newBuffer(object.traceId); + } + } + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.asDouble != null && message.hasOwnProperty("asDouble")) { + object.asDouble = options.json && !isFinite(message.asDouble) ? String(message.asDouble) : message.asDouble; + if (options.oneofs) + object.value = "asDouble"; + } + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; + if (message.traceId != null && message.hasOwnProperty("traceId")) + object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; + if (message.asInt != null && message.hasOwnProperty("asInt")) { + if (typeof message.asInt === "number") + object.asInt = options.longs === String ? String(message.asInt) : message.asInt; + else + object.asInt = options.longs === String ? $util.Long.prototype.toString.call(message.asInt) : options.longs === Number ? new $util.LongBits(message.asInt.low >>> 0, message.asInt.high >>> 0).toNumber() : message.asInt; + if (options.oneofs) + object.value = "asInt"; + } + if (message.filteredAttributes && message.filteredAttributes.length) { + object.filteredAttributes = []; + for (var j = 0; j < message.filteredAttributes.length; ++j) + object.filteredAttributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.filteredAttributes[j], options); + } + return object; + }; + /** + * Converts this Exemplar to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + * @returns {Object.} JSON object + */ + Exemplar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Exemplar + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Exemplar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Exemplar"; + }; + return Exemplar; + })(); + return v1; + })(); + return metrics; + })(); + proto.logs = (function () { + /** + * Namespace logs. + * @memberof opentelemetry.proto + * @namespace + */ + var logs = {}; + logs.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.logs + * @namespace + */ + var v1 = {}; + v1.LogsData = (function () { + /** + * Properties of a LogsData. + * @memberof opentelemetry.proto.logs.v1 + * @interface ILogsData + * @property {Array.|null} [resourceLogs] LogsData resourceLogs + */ + /** + * Constructs a new LogsData. + * @memberof opentelemetry.proto.logs.v1 + * @classdesc Represents a LogsData. + * @implements ILogsData + * @constructor + * @param {opentelemetry.proto.logs.v1.ILogsData=} [properties] Properties to set + */ + function LogsData(properties) { + this.resourceLogs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * LogsData resourceLogs. + * @member {Array.} resourceLogs + * @memberof opentelemetry.proto.logs.v1.LogsData + * @instance + */ + LogsData.prototype.resourceLogs = $util.emptyArray; + /** + * Creates a new LogsData instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {opentelemetry.proto.logs.v1.ILogsData=} [properties] Properties to set + * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData instance + */ + LogsData.create = function create(properties) { + return new LogsData(properties); + }; + /** + * Encodes the specified LogsData message. Does not implicitly {@link opentelemetry.proto.logs.v1.LogsData.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {opentelemetry.proto.logs.v1.ILogsData} message LogsData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogsData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceLogs != null && message.resourceLogs.length) + for (var i = 0; i < message.resourceLogs.length; ++i) + $root.opentelemetry.proto.logs.v1.ResourceLogs.encode(message.resourceLogs[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified LogsData message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.LogsData.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {opentelemetry.proto.logs.v1.ILogsData} message LogsData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogsData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a LogsData message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogsData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.LogsData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceLogs && message.resourceLogs.length)) + message.resourceLogs = []; + message.resourceLogs.push($root.opentelemetry.proto.logs.v1.ResourceLogs.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a LogsData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogsData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a LogsData message. + * @function verify + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogsData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceLogs != null && message.hasOwnProperty("resourceLogs")) { + if (!Array.isArray(message.resourceLogs)) + return "resourceLogs: array expected"; + for (var i = 0; i < message.resourceLogs.length; ++i) { + var error = $root.opentelemetry.proto.logs.v1.ResourceLogs.verify(message.resourceLogs[i]); + if (error) + return "resourceLogs." + error; + } + } + return null; + }; + /** + * Creates a LogsData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData + */ + LogsData.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.logs.v1.LogsData) + return object; + var message = new $root.opentelemetry.proto.logs.v1.LogsData(); + if (object.resourceLogs) { + if (!Array.isArray(object.resourceLogs)) + throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected"); + message.resourceLogs = []; + for (var i = 0; i < object.resourceLogs.length; ++i) { + if (typeof object.resourceLogs[i] !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected"); + message.resourceLogs[i] = $root.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(object.resourceLogs[i]); + } + } + return message; + }; + /** + * Creates a plain object from a LogsData message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {opentelemetry.proto.logs.v1.LogsData} message LogsData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogsData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceLogs = []; + if (message.resourceLogs && message.resourceLogs.length) { + object.resourceLogs = []; + for (var j = 0; j < message.resourceLogs.length; ++j) + object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j], options); + } + return object; + }; + /** + * Converts this LogsData to JSON. + * @function toJSON + * @memberof opentelemetry.proto.logs.v1.LogsData + * @instance + * @returns {Object.} JSON object + */ + LogsData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for LogsData + * @function getTypeUrl + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.logs.v1.LogsData"; + }; + return LogsData; + })(); + v1.ResourceLogs = (function () { + /** + * Properties of a ResourceLogs. + * @memberof opentelemetry.proto.logs.v1 + * @interface IResourceLogs + * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceLogs resource + * @property {Array.|null} [scopeLogs] ResourceLogs scopeLogs + * @property {string|null} [schemaUrl] ResourceLogs schemaUrl + */ + /** + * Constructs a new ResourceLogs. + * @memberof opentelemetry.proto.logs.v1 + * @classdesc Represents a ResourceLogs. + * @implements IResourceLogs + * @constructor + * @param {opentelemetry.proto.logs.v1.IResourceLogs=} [properties] Properties to set + */ + function ResourceLogs(properties) { + this.scopeLogs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ResourceLogs resource. + * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @instance + */ + ResourceLogs.prototype.resource = null; + /** + * ResourceLogs scopeLogs. + * @member {Array.} scopeLogs + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @instance + */ + ResourceLogs.prototype.scopeLogs = $util.emptyArray; + /** + * ResourceLogs schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @instance + */ + ResourceLogs.prototype.schemaUrl = null; + /** + * Creates a new ResourceLogs instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {opentelemetry.proto.logs.v1.IResourceLogs=} [properties] Properties to set + * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs instance + */ + ResourceLogs.create = function create(properties) { + return new ResourceLogs(properties); + }; + /** + * Encodes the specified ResourceLogs message. Does not implicitly {@link opentelemetry.proto.logs.v1.ResourceLogs.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {opentelemetry.proto.logs.v1.IResourceLogs} message ResourceLogs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLogs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.scopeLogs != null && message.scopeLogs.length) + for (var i = 0; i < message.scopeLogs.length; ++i) + $root.opentelemetry.proto.logs.v1.ScopeLogs.encode(message.scopeLogs[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ResourceLogs message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.ResourceLogs.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {opentelemetry.proto.logs.v1.IResourceLogs} message ResourceLogs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLogs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ResourceLogs message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLogs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.ResourceLogs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.scopeLogs && message.scopeLogs.length)) + message.scopeLogs = []; + message.scopeLogs.push($root.opentelemetry.proto.logs.v1.ScopeLogs.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ResourceLogs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLogs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ResourceLogs message. + * @function verify + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceLogs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.scopeLogs != null && message.hasOwnProperty("scopeLogs")) { + if (!Array.isArray(message.scopeLogs)) + return "scopeLogs: array expected"; + for (var i = 0; i < message.scopeLogs.length; ++i) { + var error = $root.opentelemetry.proto.logs.v1.ScopeLogs.verify(message.scopeLogs[i]); + if (error) + return "scopeLogs." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ResourceLogs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs + */ + ResourceLogs.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.logs.v1.ResourceLogs) + return object; + var message = new $root.opentelemetry.proto.logs.v1.ResourceLogs(); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected"); + message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource); + } + if (object.scopeLogs) { + if (!Array.isArray(object.scopeLogs)) + throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected"); + message.scopeLogs = []; + for (var i = 0; i < object.scopeLogs.length; ++i) { + if (typeof object.scopeLogs[i] !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected"); + message.scopeLogs[i] = $root.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(object.scopeLogs[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ResourceLogs message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {opentelemetry.proto.logs.v1.ResourceLogs} message ResourceLogs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceLogs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopeLogs = []; + if (options.defaults) { + object.resource = null; + object.schemaUrl = ""; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options); + if (message.scopeLogs && message.scopeLogs.length) { + object.scopeLogs = []; + for (var j = 0; j < message.scopeLogs.length; ++j) + object.scopeLogs[j] = $root.opentelemetry.proto.logs.v1.ScopeLogs.toObject(message.scopeLogs[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ResourceLogs to JSON. + * @function toJSON + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @instance + * @returns {Object.} JSON object + */ + ResourceLogs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ResourceLogs + * @function getTypeUrl + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceLogs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.logs.v1.ResourceLogs"; + }; + return ResourceLogs; + })(); + v1.ScopeLogs = (function () { + /** + * Properties of a ScopeLogs. + * @memberof opentelemetry.proto.logs.v1 + * @interface IScopeLogs + * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeLogs scope + * @property {Array.|null} [logRecords] ScopeLogs logRecords + * @property {string|null} [schemaUrl] ScopeLogs schemaUrl + */ + /** + * Constructs a new ScopeLogs. + * @memberof opentelemetry.proto.logs.v1 + * @classdesc Represents a ScopeLogs. + * @implements IScopeLogs + * @constructor + * @param {opentelemetry.proto.logs.v1.IScopeLogs=} [properties] Properties to set + */ + function ScopeLogs(properties) { + this.logRecords = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ScopeLogs scope. + * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @instance + */ + ScopeLogs.prototype.scope = null; + /** + * ScopeLogs logRecords. + * @member {Array.} logRecords + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @instance + */ + ScopeLogs.prototype.logRecords = $util.emptyArray; + /** + * ScopeLogs schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @instance + */ + ScopeLogs.prototype.schemaUrl = null; + /** + * Creates a new ScopeLogs instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {opentelemetry.proto.logs.v1.IScopeLogs=} [properties] Properties to set + * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs instance + */ + ScopeLogs.create = function create(properties) { + return new ScopeLogs(properties); + }; + /** + * Encodes the specified ScopeLogs message. Does not implicitly {@link opentelemetry.proto.logs.v1.ScopeLogs.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {opentelemetry.proto.logs.v1.IScopeLogs} message ScopeLogs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeLogs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.logRecords != null && message.logRecords.length) + for (var i = 0; i < message.logRecords.length; ++i) + $root.opentelemetry.proto.logs.v1.LogRecord.encode(message.logRecords[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ScopeLogs message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.ScopeLogs.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {opentelemetry.proto.logs.v1.IScopeLogs} message ScopeLogs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeLogs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ScopeLogs message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeLogs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.ScopeLogs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.logRecords && message.logRecords.length)) + message.logRecords = []; + message.logRecords.push($root.opentelemetry.proto.logs.v1.LogRecord.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ScopeLogs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeLogs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ScopeLogs message. + * @function verify + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScopeLogs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope); + if (error) + return "scope." + error; + } + if (message.logRecords != null && message.hasOwnProperty("logRecords")) { + if (!Array.isArray(message.logRecords)) + return "logRecords: array expected"; + for (var i = 0; i < message.logRecords.length; ++i) { + var error = $root.opentelemetry.proto.logs.v1.LogRecord.verify(message.logRecords[i]); + if (error) + return "logRecords." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ScopeLogs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs + */ + ScopeLogs.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.logs.v1.ScopeLogs) + return object; + var message = new $root.opentelemetry.proto.logs.v1.ScopeLogs(); + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected"); + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope); + } + if (object.logRecords) { + if (!Array.isArray(object.logRecords)) + throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected"); + message.logRecords = []; + for (var i = 0; i < object.logRecords.length; ++i) { + if (typeof object.logRecords[i] !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected"); + message.logRecords[i] = $root.opentelemetry.proto.logs.v1.LogRecord.fromObject(object.logRecords[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ScopeLogs message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {opentelemetry.proto.logs.v1.ScopeLogs} message ScopeLogs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScopeLogs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.logRecords = []; + if (options.defaults) { + object.scope = null; + object.schemaUrl = ""; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options); + if (message.logRecords && message.logRecords.length) { + object.logRecords = []; + for (var j = 0; j < message.logRecords.length; ++j) + object.logRecords[j] = $root.opentelemetry.proto.logs.v1.LogRecord.toObject(message.logRecords[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ScopeLogs to JSON. + * @function toJSON + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @instance + * @returns {Object.} JSON object + */ + ScopeLogs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ScopeLogs + * @function getTypeUrl + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScopeLogs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.logs.v1.ScopeLogs"; + }; + return ScopeLogs; + })(); + /** + * SeverityNumber enum. + * @name opentelemetry.proto.logs.v1.SeverityNumber + * @enum {number} + * @property {number} SEVERITY_NUMBER_UNSPECIFIED=0 SEVERITY_NUMBER_UNSPECIFIED value + * @property {number} SEVERITY_NUMBER_TRACE=1 SEVERITY_NUMBER_TRACE value + * @property {number} SEVERITY_NUMBER_TRACE2=2 SEVERITY_NUMBER_TRACE2 value + * @property {number} SEVERITY_NUMBER_TRACE3=3 SEVERITY_NUMBER_TRACE3 value + * @property {number} SEVERITY_NUMBER_TRACE4=4 SEVERITY_NUMBER_TRACE4 value + * @property {number} SEVERITY_NUMBER_DEBUG=5 SEVERITY_NUMBER_DEBUG value + * @property {number} SEVERITY_NUMBER_DEBUG2=6 SEVERITY_NUMBER_DEBUG2 value + * @property {number} SEVERITY_NUMBER_DEBUG3=7 SEVERITY_NUMBER_DEBUG3 value + * @property {number} SEVERITY_NUMBER_DEBUG4=8 SEVERITY_NUMBER_DEBUG4 value + * @property {number} SEVERITY_NUMBER_INFO=9 SEVERITY_NUMBER_INFO value + * @property {number} SEVERITY_NUMBER_INFO2=10 SEVERITY_NUMBER_INFO2 value + * @property {number} SEVERITY_NUMBER_INFO3=11 SEVERITY_NUMBER_INFO3 value + * @property {number} SEVERITY_NUMBER_INFO4=12 SEVERITY_NUMBER_INFO4 value + * @property {number} SEVERITY_NUMBER_WARN=13 SEVERITY_NUMBER_WARN value + * @property {number} SEVERITY_NUMBER_WARN2=14 SEVERITY_NUMBER_WARN2 value + * @property {number} SEVERITY_NUMBER_WARN3=15 SEVERITY_NUMBER_WARN3 value + * @property {number} SEVERITY_NUMBER_WARN4=16 SEVERITY_NUMBER_WARN4 value + * @property {number} SEVERITY_NUMBER_ERROR=17 SEVERITY_NUMBER_ERROR value + * @property {number} SEVERITY_NUMBER_ERROR2=18 SEVERITY_NUMBER_ERROR2 value + * @property {number} SEVERITY_NUMBER_ERROR3=19 SEVERITY_NUMBER_ERROR3 value + * @property {number} SEVERITY_NUMBER_ERROR4=20 SEVERITY_NUMBER_ERROR4 value + * @property {number} SEVERITY_NUMBER_FATAL=21 SEVERITY_NUMBER_FATAL value + * @property {number} SEVERITY_NUMBER_FATAL2=22 SEVERITY_NUMBER_FATAL2 value + * @property {number} SEVERITY_NUMBER_FATAL3=23 SEVERITY_NUMBER_FATAL3 value + * @property {number} SEVERITY_NUMBER_FATAL4=24 SEVERITY_NUMBER_FATAL4 value + */ + v1.SeverityNumber = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_NUMBER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SEVERITY_NUMBER_TRACE"] = 1; + values[valuesById[2] = "SEVERITY_NUMBER_TRACE2"] = 2; + values[valuesById[3] = "SEVERITY_NUMBER_TRACE3"] = 3; + values[valuesById[4] = "SEVERITY_NUMBER_TRACE4"] = 4; + values[valuesById[5] = "SEVERITY_NUMBER_DEBUG"] = 5; + values[valuesById[6] = "SEVERITY_NUMBER_DEBUG2"] = 6; + values[valuesById[7] = "SEVERITY_NUMBER_DEBUG3"] = 7; + values[valuesById[8] = "SEVERITY_NUMBER_DEBUG4"] = 8; + values[valuesById[9] = "SEVERITY_NUMBER_INFO"] = 9; + values[valuesById[10] = "SEVERITY_NUMBER_INFO2"] = 10; + values[valuesById[11] = "SEVERITY_NUMBER_INFO3"] = 11; + values[valuesById[12] = "SEVERITY_NUMBER_INFO4"] = 12; + values[valuesById[13] = "SEVERITY_NUMBER_WARN"] = 13; + values[valuesById[14] = "SEVERITY_NUMBER_WARN2"] = 14; + values[valuesById[15] = "SEVERITY_NUMBER_WARN3"] = 15; + values[valuesById[16] = "SEVERITY_NUMBER_WARN4"] = 16; + values[valuesById[17] = "SEVERITY_NUMBER_ERROR"] = 17; + values[valuesById[18] = "SEVERITY_NUMBER_ERROR2"] = 18; + values[valuesById[19] = "SEVERITY_NUMBER_ERROR3"] = 19; + values[valuesById[20] = "SEVERITY_NUMBER_ERROR4"] = 20; + values[valuesById[21] = "SEVERITY_NUMBER_FATAL"] = 21; + values[valuesById[22] = "SEVERITY_NUMBER_FATAL2"] = 22; + values[valuesById[23] = "SEVERITY_NUMBER_FATAL3"] = 23; + values[valuesById[24] = "SEVERITY_NUMBER_FATAL4"] = 24; + return values; + })(); + /** + * LogRecordFlags enum. + * @name opentelemetry.proto.logs.v1.LogRecordFlags + * @enum {number} + * @property {number} LOG_RECORD_FLAGS_DO_NOT_USE=0 LOG_RECORD_FLAGS_DO_NOT_USE value + * @property {number} LOG_RECORD_FLAGS_TRACE_FLAGS_MASK=255 LOG_RECORD_FLAGS_TRACE_FLAGS_MASK value + */ + v1.LogRecordFlags = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_RECORD_FLAGS_DO_NOT_USE"] = 0; + values[valuesById[255] = "LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"] = 255; + return values; + })(); + v1.LogRecord = (function () { + /** + * Properties of a LogRecord. + * @memberof opentelemetry.proto.logs.v1 + * @interface ILogRecord + * @property {number|Long|null} [timeUnixNano] LogRecord timeUnixNano + * @property {number|Long|null} [observedTimeUnixNano] LogRecord observedTimeUnixNano + * @property {opentelemetry.proto.logs.v1.SeverityNumber|null} [severityNumber] LogRecord severityNumber + * @property {string|null} [severityText] LogRecord severityText + * @property {opentelemetry.proto.common.v1.IAnyValue|null} [body] LogRecord body + * @property {Array.|null} [attributes] LogRecord attributes + * @property {number|null} [droppedAttributesCount] LogRecord droppedAttributesCount + * @property {number|null} [flags] LogRecord flags + * @property {Uint8Array|null} [traceId] LogRecord traceId + * @property {Uint8Array|null} [spanId] LogRecord spanId + */ + /** + * Constructs a new LogRecord. + * @memberof opentelemetry.proto.logs.v1 + * @classdesc Represents a LogRecord. + * @implements ILogRecord + * @constructor + * @param {opentelemetry.proto.logs.v1.ILogRecord=} [properties] Properties to set + */ + function LogRecord(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * LogRecord timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.timeUnixNano = null; + /** + * LogRecord observedTimeUnixNano. + * @member {number|Long|null|undefined} observedTimeUnixNano + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.observedTimeUnixNano = null; + /** + * LogRecord severityNumber. + * @member {opentelemetry.proto.logs.v1.SeverityNumber|null|undefined} severityNumber + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.severityNumber = null; + /** + * LogRecord severityText. + * @member {string|null|undefined} severityText + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.severityText = null; + /** + * LogRecord body. + * @member {opentelemetry.proto.common.v1.IAnyValue|null|undefined} body + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.body = null; + /** + * LogRecord attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.attributes = $util.emptyArray; + /** + * LogRecord droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.droppedAttributesCount = null; + /** + * LogRecord flags. + * @member {number|null|undefined} flags + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.flags = null; + /** + * LogRecord traceId. + * @member {Uint8Array|null|undefined} traceId + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.traceId = null; + /** + * LogRecord spanId. + * @member {Uint8Array|null|undefined} spanId + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.spanId = null; + /** + * Creates a new LogRecord instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {opentelemetry.proto.logs.v1.ILogRecord=} [properties] Properties to set + * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord instance + */ + LogRecord.create = function create(properties) { + return new LogRecord(properties); + }; + /** + * Encodes the specified LogRecord message. Does not implicitly {@link opentelemetry.proto.logs.v1.LogRecord.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {opentelemetry.proto.logs.v1.ILogRecord} message LogRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 1, wireType 1 =*/ 9).fixed64(message.timeUnixNano); + if (message.severityNumber != null && Object.hasOwnProperty.call(message, "severityNumber")) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.severityNumber); + if (message.severityText != null && Object.hasOwnProperty.call(message, "severityText")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.severityText); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.opentelemetry.proto.common.v1.AnyValue.encode(message.body, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 7, wireType 0 =*/ 56).uint32(message.droppedAttributesCount); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 8, wireType 5 =*/ 69).fixed32(message.flags); + if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) + writer.uint32(/* id 9, wireType 2 =*/ 74).bytes(message.traceId); + if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) + writer.uint32(/* id 10, wireType 2 =*/ 82).bytes(message.spanId); + if (message.observedTimeUnixNano != null && Object.hasOwnProperty.call(message, "observedTimeUnixNano")) + writer.uint32(/* id 11, wireType 1 =*/ 89).fixed64(message.observedTimeUnixNano); + return writer; + }; + /** + * Encodes the specified LogRecord message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.LogRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {opentelemetry.proto.logs.v1.ILogRecord} message LogRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a LogRecord message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.LogRecord(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 11: { + message.observedTimeUnixNano = reader.fixed64(); + break; + } + case 2: { + message.severityNumber = reader.int32(); + break; + } + case 3: { + message.severityText = reader.string(); + break; + } + case 5: { + message.body = $root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 7: { + message.droppedAttributesCount = reader.uint32(); + break; + } + case 8: { + message.flags = reader.fixed32(); + break; + } + case 9: { + message.traceId = reader.bytes(); + break; + } + case 10: { + message.spanId = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a LogRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a LogRecord message. + * @function verify + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.observedTimeUnixNano != null && message.hasOwnProperty("observedTimeUnixNano")) + if (!$util.isInteger(message.observedTimeUnixNano) && !(message.observedTimeUnixNano && $util.isInteger(message.observedTimeUnixNano.low) && $util.isInteger(message.observedTimeUnixNano.high))) + return "observedTimeUnixNano: integer|Long expected"; + if (message.severityNumber != null && message.hasOwnProperty("severityNumber")) + switch (message.severityNumber) { + default: + return "severityNumber: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + break; + } + if (message.severityText != null && message.hasOwnProperty("severityText")) + if (!$util.isString(message.severityText)) + return "severityText: string expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.body); + if (error) + return "body." + error; + } + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + if (message.traceId != null && message.hasOwnProperty("traceId")) + if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) + return "traceId: buffer expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) + return "spanId: buffer expected"; + return null; + }; + /** + * Creates a LogRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord + */ + LogRecord.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.logs.v1.LogRecord) + return object; + var message = new $root.opentelemetry.proto.logs.v1.LogRecord(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.observedTimeUnixNano != null) + if ($util.Long) + (message.observedTimeUnixNano = $util.Long.fromValue(object.observedTimeUnixNano)).unsigned = false; + else if (typeof object.observedTimeUnixNano === "string") + message.observedTimeUnixNano = parseInt(object.observedTimeUnixNano, 10); + else if (typeof object.observedTimeUnixNano === "number") + message.observedTimeUnixNano = object.observedTimeUnixNano; + else if (typeof object.observedTimeUnixNano === "object") + message.observedTimeUnixNano = new $util.LongBits(object.observedTimeUnixNano.low >>> 0, object.observedTimeUnixNano.high >>> 0).toNumber(); + switch (object.severityNumber) { + default: + if (typeof object.severityNumber === "number") { + message.severityNumber = object.severityNumber; + break; + } + break; + case "SEVERITY_NUMBER_UNSPECIFIED": + case 0: + message.severityNumber = 0; + break; + case "SEVERITY_NUMBER_TRACE": + case 1: + message.severityNumber = 1; + break; + case "SEVERITY_NUMBER_TRACE2": + case 2: + message.severityNumber = 2; + break; + case "SEVERITY_NUMBER_TRACE3": + case 3: + message.severityNumber = 3; + break; + case "SEVERITY_NUMBER_TRACE4": + case 4: + message.severityNumber = 4; + break; + case "SEVERITY_NUMBER_DEBUG": + case 5: + message.severityNumber = 5; + break; + case "SEVERITY_NUMBER_DEBUG2": + case 6: + message.severityNumber = 6; + break; + case "SEVERITY_NUMBER_DEBUG3": + case 7: + message.severityNumber = 7; + break; + case "SEVERITY_NUMBER_DEBUG4": + case 8: + message.severityNumber = 8; + break; + case "SEVERITY_NUMBER_INFO": + case 9: + message.severityNumber = 9; + break; + case "SEVERITY_NUMBER_INFO2": + case 10: + message.severityNumber = 10; + break; + case "SEVERITY_NUMBER_INFO3": + case 11: + message.severityNumber = 11; + break; + case "SEVERITY_NUMBER_INFO4": + case 12: + message.severityNumber = 12; + break; + case "SEVERITY_NUMBER_WARN": + case 13: + message.severityNumber = 13; + break; + case "SEVERITY_NUMBER_WARN2": + case 14: + message.severityNumber = 14; + break; + case "SEVERITY_NUMBER_WARN3": + case 15: + message.severityNumber = 15; + break; + case "SEVERITY_NUMBER_WARN4": + case 16: + message.severityNumber = 16; + break; + case "SEVERITY_NUMBER_ERROR": + case 17: + message.severityNumber = 17; + break; + case "SEVERITY_NUMBER_ERROR2": + case 18: + message.severityNumber = 18; + break; + case "SEVERITY_NUMBER_ERROR3": + case 19: + message.severityNumber = 19; + break; + case "SEVERITY_NUMBER_ERROR4": + case 20: + message.severityNumber = 20; + break; + case "SEVERITY_NUMBER_FATAL": + case 21: + message.severityNumber = 21; + break; + case "SEVERITY_NUMBER_FATAL2": + case 22: + message.severityNumber = 22; + break; + case "SEVERITY_NUMBER_FATAL3": + case 23: + message.severityNumber = 23; + break; + case "SEVERITY_NUMBER_FATAL4": + case 24: + message.severityNumber = 24; + break; + } + if (object.severityText != null) + message.severityText = String(object.severityText); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected"); + message.body = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.body); + } + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + if (object.flags != null) + message.flags = object.flags >>> 0; + if (object.traceId != null) + if (typeof object.traceId === "string") + $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); + else if (object.traceId.length >= 0) + message.traceId = object.traceId; + if (object.spanId != null) + if (typeof object.spanId === "string") + $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); + else if (object.spanId.length >= 0) + message.spanId = object.spanId; + return message; + }; + /** + * Creates a plain object from a LogRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {opentelemetry.proto.logs.v1.LogRecord} message LogRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + object.severityNumber = options.enums === String ? "SEVERITY_NUMBER_UNSPECIFIED" : 0; + object.severityText = ""; + object.body = null; + object.droppedAttributesCount = 0; + object.flags = 0; + if (options.bytes === String) + object.traceId = ""; + else { + object.traceId = []; + if (options.bytes !== Array) + object.traceId = $util.newBuffer(object.traceId); + } + if (options.bytes === String) + object.spanId = ""; + else { + object.spanId = []; + if (options.bytes !== Array) + object.spanId = $util.newBuffer(object.spanId); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.observedTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.observedTimeUnixNano = options.longs === String ? "0" : 0; + } + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.severityNumber != null && message.hasOwnProperty("severityNumber")) + object.severityNumber = options.enums === String ? $root.opentelemetry.proto.logs.v1.SeverityNumber[message.severityNumber] === undefined ? message.severityNumber : $root.opentelemetry.proto.logs.v1.SeverityNumber[message.severityNumber] : message.severityNumber; + if (message.severityText != null && message.hasOwnProperty("severityText")) + object.severityText = message.severityText; + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.body, options); + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + if (message.traceId != null && message.hasOwnProperty("traceId")) + object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; + if (message.observedTimeUnixNano != null && message.hasOwnProperty("observedTimeUnixNano")) + if (typeof message.observedTimeUnixNano === "number") + object.observedTimeUnixNano = options.longs === String ? String(message.observedTimeUnixNano) : message.observedTimeUnixNano; + else + object.observedTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.observedTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.observedTimeUnixNano.low >>> 0, message.observedTimeUnixNano.high >>> 0).toNumber() : message.observedTimeUnixNano; + return object; + }; + /** + * Converts this LogRecord to JSON. + * @function toJSON + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + * @returns {Object.} JSON object + */ + LogRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for LogRecord + * @function getTypeUrl + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.logs.v1.LogRecord"; + }; + return LogRecord; + })(); + return v1; + })(); + return logs; + })(); + return proto; + })(); + return opentelemetry; +})(); +module.exports = $root; +//# sourceMappingURL=root.js.map /***/ }), -/***/ 32162: +/***/ 2418: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -52802,208 +42906,111 @@ exports.unrefTimer = unrefTimer; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CompositePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -/** Combines multiple propagators into a single propagator. */ -class CompositePropagator { - /** - * Construct a composite propagator from a list of propagators. - * - * @param [config] Configuration object for composite propagator - */ - constructor(config = {}) { - var _a; - this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : []; - this._fields = Array.from(new Set(this._propagators - // older propagators may not have fields function, null check to be sure - .map(p => (typeof p.fields === 'function' ? p.fields() : [])) - .reduce((x, y) => x.concat(y), []))); +exports.GrpcExporterTransport = exports.createEmptyMetadata = exports.createSslCredentials = exports.createInsecureCredentials = void 0; +// values taken from '@grpc/grpc-js` so that we don't need to require/import it. +const GRPC_COMPRESSION_NONE = 0; +const GRPC_COMPRESSION_GZIP = 2; +function toGrpcCompression(compression) { + return compression === 'gzip' ? GRPC_COMPRESSION_GZIP : GRPC_COMPRESSION_NONE; +} +function createInsecureCredentials() { + // Lazy-load so that we don't need to require/import '@grpc/grpc-js' before it can be wrapped by instrumentation. + const { credentials, + // eslint-disable-next-line @typescript-eslint/no-var-requires + } = __nccwpck_require__(7025); + return credentials.createInsecure(); +} +exports.createInsecureCredentials = createInsecureCredentials; +function createSslCredentials(rootCert, privateKey, certChain) { + // Lazy-load so that we don't need to require/import '@grpc/grpc-js' before it can be wrapped by instrumentation. + const { credentials, + // eslint-disable-next-line @typescript-eslint/no-var-requires + } = __nccwpck_require__(7025); + return credentials.createSsl(rootCert, privateKey, certChain); +} +exports.createSslCredentials = createSslCredentials; +function createEmptyMetadata() { + // Lazy-load so that we don't need to require/import '@grpc/grpc-js' before it can be wrapped by instrumentation. + const { Metadata, + // eslint-disable-next-line @typescript-eslint/no-var-requires + } = __nccwpck_require__(7025); + return new Metadata(); +} +exports.createEmptyMetadata = createEmptyMetadata; +class GrpcExporterTransport { + constructor(_parameters) { + this._parameters = _parameters; } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same carrier key, the propagator later in the list - * will "win". - * - * @param context Context to inject - * @param carrier Carrier into which context will be injected - */ - inject(context, carrier, setter) { - for (const propagator of this._propagators) { + shutdown() { + var _a; + (_a = this._client) === null || _a === void 0 ? void 0 : _a.close(); + } + send(data) { + // We need to make a for gRPC + const buffer = Buffer.from(data); + if (this._client == null) { + // Lazy require to ensure that grpc is not loaded before instrumentations can wrap it + const { createServiceClientConstructor, + // eslint-disable-next-line @typescript-eslint/no-var-requires + } = __nccwpck_require__(55525); try { - propagator.inject(context, carrier, setter); + this._metadata = this._parameters.metadata(); } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); + catch (error) { + return Promise.resolve({ + status: 'failure', + error: error, + }); } - } - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same context key, the propagator later in the list - * will "win". - * - * @param context Context to add values to - * @param carrier Carrier from which to extract context - */ - extract(context, carrier, getter) { - return this._propagators.reduce((ctx, propagator) => { + const clientConstructor = createServiceClientConstructor(this._parameters.grpcPath, this._parameters.grpcName); try { - return propagator.extract(ctx, carrier, getter); + this._client = new clientConstructor(this._parameters.address, this._parameters.credentials(), { + 'grpc.default_compression_algorithm': toGrpcCompression(this._parameters.compression), + }); } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); + catch (error) { + return Promise.resolve({ + status: 'failure', + error: error, + }); } - return ctx; - }, context); - } - fields() { - // return a new array so our fields cannot be modified - return this._fields.slice(); - } -} -exports.CompositePropagator = CompositePropagator; -//# sourceMappingURL=composite.js.map - -/***/ }), - -/***/ 27903: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=IdGenerator.js.map - -/***/ }), - -/***/ 54957: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceState = void 0; -const validators_1 = __nccwpck_require__(83061); -const MAX_TRACE_STATE_ITEMS = 32; -const MAX_TRACE_STATE_LEN = 512; -const LIST_MEMBERS_SEPARATOR = ','; -const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; -/** - * TraceState must be a class and not a simple object type because of the spec - * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). - * - * Here is the list of allowed mutations: - * - New key-value pair should be added into the beginning of the list - * - The value of any key can be updated. Modified keys MUST be moved to the - * beginning of the list. - */ -class TraceState { - constructor(rawTraceState) { - this._internalState = new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - set(key, value) { - // TODO: Benchmark the different approaches(map vs list) and - // use the faster one. - const traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); } - traceState._internalState.set(key, value); - return traceState; - } - unset(key) { - const traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - } - get(key) { - return this._internalState.get(key); - } - serialize() { - return this._keys() - .reduce((agg, key) => { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); - return agg; - }, []) - .join(LIST_MEMBERS_SEPARATOR); - } - _parse(rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN) - return; - this._internalState = rawTraceState - .split(LIST_MEMBERS_SEPARATOR) - .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning - .reduce((agg, part) => { - const listMember = part.trim(); // Optional Whitespace (OWS) handling - const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); - if (i !== -1) { - const key = listMember.slice(0, i); - const value = listMember.slice(i + 1, part.length); - if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) { - agg.set(key, value); + return new Promise(resolve => { + // this will always be defined + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const deadline = Date.now() + this._parameters.timeoutMillis; + // this should never happen + if (this._metadata == null) { + return resolve({ + error: new Error('metadata was null'), + status: 'failure', + }); + } + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore The gRPC client constructor is created on runtime, so we don't have any types for the resulting client. + this._client.export(buffer, this._metadata, { deadline: deadline }, (err, response) => { + if (err) { + resolve({ + status: 'failure', + error: err, + }); } else { - // TODO: Consider to add warning log + resolve({ + data: response, + status: 'success', + }); } - } - return agg; - }, new Map()); - // Because of the reverse() requirement, trunc must be done after map is created - if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { - this._internalState = new Map(Array.from(this._internalState.entries()) - .reverse() // Use reverse same as original tracestate parse chain - .slice(0, MAX_TRACE_STATE_ITEMS)); - } - } - _keys() { - return Array.from(this._internalState.keys()).reverse(); - } - _clone() { - const traceState = new TraceState(); - traceState._internalState = new Map(this._internalState); - return traceState; + }); + }); } } -exports.TraceState = TraceState; -//# sourceMappingURL=TraceState.js.map +exports.GrpcExporterTransport = GrpcExporterTransport; +//# sourceMappingURL=grpc-exporter-transport.js.map /***/ }), -/***/ 23620: +/***/ 75452: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -53024,97 +43031,21 @@ exports.TraceState = TraceState; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(68972); -const TraceState_1 = __nccwpck_require__(54957); -exports.TRACE_PARENT_HEADER = 'traceparent'; -exports.TRACE_STATE_HEADER = 'tracestate'; -const VERSION = '00'; -const VERSION_PART = '(?!ff)[\\da-f]{2}'; -const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}'; -const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}'; -const FLAGS_PART = '[\\da-f]{2}'; -const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`); -/** - * Parses information from the [traceparent] span tag and converts it into {@link SpanContext} - * @param traceParent - A meta property that comes from server. - * It should be dynamically generated server side to have the server's request trace Id, - * a parent span Id that was set on the server's request span, - * and the trace flags to indicate the server's sampling decision - * (01 = sampled, 00 = not sampled). - * for example: '{version}-{traceId}-{spanId}-{sampleDecision}' - * For more information see {@link https://www.w3.org/TR/trace-context/} - */ -function parseTraceParent(traceParent) { - const match = TRACE_PARENT_REGEX.exec(traceParent); - if (!match) - return null; - // According to the specification the implementation should be compatible - // with future versions. If there are more parts, we only reject it if it's using version 00 - // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent - if (match[1] === '00' && match[5]) - return null; - return { - traceId: match[2], - spanId: match[3], - traceFlags: parseInt(match[4], 16), - }; -} -exports.parseTraceParent = parseTraceParent; -/** - * Propagates {@link SpanContext} through Trace Context format propagation. - * - * Based on the Trace Context specification: - * https://www.w3.org/TR/trace-context/ - */ -class W3CTraceContextPropagator { - inject(context, carrier, setter) { - const spanContext = api_1.trace.getSpanContext(context); - if (!spanContext || - (0, suppress_tracing_1.isTracingSuppressed)(context) || - !(0, api_1.isSpanContextValid)(spanContext)) - return; - const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`; - setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent); - if (spanContext.traceState) { - setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize()); - } - } - extract(context, carrier, getter) { - const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER); - if (!traceParentHeader) - return context; - const traceParent = Array.isArray(traceParentHeader) - ? traceParentHeader[0] - : traceParentHeader; - if (typeof traceParent !== 'string') - return context; - const spanContext = parseTraceParent(traceParent); - if (!spanContext) - return context; - spanContext.isRemote = true; - const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER); - if (traceStateHeader) { - // If more than one `tracestate` header is found, we merge them into a - // single header. - const state = Array.isArray(traceStateHeader) - ? traceStateHeader.join(',') - : traceStateHeader; - spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined); - } - return api_1.trace.setSpanContext(context, spanContext); - } - fields() { - return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER]; - } -} -exports.W3CTraceContextPropagator = W3CTraceContextPropagator; -//# sourceMappingURL=W3CTraceContextPropagator.js.map +exports.LogsSerializer = exports.TraceSerializer = exports.MetricsSerializer = exports.validateAndNormalizeUrl = exports.DEFAULT_COLLECTOR_URL = exports.OTLPGRPCExporterNodeBase = void 0; +var OTLPGRPCExporterNodeBase_1 = __nccwpck_require__(5255); +Object.defineProperty(exports, "OTLPGRPCExporterNodeBase", ({ enumerable: true, get: function () { return OTLPGRPCExporterNodeBase_1.OTLPGRPCExporterNodeBase; } })); +var util_1 = __nccwpck_require__(66394); +Object.defineProperty(exports, "DEFAULT_COLLECTOR_URL", ({ enumerable: true, get: function () { return util_1.DEFAULT_COLLECTOR_URL; } })); +Object.defineProperty(exports, "validateAndNormalizeUrl", ({ enumerable: true, get: function () { return util_1.validateAndNormalizeUrl; } })); +var serializers_1 = __nccwpck_require__(53537); +Object.defineProperty(exports, "MetricsSerializer", ({ enumerable: true, get: function () { return serializers_1.MetricsSerializer; } })); +Object.defineProperty(exports, "TraceSerializer", ({ enumerable: true, get: function () { return serializers_1.TraceSerializer; } })); +Object.defineProperty(exports, "LogsSerializer", ({ enumerable: true, get: function () { return serializers_1.LogsSerializer; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 38601: +/***/ 53537: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -53135,30 +43066,49 @@ exports.W3CTraceContextPropagator = W3CTraceContextPropagator; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0; -const api_1 = __nccwpck_require__(65163); -const RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA'); -var RPCType; -(function (RPCType) { - RPCType["HTTP"] = "http"; -})(RPCType = exports.RPCType || (exports.RPCType = {})); -function setRPCMetadata(context, meta) { - return context.setValue(RPC_METADATA_KEY, meta); -} -exports.setRPCMetadata = setRPCMetadata; -function deleteRPCMetadata(context) { - return context.deleteValue(RPC_METADATA_KEY); -} -exports.deleteRPCMetadata = deleteRPCMetadata; -function getRPCMetadata(context) { - return context.getValue(RPC_METADATA_KEY); -} -exports.getRPCMetadata = getRPCMetadata; -//# sourceMappingURL=rpc-metadata.js.map +exports.MetricsSerializer = exports.TraceSerializer = exports.LogsSerializer = void 0; +const root = __nccwpck_require__(75398); +const logsResponseType = root.opentelemetry.proto.collector.logs.v1 + .ExportLogsServiceResponse; +const logsRequestType = root.opentelemetry.proto.collector.logs.v1 + .ExportLogsServiceRequest; +const metricsResponseType = root.opentelemetry.proto.collector.metrics.v1 + .ExportMetricsServiceResponse; +const metricsRequestType = root.opentelemetry.proto.collector.metrics.v1 + .ExportMetricsServiceRequest; +const traceResponseType = root.opentelemetry.proto.collector.trace.v1 + .ExportTraceServiceResponse; +const traceRequestType = root.opentelemetry.proto.collector.trace.v1 + .ExportTraceServiceRequest; +exports.LogsSerializer = { + serializeRequest: (arg) => { + return Buffer.from(logsRequestType.encode(arg).finish()); + }, + deserializeResponse: (arg) => { + return logsResponseType.decode(arg); + }, +}; +exports.TraceSerializer = { + serializeRequest: (arg) => { + return Buffer.from(traceRequestType.encode(arg).finish()); + }, + deserializeResponse: (arg) => { + return traceResponseType.decode(arg); + }, +}; +exports.MetricsSerializer = { + serializeRequest: (arg) => { + return Buffer.from(metricsRequestType.encode(arg).finish()); + }, + deserializeResponse: (arg) => { + return metricsResponseType.decode(arg); + }, +}; +//# sourceMappingURL=serializers.js.map /***/ }), -/***/ 88743: +/***/ 66394: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -53179,240 +43129,12920 @@ exports.getRPCMetadata = getRPCMetadata; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOffSampler = void 0; +exports.configureCompression = exports.getCredentialsFromEnvironment = exports.configureCredentials = exports.validateAndNormalizeUrl = exports.DEFAULT_COLLECTOR_URL = void 0; const api_1 = __nccwpck_require__(65163); -/** Sampler that samples no traces. */ -class AlwaysOffSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.NOT_RECORD, - }; +const core_1 = __nccwpck_require__(89736); +const path = __nccwpck_require__(71017); +const url_1 = __nccwpck_require__(57310); +const fs = __nccwpck_require__(57147); +const otlp_exporter_base_1 = __nccwpck_require__(11363); +const grpc_exporter_transport_1 = __nccwpck_require__(2418); +exports.DEFAULT_COLLECTOR_URL = 'http://localhost:4317'; +function validateAndNormalizeUrl(url) { + var _a; + const hasProtocol = url.match(/^([\w]{1,8}):\/\//); + if (!hasProtocol) { + url = `https://${url}`; } - toString() { - return 'AlwaysOffSampler'; + const target = new url_1.URL(url); + if (target.protocol === 'unix:') { + return url; } -} -exports.AlwaysOffSampler = AlwaysOffSampler; -//# sourceMappingURL=AlwaysOffSampler.js.map - -/***/ }), - -/***/ 41257: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOnSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples all traces. */ -class AlwaysOnSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.RECORD_AND_SAMPLED, - }; + if (target.pathname && target.pathname !== '/') { + api_1.diag.warn('URL path should not be set when using grpc, the path part of the URL will be ignored.'); } - toString() { - return 'AlwaysOnSampler'; + if (target.protocol !== '' && !((_a = target.protocol) === null || _a === void 0 ? void 0 : _a.match(/^(http)s?:$/))) { + api_1.diag.warn('URL protocol should be http(s)://. Using http://.'); } + return target.host; } -exports.AlwaysOnSampler = AlwaysOnSampler; -//# sourceMappingURL=AlwaysOnSampler.js.map - -/***/ }), - -/***/ 62678: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ParentBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -const global_error_handler_1 = __nccwpck_require__(50146); -const AlwaysOffSampler_1 = __nccwpck_require__(88743); -const AlwaysOnSampler_1 = __nccwpck_require__(41257); -/** - * A composite sampler that either respects the parent span's sampling decision - * or delegates to `delegateSampler` for root spans. - */ -class ParentBasedSampler { - constructor(config) { - var _a, _b, _c, _d; - this._root = config.root; - if (!this._root) { - (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured')); - this._root = new AlwaysOnSampler_1.AlwaysOnSampler(); - } - this._remoteParentSampled = - (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._remoteParentNotSampled = - (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler(); - this._localParentSampled = - (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._localParentNotSampled = - (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler(); +exports.validateAndNormalizeUrl = validateAndNormalizeUrl; +function configureCredentials(credentials, endpoint) { + let insecure; + if (credentials) { + return credentials; } - shouldSample(context, traceId, spanName, spanKind, attributes, links) { - const parentContext = api_1.trace.getSpanContext(context); - if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) { - return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.isRemote) { - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); + else if (endpoint.startsWith('https://')) { + insecure = false; } - toString() { - return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`; + else if (endpoint.startsWith('http://') || + endpoint === exports.DEFAULT_COLLECTOR_URL) { + insecure = true; + } + else { + insecure = getSecurityFromEnv(); + } + if (insecure) { + return (0, grpc_exporter_transport_1.createInsecureCredentials)(); + } + else { + return getCredentialsFromEnvironment(); } } -exports.ParentBasedSampler = ParentBasedSampler; -//# sourceMappingURL=ParentBasedSampler.js.map - -/***/ }), - -/***/ 8985: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceIdRatioBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** Sampler that samples a given fraction of traces based of trace id deterministically. */ -class TraceIdRatioBasedSampler { - constructor(_ratio = 0) { - this._ratio = _ratio; - this._ratio = this._normalize(_ratio); - this._upperBound = Math.floor(this._ratio * 0xffffffff); +exports.configureCredentials = configureCredentials; +function getSecurityFromEnv() { + const definedInsecure = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_INSECURE || + (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_INSECURE; + if (definedInsecure) { + return definedInsecure.toLowerCase() === 'true'; } - shouldSample(context, traceId) { - return { - decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound - ? api_1.SamplingDecision.RECORD_AND_SAMPLED - : api_1.SamplingDecision.NOT_RECORD, - }; + else { + return false; + } +} +/** + * Exported for testing + */ +function getCredentialsFromEnvironment() { + const rootCert = retrieveRootCert(); + const privateKey = retrievePrivateKey(); + const certChain = retrieveCertChain(); + return (0, grpc_exporter_transport_1.createSslCredentials)(rootCert, privateKey, certChain); +} +exports.getCredentialsFromEnvironment = getCredentialsFromEnvironment; +function retrieveRootCert() { + const rootCertificate = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE || + (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_CERTIFICATE; + if (rootCertificate) { + try { + return fs.readFileSync(path.resolve(process.cwd(), rootCertificate)); + } + catch (_a) { + api_1.diag.warn('Failed to read root certificate file'); + return undefined; + } } - toString() { - return `TraceIdRatioBased{${this._ratio}}`; + else { + return undefined; } - _normalize(ratio) { - if (typeof ratio !== 'number' || isNaN(ratio)) - return 0; - return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; +} +function retrievePrivateKey() { + const clientKey = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY || + (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_CLIENT_KEY; + if (clientKey) { + try { + return fs.readFileSync(path.resolve(process.cwd(), clientKey)); + } + catch (_a) { + api_1.diag.warn('Failed to read client certificate private key file'); + return undefined; + } } - _accumulate(traceId) { - let accumulation = 0; - for (let i = 0; i < traceId.length / 8; i++) { - const pos = i * 8; - const part = parseInt(traceId.slice(pos, pos + 8), 16); - accumulation = (accumulation ^ part) >>> 0; + else { + return undefined; + } +} +function retrieveCertChain() { + const clientChain = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE || + (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE; + if (clientChain) { + try { + return fs.readFileSync(path.resolve(process.cwd(), clientChain)); + } + catch (_a) { + api_1.diag.warn('Failed to read client certificate chain file'); + return undefined; } - return accumulation; + } + else { + return undefined; } } -exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; -//# sourceMappingURL=TraceIdRatioBasedSampler.js.map +function configureCompression(compression) { + if (compression != null) { + return compression; + } + const envCompression = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION || + (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION; + if (envCompression === 'gzip') { + return otlp_exporter_base_1.CompressionAlgorithm.GZIP; + } + else if (envCompression === 'none') { + return otlp_exporter_base_1.CompressionAlgorithm.NONE; + } + api_1.diag.warn('Unknown compression "' + envCompression + '", falling back to "none"'); + return otlp_exporter_base_1.CompressionAlgorithm.NONE; +} +exports.configureCompression = configureCompression; +//# sourceMappingURL=util.js.map + +/***/ }), + +/***/ 59093: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ + +var $protobuf = __nccwpck_require__(96916); +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; +// Exported root namespace +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); +$root.opentelemetry = (function () { + /** + * Namespace opentelemetry. + * @exports opentelemetry + * @namespace + */ + var opentelemetry = {}; + opentelemetry.proto = (function () { + /** + * Namespace proto. + * @memberof opentelemetry + * @namespace + */ + var proto = {}; + proto.common = (function () { + /** + * Namespace common. + * @memberof opentelemetry.proto + * @namespace + */ + var common = {}; + common.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.common + * @namespace + */ + var v1 = {}; + v1.AnyValue = (function () { + /** + * Properties of an AnyValue. + * @memberof opentelemetry.proto.common.v1 + * @interface IAnyValue + * @property {string|null} [stringValue] AnyValue stringValue + * @property {boolean|null} [boolValue] AnyValue boolValue + * @property {number|Long|null} [intValue] AnyValue intValue + * @property {number|null} [doubleValue] AnyValue doubleValue + * @property {opentelemetry.proto.common.v1.IArrayValue|null} [arrayValue] AnyValue arrayValue + * @property {opentelemetry.proto.common.v1.IKeyValueList|null} [kvlistValue] AnyValue kvlistValue + * @property {Uint8Array|null} [bytesValue] AnyValue bytesValue + */ + /** + * Constructs a new AnyValue. + * @memberof opentelemetry.proto.common.v1 + * @classdesc Represents an AnyValue. + * @implements IAnyValue + * @constructor + * @param {opentelemetry.proto.common.v1.IAnyValue=} [properties] Properties to set + */ + function AnyValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * AnyValue stringValue. + * @member {string|null|undefined} stringValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.stringValue = null; + /** + * AnyValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.boolValue = null; + /** + * AnyValue intValue. + * @member {number|Long|null|undefined} intValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.intValue = null; + /** + * AnyValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.doubleValue = null; + /** + * AnyValue arrayValue. + * @member {opentelemetry.proto.common.v1.IArrayValue|null|undefined} arrayValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.arrayValue = null; + /** + * AnyValue kvlistValue. + * @member {opentelemetry.proto.common.v1.IKeyValueList|null|undefined} kvlistValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.kvlistValue = null; + /** + * AnyValue bytesValue. + * @member {Uint8Array|null|undefined} bytesValue + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + AnyValue.prototype.bytesValue = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * AnyValue value. + * @member {"stringValue"|"boolValue"|"intValue"|"doubleValue"|"arrayValue"|"kvlistValue"|"bytesValue"|undefined} value + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + */ + Object.defineProperty(AnyValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["stringValue", "boolValue", "intValue", "doubleValue", "arrayValue", "kvlistValue", "bytesValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new AnyValue instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {opentelemetry.proto.common.v1.IAnyValue=} [properties] Properties to set + * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue instance + */ + AnyValue.create = function create(properties) { + return new AnyValue(properties); + }; + /** + * Encodes the specified AnyValue message. Does not implicitly {@link opentelemetry.proto.common.v1.AnyValue.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {opentelemetry.proto.common.v1.IAnyValue} message AnyValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnyValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 2, wireType 0 =*/ 16).bool(message.boolValue); + if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) + writer.uint32(/* id 3, wireType 0 =*/ 24).int64(message.intValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 4, wireType 1 =*/ 33).double(message.doubleValue); + if (message.arrayValue != null && Object.hasOwnProperty.call(message, "arrayValue")) + $root.opentelemetry.proto.common.v1.ArrayValue.encode(message.arrayValue, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); + if (message.kvlistValue != null && Object.hasOwnProperty.call(message, "kvlistValue")) + $root.opentelemetry.proto.common.v1.KeyValueList.encode(message.kvlistValue, writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim(); + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) + writer.uint32(/* id 7, wireType 2 =*/ 58).bytes(message.bytesValue); + return writer; + }; + /** + * Encodes the specified AnyValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.AnyValue.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {opentelemetry.proto.common.v1.IAnyValue} message AnyValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnyValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an AnyValue message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnyValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.AnyValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stringValue = reader.string(); + break; + } + case 2: { + message.boolValue = reader.bool(); + break; + } + case 3: { + message.intValue = reader.int64(); + break; + } + case 4: { + message.doubleValue = reader.double(); + break; + } + case 5: { + message.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.decode(reader, reader.uint32()); + break; + } + case 6: { + message.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.decode(reader, reader.uint32()); + break; + } + case 7: { + message.bytesValue = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an AnyValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnyValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an AnyValue message. + * @function verify + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnyValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) + return "intValue: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.opentelemetry.proto.common.v1.ArrayValue.verify(message.arrayValue); + if (error) + return "arrayValue." + error; + } + } + if (message.kvlistValue != null && message.hasOwnProperty("kvlistValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.opentelemetry.proto.common.v1.KeyValueList.verify(message.kvlistValue); + if (error) + return "kvlistValue." + error; + } + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) + return "bytesValue: buffer expected"; + } + return null; + }; + /** + * Creates an AnyValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue + */ + AnyValue.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.common.v1.AnyValue) + return object; + var message = new $root.opentelemetry.proto.common.v1.AnyValue(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.intValue != null) + if ($util.Long) + (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.arrayValue != null) { + if (typeof object.arrayValue !== "object") + throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected"); + message.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.fromObject(object.arrayValue); + } + if (object.kvlistValue != null) { + if (typeof object.kvlistValue !== "object") + throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected"); + message.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.fromObject(object.kvlistValue); + } + if (object.bytesValue != null) + if (typeof object.bytesValue === "string") + $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); + else if (object.bytesValue.length >= 0) + message.bytesValue = object.bytesValue; + return message; + }; + /** + * Creates a plain object from an AnyValue message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {opentelemetry.proto.common.v1.AnyValue} message AnyValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnyValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (typeof message.intValue === "number") + object.intValue = options.longs === String ? String(message.intValue) : message.intValue; + else + 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; + if (options.oneofs) + object.value = "intValue"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.value = "doubleValue"; + } + if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { + object.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.toObject(message.arrayValue, options); + if (options.oneofs) + object.value = "arrayValue"; + } + if (message.kvlistValue != null && message.hasOwnProperty("kvlistValue")) { + object.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.toObject(message.kvlistValue, options); + if (options.oneofs) + object.value = "kvlistValue"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; + if (options.oneofs) + object.value = "bytesValue"; + } + return object; + }; + /** + * Converts this AnyValue to JSON. + * @function toJSON + * @memberof opentelemetry.proto.common.v1.AnyValue + * @instance + * @returns {Object.} JSON object + */ + AnyValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for AnyValue + * @function getTypeUrl + * @memberof opentelemetry.proto.common.v1.AnyValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.common.v1.AnyValue"; + }; + return AnyValue; + })(); + v1.ArrayValue = (function () { + /** + * Properties of an ArrayValue. + * @memberof opentelemetry.proto.common.v1 + * @interface IArrayValue + * @property {Array.|null} [values] ArrayValue values + */ + /** + * Constructs a new ArrayValue. + * @memberof opentelemetry.proto.common.v1 + * @classdesc Represents an ArrayValue. + * @implements IArrayValue + * @constructor + * @param {opentelemetry.proto.common.v1.IArrayValue=} [properties] Properties to set + */ + function ArrayValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ArrayValue values. + * @member {Array.} values + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @instance + */ + ArrayValue.prototype.values = $util.emptyArray; + /** + * Creates a new ArrayValue instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {opentelemetry.proto.common.v1.IArrayValue=} [properties] Properties to set + * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue instance + */ + ArrayValue.create = function create(properties) { + return new ArrayValue(properties); + }; + /** + * Encodes the specified ArrayValue message. Does not implicitly {@link opentelemetry.proto.common.v1.ArrayValue.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {opentelemetry.proto.common.v1.IArrayValue} message ArrayValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArrayValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.opentelemetry.proto.common.v1.AnyValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ArrayValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.ArrayValue.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {opentelemetry.proto.common.v1.IArrayValue} message ArrayValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArrayValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ArrayValue message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArrayValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.ArrayValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ArrayValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArrayValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ArrayValue message. + * @function verify + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArrayValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + /** + * Creates an ArrayValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue + */ + ArrayValue.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.common.v1.ArrayValue) + return object; + var message = new $root.opentelemetry.proto.common.v1.ArrayValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected"); + message.values[i] = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.values[i]); + } + } + return message; + }; + /** + * Creates a plain object from an ArrayValue message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {opentelemetry.proto.common.v1.ArrayValue} message ArrayValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArrayValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.values[j], options); + } + return object; + }; + /** + * Converts this ArrayValue to JSON. + * @function toJSON + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @instance + * @returns {Object.} JSON object + */ + ArrayValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ArrayValue + * @function getTypeUrl + * @memberof opentelemetry.proto.common.v1.ArrayValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArrayValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.common.v1.ArrayValue"; + }; + return ArrayValue; + })(); + v1.KeyValueList = (function () { + /** + * Properties of a KeyValueList. + * @memberof opentelemetry.proto.common.v1 + * @interface IKeyValueList + * @property {Array.|null} [values] KeyValueList values + */ + /** + * Constructs a new KeyValueList. + * @memberof opentelemetry.proto.common.v1 + * @classdesc Represents a KeyValueList. + * @implements IKeyValueList + * @constructor + * @param {opentelemetry.proto.common.v1.IKeyValueList=} [properties] Properties to set + */ + function KeyValueList(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * KeyValueList values. + * @member {Array.} values + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @instance + */ + KeyValueList.prototype.values = $util.emptyArray; + /** + * Creates a new KeyValueList instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {opentelemetry.proto.common.v1.IKeyValueList=} [properties] Properties to set + * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList instance + */ + KeyValueList.create = function create(properties) { + return new KeyValueList(properties); + }; + /** + * Encodes the specified KeyValueList message. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValueList.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {opentelemetry.proto.common.v1.IKeyValueList} message KeyValueList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValueList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified KeyValueList message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValueList.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {opentelemetry.proto.common.v1.IKeyValueList} message KeyValueList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValueList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a KeyValueList message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValueList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.KeyValueList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a KeyValueList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValueList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a KeyValueList message. + * @function verify + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyValueList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + /** + * Creates a KeyValueList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList + */ + KeyValueList.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.common.v1.KeyValueList) + return object; + var message = new $root.opentelemetry.proto.common.v1.KeyValueList(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected"); + message.values[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.values[i]); + } + } + return message; + }; + /** + * Creates a plain object from a KeyValueList message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {opentelemetry.proto.common.v1.KeyValueList} message KeyValueList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyValueList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.values[j], options); + } + return object; + }; + /** + * Converts this KeyValueList to JSON. + * @function toJSON + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @instance + * @returns {Object.} JSON object + */ + KeyValueList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for KeyValueList + * @function getTypeUrl + * @memberof opentelemetry.proto.common.v1.KeyValueList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyValueList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.common.v1.KeyValueList"; + }; + return KeyValueList; + })(); + v1.KeyValue = (function () { + /** + * Properties of a KeyValue. + * @memberof opentelemetry.proto.common.v1 + * @interface IKeyValue + * @property {string|null} [key] KeyValue key + * @property {opentelemetry.proto.common.v1.IAnyValue|null} [value] KeyValue value + */ + /** + * Constructs a new KeyValue. + * @memberof opentelemetry.proto.common.v1 + * @classdesc Represents a KeyValue. + * @implements IKeyValue + * @constructor + * @param {opentelemetry.proto.common.v1.IKeyValue=} [properties] Properties to set + */ + function KeyValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * KeyValue key. + * @member {string|null|undefined} key + * @memberof opentelemetry.proto.common.v1.KeyValue + * @instance + */ + KeyValue.prototype.key = null; + /** + * KeyValue value. + * @member {opentelemetry.proto.common.v1.IAnyValue|null|undefined} value + * @memberof opentelemetry.proto.common.v1.KeyValue + * @instance + */ + KeyValue.prototype.value = null; + /** + * Creates a new KeyValue instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {opentelemetry.proto.common.v1.IKeyValue=} [properties] Properties to set + * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue instance + */ + KeyValue.create = function create(properties) { + return new KeyValue(properties); + }; + /** + * Encodes the specified KeyValue message. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValue.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {opentelemetry.proto.common.v1.IKeyValue} message KeyValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.opentelemetry.proto.common.v1.AnyValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified KeyValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValue.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {opentelemetry.proto.common.v1.IKeyValue} message KeyValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a KeyValue message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.KeyValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = $root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a KeyValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a KeyValue message. + * @function verify + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + /** + * Creates a KeyValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue + */ + KeyValue.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.common.v1.KeyValue) + return object; + var message = new $root.opentelemetry.proto.common.v1.KeyValue(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected"); + message.value = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.value); + } + return message; + }; + /** + * Creates a plain object from a KeyValue message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {opentelemetry.proto.common.v1.KeyValue} message KeyValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.value = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.value, options); + return object; + }; + /** + * Converts this KeyValue to JSON. + * @function toJSON + * @memberof opentelemetry.proto.common.v1.KeyValue + * @instance + * @returns {Object.} JSON object + */ + KeyValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for KeyValue + * @function getTypeUrl + * @memberof opentelemetry.proto.common.v1.KeyValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.common.v1.KeyValue"; + }; + return KeyValue; + })(); + v1.InstrumentationScope = (function () { + /** + * Properties of an InstrumentationScope. + * @memberof opentelemetry.proto.common.v1 + * @interface IInstrumentationScope + * @property {string|null} [name] InstrumentationScope name + * @property {string|null} [version] InstrumentationScope version + * @property {Array.|null} [attributes] InstrumentationScope attributes + * @property {number|null} [droppedAttributesCount] InstrumentationScope droppedAttributesCount + */ + /** + * Constructs a new InstrumentationScope. + * @memberof opentelemetry.proto.common.v1 + * @classdesc Represents an InstrumentationScope. + * @implements IInstrumentationScope + * @constructor + * @param {opentelemetry.proto.common.v1.IInstrumentationScope=} [properties] Properties to set + */ + function InstrumentationScope(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * InstrumentationScope name. + * @member {string|null|undefined} name + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @instance + */ + InstrumentationScope.prototype.name = null; + /** + * InstrumentationScope version. + * @member {string|null|undefined} version + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @instance + */ + InstrumentationScope.prototype.version = null; + /** + * InstrumentationScope attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @instance + */ + InstrumentationScope.prototype.attributes = $util.emptyArray; + /** + * InstrumentationScope droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @instance + */ + InstrumentationScope.prototype.droppedAttributesCount = null; + /** + * Creates a new InstrumentationScope instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {opentelemetry.proto.common.v1.IInstrumentationScope=} [properties] Properties to set + * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope instance + */ + InstrumentationScope.create = function create(properties) { + return new InstrumentationScope(properties); + }; + /** + * Encodes the specified InstrumentationScope message. Does not implicitly {@link opentelemetry.proto.common.v1.InstrumentationScope.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {opentelemetry.proto.common.v1.IInstrumentationScope} message InstrumentationScope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstrumentationScope.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.version); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 3, wireType 2 =*/ 26).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 4, wireType 0 =*/ 32).uint32(message.droppedAttributesCount); + return writer; + }; + /** + * Encodes the specified InstrumentationScope message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.InstrumentationScope.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {opentelemetry.proto.common.v1.IInstrumentationScope} message InstrumentationScope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstrumentationScope.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an InstrumentationScope message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstrumentationScope.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.InstrumentationScope(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + case 3: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 4: { + message.droppedAttributesCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an InstrumentationScope message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstrumentationScope.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an InstrumentationScope message. + * @function verify + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstrumentationScope.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + return null; + }; + /** + * Creates an InstrumentationScope message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope + */ + InstrumentationScope.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.common.v1.InstrumentationScope) + return object; + var message = new $root.opentelemetry.proto.common.v1.InstrumentationScope(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + return message; + }; + /** + * Creates a plain object from an InstrumentationScope message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {opentelemetry.proto.common.v1.InstrumentationScope} message InstrumentationScope + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstrumentationScope.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) { + object.name = ""; + object.version = ""; + object.droppedAttributesCount = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + return object; + }; + /** + * Converts this InstrumentationScope to JSON. + * @function toJSON + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @instance + * @returns {Object.} JSON object + */ + InstrumentationScope.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for InstrumentationScope + * @function getTypeUrl + * @memberof opentelemetry.proto.common.v1.InstrumentationScope + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstrumentationScope.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.common.v1.InstrumentationScope"; + }; + return InstrumentationScope; + })(); + return v1; + })(); + return common; + })(); + proto.resource = (function () { + /** + * Namespace resource. + * @memberof opentelemetry.proto + * @namespace + */ + var resource = {}; + resource.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.resource + * @namespace + */ + var v1 = {}; + v1.Resource = (function () { + /** + * Properties of a Resource. + * @memberof opentelemetry.proto.resource.v1 + * @interface IResource + * @property {Array.|null} [attributes] Resource attributes + * @property {number|null} [droppedAttributesCount] Resource droppedAttributesCount + */ + /** + * Constructs a new Resource. + * @memberof opentelemetry.proto.resource.v1 + * @classdesc Represents a Resource. + * @implements IResource + * @constructor + * @param {opentelemetry.proto.resource.v1.IResource=} [properties] Properties to set + */ + function Resource(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Resource attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.resource.v1.Resource + * @instance + */ + Resource.prototype.attributes = $util.emptyArray; + /** + * Resource droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.resource.v1.Resource + * @instance + */ + Resource.prototype.droppedAttributesCount = null; + /** + * Creates a new Resource instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {opentelemetry.proto.resource.v1.IResource=} [properties] Properties to set + * @returns {opentelemetry.proto.resource.v1.Resource} Resource instance + */ + Resource.create = function create(properties) { + return new Resource(properties); + }; + /** + * Encodes the specified Resource message. Does not implicitly {@link opentelemetry.proto.resource.v1.Resource.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {opentelemetry.proto.resource.v1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 2, wireType 0 =*/ 16).uint32(message.droppedAttributesCount); + return writer; + }; + /** + * Encodes the specified Resource message, length delimited. Does not implicitly {@link opentelemetry.proto.resource.v1.Resource.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {opentelemetry.proto.resource.v1.IResource} message Resource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Resource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Resource message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.resource.v1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.resource.v1.Resource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.droppedAttributesCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Resource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.resource.v1.Resource} Resource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Resource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Resource message. + * @function verify + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Resource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + return null; + }; + /** + * Creates a Resource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.resource.v1.Resource} Resource + */ + Resource.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.resource.v1.Resource) + return object; + var message = new $root.opentelemetry.proto.resource.v1.Resource(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + return message; + }; + /** + * Creates a plain object from a Resource message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {opentelemetry.proto.resource.v1.Resource} message Resource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Resource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) + object.droppedAttributesCount = 0; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + return object; + }; + /** + * Converts this Resource to JSON. + * @function toJSON + * @memberof opentelemetry.proto.resource.v1.Resource + * @instance + * @returns {Object.} JSON object + */ + Resource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Resource + * @function getTypeUrl + * @memberof opentelemetry.proto.resource.v1.Resource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.resource.v1.Resource"; + }; + return Resource; + })(); + return v1; + })(); + return resource; + })(); + proto.trace = (function () { + /** + * Namespace trace. + * @memberof opentelemetry.proto + * @namespace + */ + var trace = {}; + trace.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.trace + * @namespace + */ + var v1 = {}; + v1.TracesData = (function () { + /** + * Properties of a TracesData. + * @memberof opentelemetry.proto.trace.v1 + * @interface ITracesData + * @property {Array.|null} [resourceSpans] TracesData resourceSpans + */ + /** + * Constructs a new TracesData. + * @memberof opentelemetry.proto.trace.v1 + * @classdesc Represents a TracesData. + * @implements ITracesData + * @constructor + * @param {opentelemetry.proto.trace.v1.ITracesData=} [properties] Properties to set + */ + function TracesData(properties) { + this.resourceSpans = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * TracesData resourceSpans. + * @member {Array.} resourceSpans + * @memberof opentelemetry.proto.trace.v1.TracesData + * @instance + */ + TracesData.prototype.resourceSpans = $util.emptyArray; + /** + * Creates a new TracesData instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {opentelemetry.proto.trace.v1.ITracesData=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData instance + */ + TracesData.create = function create(properties) { + return new TracesData(properties); + }; + /** + * Encodes the specified TracesData message. Does not implicitly {@link opentelemetry.proto.trace.v1.TracesData.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {opentelemetry.proto.trace.v1.ITracesData} message TracesData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TracesData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceSpans != null && message.resourceSpans.length) + for (var i = 0; i < message.resourceSpans.length; ++i) + $root.opentelemetry.proto.trace.v1.ResourceSpans.encode(message.resourceSpans[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified TracesData message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.TracesData.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {opentelemetry.proto.trace.v1.ITracesData} message TracesData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TracesData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a TracesData message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TracesData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.TracesData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceSpans && message.resourceSpans.length)) + message.resourceSpans = []; + message.resourceSpans.push($root.opentelemetry.proto.trace.v1.ResourceSpans.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a TracesData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TracesData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a TracesData message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TracesData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceSpans != null && message.hasOwnProperty("resourceSpans")) { + if (!Array.isArray(message.resourceSpans)) + return "resourceSpans: array expected"; + for (var i = 0; i < message.resourceSpans.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.ResourceSpans.verify(message.resourceSpans[i]); + if (error) + return "resourceSpans." + error; + } + } + return null; + }; + /** + * Creates a TracesData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData + */ + TracesData.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.TracesData) + return object; + var message = new $root.opentelemetry.proto.trace.v1.TracesData(); + if (object.resourceSpans) { + if (!Array.isArray(object.resourceSpans)) + throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected"); + message.resourceSpans = []; + for (var i = 0; i < object.resourceSpans.length; ++i) { + if (typeof object.resourceSpans[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected"); + message.resourceSpans[i] = $root.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(object.resourceSpans[i]); + } + } + return message; + }; + /** + * Creates a plain object from a TracesData message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {opentelemetry.proto.trace.v1.TracesData} message TracesData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TracesData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceSpans = []; + if (message.resourceSpans && message.resourceSpans.length) { + object.resourceSpans = []; + for (var j = 0; j < message.resourceSpans.length; ++j) + object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j], options); + } + return object; + }; + /** + * Converts this TracesData to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.TracesData + * @instance + * @returns {Object.} JSON object + */ + TracesData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for TracesData + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.TracesData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TracesData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.TracesData"; + }; + return TracesData; + })(); + v1.ResourceSpans = (function () { + /** + * Properties of a ResourceSpans. + * @memberof opentelemetry.proto.trace.v1 + * @interface IResourceSpans + * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceSpans resource + * @property {Array.|null} [scopeSpans] ResourceSpans scopeSpans + * @property {string|null} [schemaUrl] ResourceSpans schemaUrl + */ + /** + * Constructs a new ResourceSpans. + * @memberof opentelemetry.proto.trace.v1 + * @classdesc Represents a ResourceSpans. + * @implements IResourceSpans + * @constructor + * @param {opentelemetry.proto.trace.v1.IResourceSpans=} [properties] Properties to set + */ + function ResourceSpans(properties) { + this.scopeSpans = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ResourceSpans resource. + * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @instance + */ + ResourceSpans.prototype.resource = null; + /** + * ResourceSpans scopeSpans. + * @member {Array.} scopeSpans + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @instance + */ + ResourceSpans.prototype.scopeSpans = $util.emptyArray; + /** + * ResourceSpans schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @instance + */ + ResourceSpans.prototype.schemaUrl = null; + /** + * Creates a new ResourceSpans instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {opentelemetry.proto.trace.v1.IResourceSpans=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans instance + */ + ResourceSpans.create = function create(properties) { + return new ResourceSpans(properties); + }; + /** + * Encodes the specified ResourceSpans message. Does not implicitly {@link opentelemetry.proto.trace.v1.ResourceSpans.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {opentelemetry.proto.trace.v1.IResourceSpans} message ResourceSpans message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpans.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.scopeSpans != null && message.scopeSpans.length) + for (var i = 0; i < message.scopeSpans.length; ++i) + $root.opentelemetry.proto.trace.v1.ScopeSpans.encode(message.scopeSpans[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ResourceSpans message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.ResourceSpans.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {opentelemetry.proto.trace.v1.IResourceSpans} message ResourceSpans message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSpans.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ResourceSpans message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpans.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.ResourceSpans(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.scopeSpans && message.scopeSpans.length)) + message.scopeSpans = []; + message.scopeSpans.push($root.opentelemetry.proto.trace.v1.ScopeSpans.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ResourceSpans message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSpans.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ResourceSpans message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSpans.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.scopeSpans != null && message.hasOwnProperty("scopeSpans")) { + if (!Array.isArray(message.scopeSpans)) + return "scopeSpans: array expected"; + for (var i = 0; i < message.scopeSpans.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.ScopeSpans.verify(message.scopeSpans[i]); + if (error) + return "scopeSpans." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ResourceSpans message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans + */ + ResourceSpans.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.ResourceSpans) + return object; + var message = new $root.opentelemetry.proto.trace.v1.ResourceSpans(); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected"); + message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource); + } + if (object.scopeSpans) { + if (!Array.isArray(object.scopeSpans)) + throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected"); + message.scopeSpans = []; + for (var i = 0; i < object.scopeSpans.length; ++i) { + if (typeof object.scopeSpans[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected"); + message.scopeSpans[i] = $root.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(object.scopeSpans[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ResourceSpans message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {opentelemetry.proto.trace.v1.ResourceSpans} message ResourceSpans + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSpans.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopeSpans = []; + if (options.defaults) { + object.resource = null; + object.schemaUrl = ""; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options); + if (message.scopeSpans && message.scopeSpans.length) { + object.scopeSpans = []; + for (var j = 0; j < message.scopeSpans.length; ++j) + object.scopeSpans[j] = $root.opentelemetry.proto.trace.v1.ScopeSpans.toObject(message.scopeSpans[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ResourceSpans to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @instance + * @returns {Object.} JSON object + */ + ResourceSpans.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ResourceSpans + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.ResourceSpans + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceSpans.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.ResourceSpans"; + }; + return ResourceSpans; + })(); + v1.ScopeSpans = (function () { + /** + * Properties of a ScopeSpans. + * @memberof opentelemetry.proto.trace.v1 + * @interface IScopeSpans + * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeSpans scope + * @property {Array.|null} [spans] ScopeSpans spans + * @property {string|null} [schemaUrl] ScopeSpans schemaUrl + */ + /** + * Constructs a new ScopeSpans. + * @memberof opentelemetry.proto.trace.v1 + * @classdesc Represents a ScopeSpans. + * @implements IScopeSpans + * @constructor + * @param {opentelemetry.proto.trace.v1.IScopeSpans=} [properties] Properties to set + */ + function ScopeSpans(properties) { + this.spans = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ScopeSpans scope. + * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @instance + */ + ScopeSpans.prototype.scope = null; + /** + * ScopeSpans spans. + * @member {Array.} spans + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @instance + */ + ScopeSpans.prototype.spans = $util.emptyArray; + /** + * ScopeSpans schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @instance + */ + ScopeSpans.prototype.schemaUrl = null; + /** + * Creates a new ScopeSpans instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {opentelemetry.proto.trace.v1.IScopeSpans=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans instance + */ + ScopeSpans.create = function create(properties) { + return new ScopeSpans(properties); + }; + /** + * Encodes the specified ScopeSpans message. Does not implicitly {@link opentelemetry.proto.trace.v1.ScopeSpans.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {opentelemetry.proto.trace.v1.IScopeSpans} message ScopeSpans message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeSpans.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.spans != null && message.spans.length) + for (var i = 0; i < message.spans.length; ++i) + $root.opentelemetry.proto.trace.v1.Span.encode(message.spans[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ScopeSpans message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.ScopeSpans.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {opentelemetry.proto.trace.v1.IScopeSpans} message ScopeSpans message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeSpans.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ScopeSpans message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeSpans.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.ScopeSpans(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.spans && message.spans.length)) + message.spans = []; + message.spans.push($root.opentelemetry.proto.trace.v1.Span.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ScopeSpans message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeSpans.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ScopeSpans message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScopeSpans.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope); + if (error) + return "scope." + error; + } + if (message.spans != null && message.hasOwnProperty("spans")) { + if (!Array.isArray(message.spans)) + return "spans: array expected"; + for (var i = 0; i < message.spans.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.Span.verify(message.spans[i]); + if (error) + return "spans." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ScopeSpans message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans + */ + ScopeSpans.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.ScopeSpans) + return object; + var message = new $root.opentelemetry.proto.trace.v1.ScopeSpans(); + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected"); + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope); + } + if (object.spans) { + if (!Array.isArray(object.spans)) + throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected"); + message.spans = []; + for (var i = 0; i < object.spans.length; ++i) { + if (typeof object.spans[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected"); + message.spans[i] = $root.opentelemetry.proto.trace.v1.Span.fromObject(object.spans[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ScopeSpans message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {opentelemetry.proto.trace.v1.ScopeSpans} message ScopeSpans + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScopeSpans.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.spans = []; + if (options.defaults) { + object.scope = null; + object.schemaUrl = ""; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options); + if (message.spans && message.spans.length) { + object.spans = []; + for (var j = 0; j < message.spans.length; ++j) + object.spans[j] = $root.opentelemetry.proto.trace.v1.Span.toObject(message.spans[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ScopeSpans to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @instance + * @returns {Object.} JSON object + */ + ScopeSpans.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ScopeSpans + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.ScopeSpans + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScopeSpans.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.ScopeSpans"; + }; + return ScopeSpans; + })(); + v1.Span = (function () { + /** + * Properties of a Span. + * @memberof opentelemetry.proto.trace.v1 + * @interface ISpan + * @property {Uint8Array|null} [traceId] Span traceId + * @property {Uint8Array|null} [spanId] Span spanId + * @property {string|null} [traceState] Span traceState + * @property {Uint8Array|null} [parentSpanId] Span parentSpanId + * @property {string|null} [name] Span name + * @property {opentelemetry.proto.trace.v1.Span.SpanKind|null} [kind] Span kind + * @property {number|Long|null} [startTimeUnixNano] Span startTimeUnixNano + * @property {number|Long|null} [endTimeUnixNano] Span endTimeUnixNano + * @property {Array.|null} [attributes] Span attributes + * @property {number|null} [droppedAttributesCount] Span droppedAttributesCount + * @property {Array.|null} [events] Span events + * @property {number|null} [droppedEventsCount] Span droppedEventsCount + * @property {Array.|null} [links] Span links + * @property {number|null} [droppedLinksCount] Span droppedLinksCount + * @property {opentelemetry.proto.trace.v1.IStatus|null} [status] Span status + */ + /** + * Constructs a new Span. + * @memberof opentelemetry.proto.trace.v1 + * @classdesc Represents a Span. + * @implements ISpan + * @constructor + * @param {opentelemetry.proto.trace.v1.ISpan=} [properties] Properties to set + */ + function Span(properties) { + this.attributes = []; + this.events = []; + this.links = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Span traceId. + * @member {Uint8Array|null|undefined} traceId + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.traceId = null; + /** + * Span spanId. + * @member {Uint8Array|null|undefined} spanId + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.spanId = null; + /** + * Span traceState. + * @member {string|null|undefined} traceState + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.traceState = null; + /** + * Span parentSpanId. + * @member {Uint8Array|null|undefined} parentSpanId + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.parentSpanId = null; + /** + * Span name. + * @member {string|null|undefined} name + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.name = null; + /** + * Span kind. + * @member {opentelemetry.proto.trace.v1.Span.SpanKind|null|undefined} kind + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.kind = null; + /** + * Span startTimeUnixNano. + * @member {number|Long|null|undefined} startTimeUnixNano + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.startTimeUnixNano = null; + /** + * Span endTimeUnixNano. + * @member {number|Long|null|undefined} endTimeUnixNano + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.endTimeUnixNano = null; + /** + * Span attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.attributes = $util.emptyArray; + /** + * Span droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.droppedAttributesCount = null; + /** + * Span events. + * @member {Array.} events + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.events = $util.emptyArray; + /** + * Span droppedEventsCount. + * @member {number|null|undefined} droppedEventsCount + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.droppedEventsCount = null; + /** + * Span links. + * @member {Array.} links + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.links = $util.emptyArray; + /** + * Span droppedLinksCount. + * @member {number|null|undefined} droppedLinksCount + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.droppedLinksCount = null; + /** + * Span status. + * @member {opentelemetry.proto.trace.v1.IStatus|null|undefined} status + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + */ + Span.prototype.status = null; + /** + * Creates a new Span instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {opentelemetry.proto.trace.v1.ISpan=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.Span} Span instance + */ + Span.create = function create(properties) { + return new Span(properties); + }; + /** + * Encodes the specified Span message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {opentelemetry.proto.trace.v1.ISpan} message Span message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Span.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) + writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.traceId); + if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) + writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.spanId); + if (message.traceState != null && Object.hasOwnProperty.call(message, "traceState")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.traceState); + if (message.parentSpanId != null && Object.hasOwnProperty.call(message, "parentSpanId")) + writer.uint32(/* id 4, wireType 2 =*/ 34).bytes(message.parentSpanId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.name); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 6, wireType 0 =*/ 48).int32(message.kind); + if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) + writer.uint32(/* id 7, wireType 1 =*/ 57).fixed64(message.startTimeUnixNano); + if (message.endTimeUnixNano != null && Object.hasOwnProperty.call(message, "endTimeUnixNano")) + writer.uint32(/* id 8, wireType 1 =*/ 65).fixed64(message.endTimeUnixNano); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.droppedAttributesCount); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.opentelemetry.proto.trace.v1.Span.Event.encode(message.events[i], writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim(); + if (message.droppedEventsCount != null && Object.hasOwnProperty.call(message, "droppedEventsCount")) + writer.uint32(/* id 12, wireType 0 =*/ 96).uint32(message.droppedEventsCount); + if (message.links != null && message.links.length) + for (var i = 0; i < message.links.length; ++i) + $root.opentelemetry.proto.trace.v1.Span.Link.encode(message.links[i], writer.uint32(/* id 13, wireType 2 =*/ 106).fork()).ldelim(); + if (message.droppedLinksCount != null && Object.hasOwnProperty.call(message, "droppedLinksCount")) + writer.uint32(/* id 14, wireType 0 =*/ 112).uint32(message.droppedLinksCount); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.opentelemetry.proto.trace.v1.Status.encode(message.status, writer.uint32(/* id 15, wireType 2 =*/ 122).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified Span message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {opentelemetry.proto.trace.v1.ISpan} message Span message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Span.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Span message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.Span} Span + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Span.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.traceId = reader.bytes(); + break; + } + case 2: { + message.spanId = reader.bytes(); + break; + } + case 3: { + message.traceState = reader.string(); + break; + } + case 4: { + message.parentSpanId = reader.bytes(); + break; + } + case 5: { + message.name = reader.string(); + break; + } + case 6: { + message.kind = reader.int32(); + break; + } + case 7: { + message.startTimeUnixNano = reader.fixed64(); + break; + } + case 8: { + message.endTimeUnixNano = reader.fixed64(); + break; + } + case 9: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 10: { + message.droppedAttributesCount = reader.uint32(); + break; + } + case 11: { + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.opentelemetry.proto.trace.v1.Span.Event.decode(reader, reader.uint32())); + break; + } + case 12: { + message.droppedEventsCount = reader.uint32(); + break; + } + case 13: { + if (!(message.links && message.links.length)) + message.links = []; + message.links.push($root.opentelemetry.proto.trace.v1.Span.Link.decode(reader, reader.uint32())); + break; + } + case 14: { + message.droppedLinksCount = reader.uint32(); + break; + } + case 15: { + message.status = $root.opentelemetry.proto.trace.v1.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Span message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.Span} Span + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Span.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Span message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Span.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.traceId != null && message.hasOwnProperty("traceId")) + if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) + return "traceId: buffer expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) + return "spanId: buffer expected"; + if (message.traceState != null && message.hasOwnProperty("traceState")) + if (!$util.isString(message.traceState)) + return "traceState: string expected"; + if (message.parentSpanId != null && message.hasOwnProperty("parentSpanId")) + if (!(message.parentSpanId && typeof message.parentSpanId.length === "number" || $util.isString(message.parentSpanId))) + return "parentSpanId: buffer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) + return "startTimeUnixNano: integer|Long expected"; + if (message.endTimeUnixNano != null && message.hasOwnProperty("endTimeUnixNano")) + if (!$util.isInteger(message.endTimeUnixNano) && !(message.endTimeUnixNano && $util.isInteger(message.endTimeUnixNano.low) && $util.isInteger(message.endTimeUnixNano.high))) + return "endTimeUnixNano: integer|Long expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.Span.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.droppedEventsCount != null && message.hasOwnProperty("droppedEventsCount")) + if (!$util.isInteger(message.droppedEventsCount)) + return "droppedEventsCount: integer expected"; + if (message.links != null && message.hasOwnProperty("links")) { + if (!Array.isArray(message.links)) + return "links: array expected"; + for (var i = 0; i < message.links.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.Span.Link.verify(message.links[i]); + if (error) + return "links." + error; + } + } + if (message.droppedLinksCount != null && message.hasOwnProperty("droppedLinksCount")) + if (!$util.isInteger(message.droppedLinksCount)) + return "droppedLinksCount: integer expected"; + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.opentelemetry.proto.trace.v1.Status.verify(message.status); + if (error) + return "status." + error; + } + return null; + }; + /** + * Creates a Span message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.Span} Span + */ + Span.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.Span) + return object; + var message = new $root.opentelemetry.proto.trace.v1.Span(); + if (object.traceId != null) + if (typeof object.traceId === "string") + $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); + else if (object.traceId.length >= 0) + message.traceId = object.traceId; + if (object.spanId != null) + if (typeof object.spanId === "string") + $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); + else if (object.spanId.length >= 0) + message.spanId = object.spanId; + if (object.traceState != null) + message.traceState = String(object.traceState); + if (object.parentSpanId != null) + if (typeof object.parentSpanId === "string") + $util.base64.decode(object.parentSpanId, message.parentSpanId = $util.newBuffer($util.base64.length(object.parentSpanId)), 0); + else if (object.parentSpanId.length >= 0) + message.parentSpanId = object.parentSpanId; + if (object.name != null) + message.name = String(object.name); + switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; + case "SPAN_KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "SPAN_KIND_INTERNAL": + case 1: + message.kind = 1; + break; + case "SPAN_KIND_SERVER": + case 2: + message.kind = 2; + break; + case "SPAN_KIND_CLIENT": + case 3: + message.kind = 3; + break; + case "SPAN_KIND_PRODUCER": + case 4: + message.kind = 4; + break; + case "SPAN_KIND_CONSUMER": + case 5: + message.kind = 5; + break; + } + if (object.startTimeUnixNano != null) + if ($util.Long) + (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; + else if (typeof object.startTimeUnixNano === "string") + message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); + else if (typeof object.startTimeUnixNano === "number") + message.startTimeUnixNano = object.startTimeUnixNano; + else if (typeof object.startTimeUnixNano === "object") + message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); + if (object.endTimeUnixNano != null) + if ($util.Long) + (message.endTimeUnixNano = $util.Long.fromValue(object.endTimeUnixNano)).unsigned = false; + else if (typeof object.endTimeUnixNano === "string") + message.endTimeUnixNano = parseInt(object.endTimeUnixNano, 10); + else if (typeof object.endTimeUnixNano === "number") + message.endTimeUnixNano = object.endTimeUnixNano; + else if (typeof object.endTimeUnixNano === "object") + message.endTimeUnixNano = new $util.LongBits(object.endTimeUnixNano.low >>> 0, object.endTimeUnixNano.high >>> 0).toNumber(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected"); + message.events[i] = $root.opentelemetry.proto.trace.v1.Span.Event.fromObject(object.events[i]); + } + } + if (object.droppedEventsCount != null) + message.droppedEventsCount = object.droppedEventsCount >>> 0; + if (object.links) { + if (!Array.isArray(object.links)) + throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected"); + message.links = []; + for (var i = 0; i < object.links.length; ++i) { + if (typeof object.links[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected"); + message.links[i] = $root.opentelemetry.proto.trace.v1.Span.Link.fromObject(object.links[i]); + } + } + if (object.droppedLinksCount != null) + message.droppedLinksCount = object.droppedLinksCount >>> 0; + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected"); + message.status = $root.opentelemetry.proto.trace.v1.Status.fromObject(object.status); + } + return message; + }; + /** + * Creates a plain object from a Span message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {opentelemetry.proto.trace.v1.Span} message Span + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Span.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.attributes = []; + object.events = []; + object.links = []; + } + if (options.defaults) { + if (options.bytes === String) + object.traceId = ""; + else { + object.traceId = []; + if (options.bytes !== Array) + object.traceId = $util.newBuffer(object.traceId); + } + if (options.bytes === String) + object.spanId = ""; + else { + object.spanId = []; + if (options.bytes !== Array) + object.spanId = $util.newBuffer(object.spanId); + } + object.traceState = ""; + if (options.bytes === String) + object.parentSpanId = ""; + else { + object.parentSpanId = []; + if (options.bytes !== Array) + object.parentSpanId = $util.newBuffer(object.parentSpanId); + } + object.name = ""; + object.kind = options.enums === String ? "SPAN_KIND_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.startTimeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.endTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.endTimeUnixNano = options.longs === String ? "0" : 0; + object.droppedAttributesCount = 0; + object.droppedEventsCount = 0; + object.droppedLinksCount = 0; + object.status = null; + } + if (message.traceId != null && message.hasOwnProperty("traceId")) + object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; + if (message.traceState != null && message.hasOwnProperty("traceState")) + object.traceState = message.traceState; + if (message.parentSpanId != null && message.hasOwnProperty("parentSpanId")) + object.parentSpanId = options.bytes === String ? $util.base64.encode(message.parentSpanId, 0, message.parentSpanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentSpanId) : message.parentSpanId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.opentelemetry.proto.trace.v1.Span.SpanKind[message.kind] === undefined ? message.kind : $root.opentelemetry.proto.trace.v1.Span.SpanKind[message.kind] : message.kind; + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (typeof message.startTimeUnixNano === "number") + object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; + else + object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; + if (message.endTimeUnixNano != null && message.hasOwnProperty("endTimeUnixNano")) + if (typeof message.endTimeUnixNano === "number") + object.endTimeUnixNano = options.longs === String ? String(message.endTimeUnixNano) : message.endTimeUnixNano; + else + object.endTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.endTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.endTimeUnixNano.low >>> 0, message.endTimeUnixNano.high >>> 0).toNumber() : message.endTimeUnixNano; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.opentelemetry.proto.trace.v1.Span.Event.toObject(message.events[j], options); + } + if (message.droppedEventsCount != null && message.hasOwnProperty("droppedEventsCount")) + object.droppedEventsCount = message.droppedEventsCount; + if (message.links && message.links.length) { + object.links = []; + for (var j = 0; j < message.links.length; ++j) + object.links[j] = $root.opentelemetry.proto.trace.v1.Span.Link.toObject(message.links[j], options); + } + if (message.droppedLinksCount != null && message.hasOwnProperty("droppedLinksCount")) + object.droppedLinksCount = message.droppedLinksCount; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.opentelemetry.proto.trace.v1.Status.toObject(message.status, options); + return object; + }; + /** + * Converts this Span to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.Span + * @instance + * @returns {Object.} JSON object + */ + Span.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Span + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.Span + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Span.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Span"; + }; + /** + * SpanKind enum. + * @name opentelemetry.proto.trace.v1.Span.SpanKind + * @enum {number} + * @property {number} SPAN_KIND_UNSPECIFIED=0 SPAN_KIND_UNSPECIFIED value + * @property {number} SPAN_KIND_INTERNAL=1 SPAN_KIND_INTERNAL value + * @property {number} SPAN_KIND_SERVER=2 SPAN_KIND_SERVER value + * @property {number} SPAN_KIND_CLIENT=3 SPAN_KIND_CLIENT value + * @property {number} SPAN_KIND_PRODUCER=4 SPAN_KIND_PRODUCER value + * @property {number} SPAN_KIND_CONSUMER=5 SPAN_KIND_CONSUMER value + */ + Span.SpanKind = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SPAN_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPAN_KIND_INTERNAL"] = 1; + values[valuesById[2] = "SPAN_KIND_SERVER"] = 2; + values[valuesById[3] = "SPAN_KIND_CLIENT"] = 3; + values[valuesById[4] = "SPAN_KIND_PRODUCER"] = 4; + values[valuesById[5] = "SPAN_KIND_CONSUMER"] = 5; + return values; + })(); + Span.Event = (function () { + /** + * Properties of an Event. + * @memberof opentelemetry.proto.trace.v1.Span + * @interface IEvent + * @property {number|Long|null} [timeUnixNano] Event timeUnixNano + * @property {string|null} [name] Event name + * @property {Array.|null} [attributes] Event attributes + * @property {number|null} [droppedAttributesCount] Event droppedAttributesCount + */ + /** + * Constructs a new Event. + * @memberof opentelemetry.proto.trace.v1.Span + * @classdesc Represents an Event. + * @implements IEvent + * @constructor + * @param {opentelemetry.proto.trace.v1.Span.IEvent=} [properties] Properties to set + */ + function Event(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Event timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @instance + */ + Event.prototype.timeUnixNano = null; + /** + * Event name. + * @member {string|null|undefined} name + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @instance + */ + Event.prototype.name = null; + /** + * Event attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @instance + */ + Event.prototype.attributes = $util.emptyArray; + /** + * Event droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @instance + */ + Event.prototype.droppedAttributesCount = null; + /** + * Creates a new Event instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {opentelemetry.proto.trace.v1.Span.IEvent=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.Span.Event} Event instance + */ + Event.create = function create(properties) { + return new Event(properties); + }; + /** + * Encodes the specified Event message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Event.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {opentelemetry.proto.trace.v1.Span.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 1, wireType 1 =*/ 9).fixed64(message.timeUnixNano); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 3, wireType 2 =*/ 26).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 4, wireType 0 =*/ 32).uint32(message.droppedAttributesCount); + return writer; + }; + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Event.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {opentelemetry.proto.trace.v1.Span.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an Event message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.Span.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span.Event(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 4: { + message.droppedAttributesCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.Span.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an Event message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Event.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + return null; + }; + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.Span.Event} Event + */ + Event.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.Span.Event) + return object; + var message = new $root.opentelemetry.proto.trace.v1.Span.Event(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.name != null) + message.name = String(object.name); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + return message; + }; + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {opentelemetry.proto.trace.v1.Span.Event} message Event + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Event.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + object.name = ""; + object.droppedAttributesCount = 0; + } + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + return object; + }; + /** + * Converts this Event to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @instance + * @returns {Object.} JSON object + */ + Event.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Event + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.Span.Event + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Event.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Span.Event"; + }; + return Event; + })(); + Span.Link = (function () { + /** + * Properties of a Link. + * @memberof opentelemetry.proto.trace.v1.Span + * @interface ILink + * @property {Uint8Array|null} [traceId] Link traceId + * @property {Uint8Array|null} [spanId] Link spanId + * @property {string|null} [traceState] Link traceState + * @property {Array.|null} [attributes] Link attributes + * @property {number|null} [droppedAttributesCount] Link droppedAttributesCount + */ + /** + * Constructs a new Link. + * @memberof opentelemetry.proto.trace.v1.Span + * @classdesc Represents a Link. + * @implements ILink + * @constructor + * @param {opentelemetry.proto.trace.v1.Span.ILink=} [properties] Properties to set + */ + function Link(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Link traceId. + * @member {Uint8Array|null|undefined} traceId + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + */ + Link.prototype.traceId = null; + /** + * Link spanId. + * @member {Uint8Array|null|undefined} spanId + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + */ + Link.prototype.spanId = null; + /** + * Link traceState. + * @member {string|null|undefined} traceState + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + */ + Link.prototype.traceState = null; + /** + * Link attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + */ + Link.prototype.attributes = $util.emptyArray; + /** + * Link droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + */ + Link.prototype.droppedAttributesCount = null; + /** + * Creates a new Link instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {opentelemetry.proto.trace.v1.Span.ILink=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.Span.Link} Link instance + */ + Link.create = function create(properties) { + return new Link(properties); + }; + /** + * Encodes the specified Link message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Link.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {opentelemetry.proto.trace.v1.Span.ILink} message Link message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Link.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) + writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.traceId); + if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) + writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.spanId); + if (message.traceState != null && Object.hasOwnProperty.call(message, "traceState")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.traceState); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 4, wireType 2 =*/ 34).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 5, wireType 0 =*/ 40).uint32(message.droppedAttributesCount); + return writer; + }; + /** + * Encodes the specified Link message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Link.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {opentelemetry.proto.trace.v1.Span.ILink} message Link message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Link.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Link message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.Span.Link} Link + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Link.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span.Link(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.traceId = reader.bytes(); + break; + } + case 2: { + message.spanId = reader.bytes(); + break; + } + case 3: { + message.traceState = reader.string(); + break; + } + case 4: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 5: { + message.droppedAttributesCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Link message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.Span.Link} Link + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Link.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Link message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Link.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.traceId != null && message.hasOwnProperty("traceId")) + if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) + return "traceId: buffer expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) + return "spanId: buffer expected"; + if (message.traceState != null && message.hasOwnProperty("traceState")) + if (!$util.isString(message.traceState)) + return "traceState: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + return null; + }; + /** + * Creates a Link message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.Span.Link} Link + */ + Link.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.Span.Link) + return object; + var message = new $root.opentelemetry.proto.trace.v1.Span.Link(); + if (object.traceId != null) + if (typeof object.traceId === "string") + $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); + else if (object.traceId.length >= 0) + message.traceId = object.traceId; + if (object.spanId != null) + if (typeof object.spanId === "string") + $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); + else if (object.spanId.length >= 0) + message.spanId = object.spanId; + if (object.traceState != null) + message.traceState = String(object.traceState); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + return message; + }; + /** + * Creates a plain object from a Link message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {opentelemetry.proto.trace.v1.Span.Link} message Link + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Link.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) { + if (options.bytes === String) + object.traceId = ""; + else { + object.traceId = []; + if (options.bytes !== Array) + object.traceId = $util.newBuffer(object.traceId); + } + if (options.bytes === String) + object.spanId = ""; + else { + object.spanId = []; + if (options.bytes !== Array) + object.spanId = $util.newBuffer(object.spanId); + } + object.traceState = ""; + object.droppedAttributesCount = 0; + } + if (message.traceId != null && message.hasOwnProperty("traceId")) + object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; + if (message.traceState != null && message.hasOwnProperty("traceState")) + object.traceState = message.traceState; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + return object; + }; + /** + * Converts this Link to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @instance + * @returns {Object.} JSON object + */ + Link.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Link + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.Span.Link + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Link.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Span.Link"; + }; + return Link; + })(); + return Span; + })(); + v1.Status = (function () { + /** + * Properties of a Status. + * @memberof opentelemetry.proto.trace.v1 + * @interface IStatus + * @property {string|null} [message] Status message + * @property {opentelemetry.proto.trace.v1.Status.StatusCode|null} [code] Status code + */ + /** + * Constructs a new Status. + * @memberof opentelemetry.proto.trace.v1 + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {opentelemetry.proto.trace.v1.IStatus=} [properties] Properties to set + */ + function Status(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Status message. + * @member {string|null|undefined} message + * @memberof opentelemetry.proto.trace.v1.Status + * @instance + */ + Status.prototype.message = null; + /** + * Status code. + * @member {opentelemetry.proto.trace.v1.Status.StatusCode|null|undefined} code + * @memberof opentelemetry.proto.trace.v1.Status + * @instance + */ + Status.prototype.code = null; + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {opentelemetry.proto.trace.v1.IStatus=} [properties] Properties to set + * @returns {opentelemetry.proto.trace.v1.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + /** + * Encodes the specified Status message. Does not implicitly {@link opentelemetry.proto.trace.v1.Status.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {opentelemetry.proto.trace.v1.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.message); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 3, wireType 0 =*/ 24).int32(message.code); + return writer; + }; + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {opentelemetry.proto.trace.v1.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.trace.v1.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.code = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.trace.v1.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Status message. + * @function verify + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.trace.v1.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.trace.v1.Status) + return object; + var message = new $root.opentelemetry.proto.trace.v1.Status(); + if (object.message != null) + message.message = String(object.message); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "STATUS_CODE_UNSET": + case 0: + message.code = 0; + break; + case "STATUS_CODE_OK": + case 1: + message.code = 1; + break; + case "STATUS_CODE_ERROR": + case 2: + message.code = 2; + break; + } + return message; + }; + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {opentelemetry.proto.trace.v1.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.code = options.enums === String ? "STATUS_CODE_UNSET" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.opentelemetry.proto.trace.v1.Status.StatusCode[message.code] === undefined ? message.code : $root.opentelemetry.proto.trace.v1.Status.StatusCode[message.code] : message.code; + return object; + }; + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof opentelemetry.proto.trace.v1.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof opentelemetry.proto.trace.v1.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Status"; + }; + /** + * StatusCode enum. + * @name opentelemetry.proto.trace.v1.Status.StatusCode + * @enum {number} + * @property {number} STATUS_CODE_UNSET=0 STATUS_CODE_UNSET value + * @property {number} STATUS_CODE_OK=1 STATUS_CODE_OK value + * @property {number} STATUS_CODE_ERROR=2 STATUS_CODE_ERROR value + */ + Status.StatusCode = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_CODE_UNSET"] = 0; + values[valuesById[1] = "STATUS_CODE_OK"] = 1; + values[valuesById[2] = "STATUS_CODE_ERROR"] = 2; + return values; + })(); + return Status; + })(); + return v1; + })(); + return trace; + })(); + proto.collector = (function () { + /** + * Namespace collector. + * @memberof opentelemetry.proto + * @namespace + */ + var collector = {}; + collector.trace = (function () { + /** + * Namespace trace. + * @memberof opentelemetry.proto.collector + * @namespace + */ + var trace = {}; + trace.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.collector.trace + * @namespace + */ + var v1 = {}; + v1.TraceService = (function () { + /** + * Constructs a new TraceService service. + * @memberof opentelemetry.proto.collector.trace.v1 + * @classdesc Represents a TraceService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function TraceService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + (TraceService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TraceService; + /** + * Creates new TraceService service using the specified rpc implementation. + * @function create + * @memberof opentelemetry.proto.collector.trace.v1.TraceService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {TraceService} RPC service. Useful where requests and/or responses are streamed. + */ + TraceService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + /** + * Callback as used by {@link opentelemetry.proto.collector.trace.v1.TraceService#export_}. + * @memberof opentelemetry.proto.collector.trace.v1.TraceService + * @typedef ExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} [response] ExportTraceServiceResponse + */ + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.trace.v1.TraceService + * @instance + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} request ExportTraceServiceRequest message or plain object + * @param {opentelemetry.proto.collector.trace.v1.TraceService.ExportCallback} callback Node-style callback called with the error, if any, and ExportTraceServiceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TraceService.prototype["export"] = function export_(request, callback) { + return this.rpcCall(export_, $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest, $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse, request, callback); + }, "name", { value: "Export" }); + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.trace.v1.TraceService + * @instance + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} request ExportTraceServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return TraceService; + })(); + v1.ExportTraceServiceRequest = (function () { + /** + * Properties of an ExportTraceServiceRequest. + * @memberof opentelemetry.proto.collector.trace.v1 + * @interface IExportTraceServiceRequest + * @property {Array.|null} [resourceSpans] ExportTraceServiceRequest resourceSpans + */ + /** + * Constructs a new ExportTraceServiceRequest. + * @memberof opentelemetry.proto.collector.trace.v1 + * @classdesc Represents an ExportTraceServiceRequest. + * @implements IExportTraceServiceRequest + * @constructor + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest=} [properties] Properties to set + */ + function ExportTraceServiceRequest(properties) { + this.resourceSpans = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportTraceServiceRequest resourceSpans. + * @member {Array.} resourceSpans + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @instance + */ + ExportTraceServiceRequest.prototype.resourceSpans = $util.emptyArray; + /** + * Creates a new ExportTraceServiceRequest instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest instance + */ + ExportTraceServiceRequest.create = function create(properties) { + return new ExportTraceServiceRequest(properties); + }; + /** + * Encodes the specified ExportTraceServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} message ExportTraceServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTraceServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceSpans != null && message.resourceSpans.length) + for (var i = 0; i < message.resourceSpans.length; ++i) + $root.opentelemetry.proto.trace.v1.ResourceSpans.encode(message.resourceSpans[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportTraceServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} message ExportTraceServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTraceServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportTraceServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTraceServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceSpans && message.resourceSpans.length)) + message.resourceSpans = []; + message.resourceSpans.push($root.opentelemetry.proto.trace.v1.ResourceSpans.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportTraceServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTraceServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportTraceServiceRequest message. + * @function verify + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportTraceServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceSpans != null && message.hasOwnProperty("resourceSpans")) { + if (!Array.isArray(message.resourceSpans)) + return "resourceSpans: array expected"; + for (var i = 0; i < message.resourceSpans.length; ++i) { + var error = $root.opentelemetry.proto.trace.v1.ResourceSpans.verify(message.resourceSpans[i]); + if (error) + return "resourceSpans." + error; + } + } + return null; + }; + /** + * Creates an ExportTraceServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest + */ + ExportTraceServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) + return object; + var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest(); + if (object.resourceSpans) { + if (!Array.isArray(object.resourceSpans)) + throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected"); + message.resourceSpans = []; + for (var i = 0; i < object.resourceSpans.length; ++i) { + if (typeof object.resourceSpans[i] !== "object") + throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected"); + message.resourceSpans[i] = $root.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(object.resourceSpans[i]); + } + } + return message; + }; + /** + * Creates a plain object from an ExportTraceServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} message ExportTraceServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportTraceServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceSpans = []; + if (message.resourceSpans && message.resourceSpans.length) { + object.resourceSpans = []; + for (var j = 0; j < message.resourceSpans.length; ++j) + object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j], options); + } + return object; + }; + /** + * Converts this ExportTraceServiceRequest to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @instance + * @returns {Object.} JSON object + */ + ExportTraceServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportTraceServiceRequest + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportTraceServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"; + }; + return ExportTraceServiceRequest; + })(); + v1.ExportTraceServiceResponse = (function () { + /** + * Properties of an ExportTraceServiceResponse. + * @memberof opentelemetry.proto.collector.trace.v1 + * @interface IExportTraceServiceResponse + * @property {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess|null} [partialSuccess] ExportTraceServiceResponse partialSuccess + */ + /** + * Constructs a new ExportTraceServiceResponse. + * @memberof opentelemetry.proto.collector.trace.v1 + * @classdesc Represents an ExportTraceServiceResponse. + * @implements IExportTraceServiceResponse + * @constructor + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse=} [properties] Properties to set + */ + function ExportTraceServiceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportTraceServiceResponse partialSuccess. + * @member {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess|null|undefined} partialSuccess + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @instance + */ + ExportTraceServiceResponse.prototype.partialSuccess = null; + /** + * Creates a new ExportTraceServiceResponse instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse instance + */ + ExportTraceServiceResponse.create = function create(properties) { + return new ExportTraceServiceResponse(properties); + }; + /** + * Encodes the specified ExportTraceServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse} message ExportTraceServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTraceServiceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) + $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportTraceServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse} message ExportTraceServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTraceServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportTraceServiceResponse message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTraceServiceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportTraceServiceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTraceServiceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportTraceServiceResponse message. + * @function verify + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportTraceServiceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) { + var error = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(message.partialSuccess); + if (error) + return "partialSuccess." + error; + } + return null; + }; + /** + * Creates an ExportTraceServiceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse + */ + ExportTraceServiceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) + return object; + var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse(); + if (object.partialSuccess != null) { + if (typeof object.partialSuccess !== "object") + throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected"); + message.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(object.partialSuccess); + } + return message; + }; + /** + * Creates a plain object from an ExportTraceServiceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} message ExportTraceServiceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportTraceServiceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.partialSuccess = null; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(message.partialSuccess, options); + return object; + }; + /** + * Converts this ExportTraceServiceResponse to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @instance + * @returns {Object.} JSON object + */ + ExportTraceServiceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportTraceServiceResponse + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportTraceServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"; + }; + return ExportTraceServiceResponse; + })(); + v1.ExportTracePartialSuccess = (function () { + /** + * Properties of an ExportTracePartialSuccess. + * @memberof opentelemetry.proto.collector.trace.v1 + * @interface IExportTracePartialSuccess + * @property {number|Long|null} [rejectedSpans] ExportTracePartialSuccess rejectedSpans + * @property {string|null} [errorMessage] ExportTracePartialSuccess errorMessage + */ + /** + * Constructs a new ExportTracePartialSuccess. + * @memberof opentelemetry.proto.collector.trace.v1 + * @classdesc Represents an ExportTracePartialSuccess. + * @implements IExportTracePartialSuccess + * @constructor + * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess=} [properties] Properties to set + */ + function ExportTracePartialSuccess(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportTracePartialSuccess rejectedSpans. + * @member {number|Long|null|undefined} rejectedSpans + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @instance + */ + ExportTracePartialSuccess.prototype.rejectedSpans = null; + /** + * ExportTracePartialSuccess errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @instance + */ + ExportTracePartialSuccess.prototype.errorMessage = null; + /** + * Creates a new ExportTracePartialSuccess instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess instance + */ + ExportTracePartialSuccess.create = function create(properties) { + return new ExportTracePartialSuccess(properties); + }; + /** + * Encodes the specified ExportTracePartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess} message ExportTracePartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTracePartialSuccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rejectedSpans != null && Object.hasOwnProperty.call(message, "rejectedSpans")) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedSpans); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage); + return writer; + }; + /** + * Encodes the specified ExportTracePartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess} message ExportTracePartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportTracePartialSuccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportTracePartialSuccess message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTracePartialSuccess.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rejectedSpans = reader.int64(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportTracePartialSuccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportTracePartialSuccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportTracePartialSuccess message. + * @function verify + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportTracePartialSuccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rejectedSpans != null && message.hasOwnProperty("rejectedSpans")) + if (!$util.isInteger(message.rejectedSpans) && !(message.rejectedSpans && $util.isInteger(message.rejectedSpans.low) && $util.isInteger(message.rejectedSpans.high))) + return "rejectedSpans: integer|Long expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + return null; + }; + /** + * Creates an ExportTracePartialSuccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess + */ + ExportTracePartialSuccess.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) + return object; + var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess(); + if (object.rejectedSpans != null) + if ($util.Long) + (message.rejectedSpans = $util.Long.fromValue(object.rejectedSpans)).unsigned = false; + else if (typeof object.rejectedSpans === "string") + message.rejectedSpans = parseInt(object.rejectedSpans, 10); + else if (typeof object.rejectedSpans === "number") + message.rejectedSpans = object.rejectedSpans; + else if (typeof object.rejectedSpans === "object") + message.rejectedSpans = new $util.LongBits(object.rejectedSpans.low >>> 0, object.rejectedSpans.high >>> 0).toNumber(); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + return message; + }; + /** + * Creates a plain object from an ExportTracePartialSuccess message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} message ExportTracePartialSuccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportTracePartialSuccess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rejectedSpans = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.rejectedSpans = options.longs === String ? "0" : 0; + object.errorMessage = ""; + } + if (message.rejectedSpans != null && message.hasOwnProperty("rejectedSpans")) + if (typeof message.rejectedSpans === "number") + object.rejectedSpans = options.longs === String ? String(message.rejectedSpans) : message.rejectedSpans; + else + object.rejectedSpans = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedSpans) : options.longs === Number ? new $util.LongBits(message.rejectedSpans.low >>> 0, message.rejectedSpans.high >>> 0).toNumber() : message.rejectedSpans; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + return object; + }; + /** + * Converts this ExportTracePartialSuccess to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @instance + * @returns {Object.} JSON object + */ + ExportTracePartialSuccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportTracePartialSuccess + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportTracePartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"; + }; + return ExportTracePartialSuccess; + })(); + return v1; + })(); + return trace; + })(); + collector.metrics = (function () { + /** + * Namespace metrics. + * @memberof opentelemetry.proto.collector + * @namespace + */ + var metrics = {}; + metrics.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.collector.metrics + * @namespace + */ + var v1 = {}; + v1.MetricsService = (function () { + /** + * Constructs a new MetricsService service. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @classdesc Represents a MetricsService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function MetricsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + (MetricsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsService; + /** + * Creates new MetricsService service using the specified rpc implementation. + * @function create + * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MetricsService} RPC service. Useful where requests and/or responses are streamed. + */ + MetricsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + /** + * Callback as used by {@link opentelemetry.proto.collector.metrics.v1.MetricsService#export_}. + * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService + * @typedef ExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} [response] ExportMetricsServiceResponse + */ + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService + * @instance + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} request ExportMetricsServiceRequest message or plain object + * @param {opentelemetry.proto.collector.metrics.v1.MetricsService.ExportCallback} callback Node-style callback called with the error, if any, and ExportMetricsServiceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricsService.prototype["export"] = function export_(request, callback) { + return this.rpcCall(export_, $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest, $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse, request, callback); + }, "name", { value: "Export" }); + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService + * @instance + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} request ExportMetricsServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return MetricsService; + })(); + v1.ExportMetricsServiceRequest = (function () { + /** + * Properties of an ExportMetricsServiceRequest. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @interface IExportMetricsServiceRequest + * @property {Array.|null} [resourceMetrics] ExportMetricsServiceRequest resourceMetrics + */ + /** + * Constructs a new ExportMetricsServiceRequest. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @classdesc Represents an ExportMetricsServiceRequest. + * @implements IExportMetricsServiceRequest + * @constructor + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest=} [properties] Properties to set + */ + function ExportMetricsServiceRequest(properties) { + this.resourceMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportMetricsServiceRequest resourceMetrics. + * @member {Array.} resourceMetrics + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @instance + */ + ExportMetricsServiceRequest.prototype.resourceMetrics = $util.emptyArray; + /** + * Creates a new ExportMetricsServiceRequest instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest instance + */ + ExportMetricsServiceRequest.create = function create(properties) { + return new ExportMetricsServiceRequest(properties); + }; + /** + * Encodes the specified ExportMetricsServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} message ExportMetricsServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceMetrics != null && message.resourceMetrics.length) + for (var i = 0; i < message.resourceMetrics.length; ++i) + $root.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(message.resourceMetrics[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportMetricsServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} message ExportMetricsServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportMetricsServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceMetrics && message.resourceMetrics.length)) + message.resourceMetrics = []; + message.resourceMetrics.push($root.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportMetricsServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportMetricsServiceRequest message. + * @function verify + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportMetricsServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceMetrics != null && message.hasOwnProperty("resourceMetrics")) { + if (!Array.isArray(message.resourceMetrics)) + return "resourceMetrics: array expected"; + for (var i = 0; i < message.resourceMetrics.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(message.resourceMetrics[i]); + if (error) + return "resourceMetrics." + error; + } + } + return null; + }; + /** + * Creates an ExportMetricsServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest + */ + ExportMetricsServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest) + return object; + var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest(); + if (object.resourceMetrics) { + if (!Array.isArray(object.resourceMetrics)) + throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected"); + message.resourceMetrics = []; + for (var i = 0; i < object.resourceMetrics.length; ++i) { + if (typeof object.resourceMetrics[i] !== "object") + throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected"); + message.resourceMetrics[i] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(object.resourceMetrics[i]); + } + } + return message; + }; + /** + * Creates a plain object from an ExportMetricsServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} message ExportMetricsServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportMetricsServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceMetrics = []; + if (message.resourceMetrics && message.resourceMetrics.length) { + object.resourceMetrics = []; + for (var j = 0; j < message.resourceMetrics.length; ++j) + object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j], options); + } + return object; + }; + /** + * Converts this ExportMetricsServiceRequest to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @instance + * @returns {Object.} JSON object + */ + ExportMetricsServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportMetricsServiceRequest + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportMetricsServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"; + }; + return ExportMetricsServiceRequest; + })(); + v1.ExportMetricsServiceResponse = (function () { + /** + * Properties of an ExportMetricsServiceResponse. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @interface IExportMetricsServiceResponse + * @property {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess|null} [partialSuccess] ExportMetricsServiceResponse partialSuccess + */ + /** + * Constructs a new ExportMetricsServiceResponse. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @classdesc Represents an ExportMetricsServiceResponse. + * @implements IExportMetricsServiceResponse + * @constructor + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse=} [properties] Properties to set + */ + function ExportMetricsServiceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportMetricsServiceResponse partialSuccess. + * @member {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess|null|undefined} partialSuccess + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @instance + */ + ExportMetricsServiceResponse.prototype.partialSuccess = null; + /** + * Creates a new ExportMetricsServiceResponse instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse instance + */ + ExportMetricsServiceResponse.create = function create(properties) { + return new ExportMetricsServiceResponse(properties); + }; + /** + * Encodes the specified ExportMetricsServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse} message ExportMetricsServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsServiceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) + $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportMetricsServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse} message ExportMetricsServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportMetricsServiceResponse message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsServiceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportMetricsServiceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsServiceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportMetricsServiceResponse message. + * @function verify + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportMetricsServiceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) { + var error = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(message.partialSuccess); + if (error) + return "partialSuccess." + error; + } + return null; + }; + /** + * Creates an ExportMetricsServiceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse + */ + ExportMetricsServiceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse) + return object; + var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse(); + if (object.partialSuccess != null) { + if (typeof object.partialSuccess !== "object") + throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected"); + message.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(object.partialSuccess); + } + return message; + }; + /** + * Creates a plain object from an ExportMetricsServiceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} message ExportMetricsServiceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportMetricsServiceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.partialSuccess = null; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(message.partialSuccess, options); + return object; + }; + /** + * Converts this ExportMetricsServiceResponse to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @instance + * @returns {Object.} JSON object + */ + ExportMetricsServiceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportMetricsServiceResponse + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportMetricsServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"; + }; + return ExportMetricsServiceResponse; + })(); + v1.ExportMetricsPartialSuccess = (function () { + /** + * Properties of an ExportMetricsPartialSuccess. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @interface IExportMetricsPartialSuccess + * @property {number|Long|null} [rejectedDataPoints] ExportMetricsPartialSuccess rejectedDataPoints + * @property {string|null} [errorMessage] ExportMetricsPartialSuccess errorMessage + */ + /** + * Constructs a new ExportMetricsPartialSuccess. + * @memberof opentelemetry.proto.collector.metrics.v1 + * @classdesc Represents an ExportMetricsPartialSuccess. + * @implements IExportMetricsPartialSuccess + * @constructor + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess=} [properties] Properties to set + */ + function ExportMetricsPartialSuccess(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportMetricsPartialSuccess rejectedDataPoints. + * @member {number|Long|null|undefined} rejectedDataPoints + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @instance + */ + ExportMetricsPartialSuccess.prototype.rejectedDataPoints = null; + /** + * ExportMetricsPartialSuccess errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @instance + */ + ExportMetricsPartialSuccess.prototype.errorMessage = null; + /** + * Creates a new ExportMetricsPartialSuccess instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess instance + */ + ExportMetricsPartialSuccess.create = function create(properties) { + return new ExportMetricsPartialSuccess(properties); + }; + /** + * Encodes the specified ExportMetricsPartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess} message ExportMetricsPartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsPartialSuccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rejectedDataPoints != null && Object.hasOwnProperty.call(message, "rejectedDataPoints")) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedDataPoints); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage); + return writer; + }; + /** + * Encodes the specified ExportMetricsPartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess} message ExportMetricsPartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportMetricsPartialSuccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportMetricsPartialSuccess message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsPartialSuccess.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rejectedDataPoints = reader.int64(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportMetricsPartialSuccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportMetricsPartialSuccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportMetricsPartialSuccess message. + * @function verify + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportMetricsPartialSuccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rejectedDataPoints != null && message.hasOwnProperty("rejectedDataPoints")) + if (!$util.isInteger(message.rejectedDataPoints) && !(message.rejectedDataPoints && $util.isInteger(message.rejectedDataPoints.low) && $util.isInteger(message.rejectedDataPoints.high))) + return "rejectedDataPoints: integer|Long expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + return null; + }; + /** + * Creates an ExportMetricsPartialSuccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess + */ + ExportMetricsPartialSuccess.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess) + return object; + var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess(); + if (object.rejectedDataPoints != null) + if ($util.Long) + (message.rejectedDataPoints = $util.Long.fromValue(object.rejectedDataPoints)).unsigned = false; + else if (typeof object.rejectedDataPoints === "string") + message.rejectedDataPoints = parseInt(object.rejectedDataPoints, 10); + else if (typeof object.rejectedDataPoints === "number") + message.rejectedDataPoints = object.rejectedDataPoints; + else if (typeof object.rejectedDataPoints === "object") + message.rejectedDataPoints = new $util.LongBits(object.rejectedDataPoints.low >>> 0, object.rejectedDataPoints.high >>> 0).toNumber(); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + return message; + }; + /** + * Creates a plain object from an ExportMetricsPartialSuccess message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} message ExportMetricsPartialSuccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportMetricsPartialSuccess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rejectedDataPoints = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.rejectedDataPoints = options.longs === String ? "0" : 0; + object.errorMessage = ""; + } + if (message.rejectedDataPoints != null && message.hasOwnProperty("rejectedDataPoints")) + if (typeof message.rejectedDataPoints === "number") + object.rejectedDataPoints = options.longs === String ? String(message.rejectedDataPoints) : message.rejectedDataPoints; + else + object.rejectedDataPoints = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedDataPoints) : options.longs === Number ? new $util.LongBits(message.rejectedDataPoints.low >>> 0, message.rejectedDataPoints.high >>> 0).toNumber() : message.rejectedDataPoints; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + return object; + }; + /** + * Converts this ExportMetricsPartialSuccess to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @instance + * @returns {Object.} JSON object + */ + ExportMetricsPartialSuccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportMetricsPartialSuccess + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportMetricsPartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"; + }; + return ExportMetricsPartialSuccess; + })(); + return v1; + })(); + return metrics; + })(); + collector.logs = (function () { + /** + * Namespace logs. + * @memberof opentelemetry.proto.collector + * @namespace + */ + var logs = {}; + logs.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.collector.logs + * @namespace + */ + var v1 = {}; + v1.LogsService = (function () { + /** + * Constructs a new LogsService service. + * @memberof opentelemetry.proto.collector.logs.v1 + * @classdesc Represents a LogsService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function LogsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + (LogsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LogsService; + /** + * Creates new LogsService service using the specified rpc implementation. + * @function create + * @memberof opentelemetry.proto.collector.logs.v1.LogsService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {LogsService} RPC service. Useful where requests and/or responses are streamed. + */ + LogsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + /** + * Callback as used by {@link opentelemetry.proto.collector.logs.v1.LogsService#export_}. + * @memberof opentelemetry.proto.collector.logs.v1.LogsService + * @typedef ExportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} [response] ExportLogsServiceResponse + */ + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.logs.v1.LogsService + * @instance + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} request ExportLogsServiceRequest message or plain object + * @param {opentelemetry.proto.collector.logs.v1.LogsService.ExportCallback} callback Node-style callback called with the error, if any, and ExportLogsServiceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LogsService.prototype["export"] = function export_(request, callback) { + return this.rpcCall(export_, $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest, $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse, request, callback); + }, "name", { value: "Export" }); + /** + * Calls Export. + * @function export + * @memberof opentelemetry.proto.collector.logs.v1.LogsService + * @instance + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} request ExportLogsServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return LogsService; + })(); + v1.ExportLogsServiceRequest = (function () { + /** + * Properties of an ExportLogsServiceRequest. + * @memberof opentelemetry.proto.collector.logs.v1 + * @interface IExportLogsServiceRequest + * @property {Array.|null} [resourceLogs] ExportLogsServiceRequest resourceLogs + */ + /** + * Constructs a new ExportLogsServiceRequest. + * @memberof opentelemetry.proto.collector.logs.v1 + * @classdesc Represents an ExportLogsServiceRequest. + * @implements IExportLogsServiceRequest + * @constructor + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest=} [properties] Properties to set + */ + function ExportLogsServiceRequest(properties) { + this.resourceLogs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportLogsServiceRequest resourceLogs. + * @member {Array.} resourceLogs + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @instance + */ + ExportLogsServiceRequest.prototype.resourceLogs = $util.emptyArray; + /** + * Creates a new ExportLogsServiceRequest instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest instance + */ + ExportLogsServiceRequest.create = function create(properties) { + return new ExportLogsServiceRequest(properties); + }; + /** + * Encodes the specified ExportLogsServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} message ExportLogsServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceLogs != null && message.resourceLogs.length) + for (var i = 0; i < message.resourceLogs.length; ++i) + $root.opentelemetry.proto.logs.v1.ResourceLogs.encode(message.resourceLogs[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportLogsServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} message ExportLogsServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportLogsServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceLogs && message.resourceLogs.length)) + message.resourceLogs = []; + message.resourceLogs.push($root.opentelemetry.proto.logs.v1.ResourceLogs.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportLogsServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportLogsServiceRequest message. + * @function verify + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportLogsServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceLogs != null && message.hasOwnProperty("resourceLogs")) { + if (!Array.isArray(message.resourceLogs)) + return "resourceLogs: array expected"; + for (var i = 0; i < message.resourceLogs.length; ++i) { + var error = $root.opentelemetry.proto.logs.v1.ResourceLogs.verify(message.resourceLogs[i]); + if (error) + return "resourceLogs." + error; + } + } + return null; + }; + /** + * Creates an ExportLogsServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest + */ + ExportLogsServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest) + return object; + var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest(); + if (object.resourceLogs) { + if (!Array.isArray(object.resourceLogs)) + throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected"); + message.resourceLogs = []; + for (var i = 0; i < object.resourceLogs.length; ++i) { + if (typeof object.resourceLogs[i] !== "object") + throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected"); + message.resourceLogs[i] = $root.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(object.resourceLogs[i]); + } + } + return message; + }; + /** + * Creates a plain object from an ExportLogsServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} message ExportLogsServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportLogsServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceLogs = []; + if (message.resourceLogs && message.resourceLogs.length) { + object.resourceLogs = []; + for (var j = 0; j < message.resourceLogs.length; ++j) + object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j], options); + } + return object; + }; + /** + * Converts this ExportLogsServiceRequest to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @instance + * @returns {Object.} JSON object + */ + ExportLogsServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportLogsServiceRequest + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportLogsServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"; + }; + return ExportLogsServiceRequest; + })(); + v1.ExportLogsServiceResponse = (function () { + /** + * Properties of an ExportLogsServiceResponse. + * @memberof opentelemetry.proto.collector.logs.v1 + * @interface IExportLogsServiceResponse + * @property {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess|null} [partialSuccess] ExportLogsServiceResponse partialSuccess + */ + /** + * Constructs a new ExportLogsServiceResponse. + * @memberof opentelemetry.proto.collector.logs.v1 + * @classdesc Represents an ExportLogsServiceResponse. + * @implements IExportLogsServiceResponse + * @constructor + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse=} [properties] Properties to set + */ + function ExportLogsServiceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportLogsServiceResponse partialSuccess. + * @member {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess|null|undefined} partialSuccess + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @instance + */ + ExportLogsServiceResponse.prototype.partialSuccess = null; + /** + * Creates a new ExportLogsServiceResponse instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse instance + */ + ExportLogsServiceResponse.create = function create(properties) { + return new ExportLogsServiceResponse(properties); + }; + /** + * Encodes the specified ExportLogsServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse} message ExportLogsServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsServiceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) + $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified ExportLogsServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse} message ExportLogsServiceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportLogsServiceResponse message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsServiceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportLogsServiceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsServiceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportLogsServiceResponse message. + * @function verify + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportLogsServiceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) { + var error = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(message.partialSuccess); + if (error) + return "partialSuccess." + error; + } + return null; + }; + /** + * Creates an ExportLogsServiceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse + */ + ExportLogsServiceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse) + return object; + var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse(); + if (object.partialSuccess != null) { + if (typeof object.partialSuccess !== "object") + throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected"); + message.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(object.partialSuccess); + } + return message; + }; + /** + * Creates a plain object from an ExportLogsServiceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} message ExportLogsServiceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportLogsServiceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.partialSuccess = null; + if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) + object.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(message.partialSuccess, options); + return object; + }; + /** + * Converts this ExportLogsServiceResponse to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @instance + * @returns {Object.} JSON object + */ + ExportLogsServiceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportLogsServiceResponse + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportLogsServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"; + }; + return ExportLogsServiceResponse; + })(); + v1.ExportLogsPartialSuccess = (function () { + /** + * Properties of an ExportLogsPartialSuccess. + * @memberof opentelemetry.proto.collector.logs.v1 + * @interface IExportLogsPartialSuccess + * @property {number|Long|null} [rejectedLogRecords] ExportLogsPartialSuccess rejectedLogRecords + * @property {string|null} [errorMessage] ExportLogsPartialSuccess errorMessage + */ + /** + * Constructs a new ExportLogsPartialSuccess. + * @memberof opentelemetry.proto.collector.logs.v1 + * @classdesc Represents an ExportLogsPartialSuccess. + * @implements IExportLogsPartialSuccess + * @constructor + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess=} [properties] Properties to set + */ + function ExportLogsPartialSuccess(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExportLogsPartialSuccess rejectedLogRecords. + * @member {number|Long|null|undefined} rejectedLogRecords + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @instance + */ + ExportLogsPartialSuccess.prototype.rejectedLogRecords = null; + /** + * ExportLogsPartialSuccess errorMessage. + * @member {string|null|undefined} errorMessage + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @instance + */ + ExportLogsPartialSuccess.prototype.errorMessage = null; + /** + * Creates a new ExportLogsPartialSuccess instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess=} [properties] Properties to set + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess instance + */ + ExportLogsPartialSuccess.create = function create(properties) { + return new ExportLogsPartialSuccess(properties); + }; + /** + * Encodes the specified ExportLogsPartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess} message ExportLogsPartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsPartialSuccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rejectedLogRecords != null && Object.hasOwnProperty.call(message, "rejectedLogRecords")) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedLogRecords); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage); + return writer; + }; + /** + * Encodes the specified ExportLogsPartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess} message ExportLogsPartialSuccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportLogsPartialSuccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExportLogsPartialSuccess message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsPartialSuccess.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rejectedLogRecords = reader.int64(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExportLogsPartialSuccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportLogsPartialSuccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExportLogsPartialSuccess message. + * @function verify + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportLogsPartialSuccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rejectedLogRecords != null && message.hasOwnProperty("rejectedLogRecords")) + if (!$util.isInteger(message.rejectedLogRecords) && !(message.rejectedLogRecords && $util.isInteger(message.rejectedLogRecords.low) && $util.isInteger(message.rejectedLogRecords.high))) + return "rejectedLogRecords: integer|Long expected"; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + return null; + }; + /** + * Creates an ExportLogsPartialSuccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess + */ + ExportLogsPartialSuccess.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess) + return object; + var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess(); + if (object.rejectedLogRecords != null) + if ($util.Long) + (message.rejectedLogRecords = $util.Long.fromValue(object.rejectedLogRecords)).unsigned = false; + else if (typeof object.rejectedLogRecords === "string") + message.rejectedLogRecords = parseInt(object.rejectedLogRecords, 10); + else if (typeof object.rejectedLogRecords === "number") + message.rejectedLogRecords = object.rejectedLogRecords; + else if (typeof object.rejectedLogRecords === "object") + message.rejectedLogRecords = new $util.LongBits(object.rejectedLogRecords.low >>> 0, object.rejectedLogRecords.high >>> 0).toNumber(); + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + return message; + }; + /** + * Creates a plain object from an ExportLogsPartialSuccess message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} message ExportLogsPartialSuccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportLogsPartialSuccess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rejectedLogRecords = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.rejectedLogRecords = options.longs === String ? "0" : 0; + object.errorMessage = ""; + } + if (message.rejectedLogRecords != null && message.hasOwnProperty("rejectedLogRecords")) + if (typeof message.rejectedLogRecords === "number") + object.rejectedLogRecords = options.longs === String ? String(message.rejectedLogRecords) : message.rejectedLogRecords; + else + object.rejectedLogRecords = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedLogRecords) : options.longs === Number ? new $util.LongBits(message.rejectedLogRecords.low >>> 0, message.rejectedLogRecords.high >>> 0).toNumber() : message.rejectedLogRecords; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + return object; + }; + /** + * Converts this ExportLogsPartialSuccess to JSON. + * @function toJSON + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @instance + * @returns {Object.} JSON object + */ + ExportLogsPartialSuccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExportLogsPartialSuccess + * @function getTypeUrl + * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportLogsPartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"; + }; + return ExportLogsPartialSuccess; + })(); + return v1; + })(); + return logs; + })(); + return collector; + })(); + proto.metrics = (function () { + /** + * Namespace metrics. + * @memberof opentelemetry.proto + * @namespace + */ + var metrics = {}; + metrics.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.metrics + * @namespace + */ + var v1 = {}; + v1.MetricsData = (function () { + /** + * Properties of a MetricsData. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IMetricsData + * @property {Array.|null} [resourceMetrics] MetricsData resourceMetrics + */ + /** + * Constructs a new MetricsData. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a MetricsData. + * @implements IMetricsData + * @constructor + * @param {opentelemetry.proto.metrics.v1.IMetricsData=} [properties] Properties to set + */ + function MetricsData(properties) { + this.resourceMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * MetricsData resourceMetrics. + * @member {Array.} resourceMetrics + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @instance + */ + MetricsData.prototype.resourceMetrics = $util.emptyArray; + /** + * Creates a new MetricsData instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {opentelemetry.proto.metrics.v1.IMetricsData=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData instance + */ + MetricsData.create = function create(properties) { + return new MetricsData(properties); + }; + /** + * Encodes the specified MetricsData message. Does not implicitly {@link opentelemetry.proto.metrics.v1.MetricsData.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {opentelemetry.proto.metrics.v1.IMetricsData} message MetricsData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricsData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceMetrics != null && message.resourceMetrics.length) + for (var i = 0; i < message.resourceMetrics.length; ++i) + $root.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(message.resourceMetrics[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified MetricsData message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.MetricsData.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {opentelemetry.proto.metrics.v1.IMetricsData} message MetricsData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricsData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a MetricsData message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricsData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.MetricsData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceMetrics && message.resourceMetrics.length)) + message.resourceMetrics = []; + message.resourceMetrics.push($root.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a MetricsData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricsData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a MetricsData message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricsData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceMetrics != null && message.hasOwnProperty("resourceMetrics")) { + if (!Array.isArray(message.resourceMetrics)) + return "resourceMetrics: array expected"; + for (var i = 0; i < message.resourceMetrics.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(message.resourceMetrics[i]); + if (error) + return "resourceMetrics." + error; + } + } + return null; + }; + /** + * Creates a MetricsData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData + */ + MetricsData.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.MetricsData) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.MetricsData(); + if (object.resourceMetrics) { + if (!Array.isArray(object.resourceMetrics)) + throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected"); + message.resourceMetrics = []; + for (var i = 0; i < object.resourceMetrics.length; ++i) { + if (typeof object.resourceMetrics[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected"); + message.resourceMetrics[i] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(object.resourceMetrics[i]); + } + } + return message; + }; + /** + * Creates a plain object from a MetricsData message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {opentelemetry.proto.metrics.v1.MetricsData} message MetricsData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricsData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceMetrics = []; + if (message.resourceMetrics && message.resourceMetrics.length) { + object.resourceMetrics = []; + for (var j = 0; j < message.resourceMetrics.length; ++j) + object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j], options); + } + return object; + }; + /** + * Converts this MetricsData to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @instance + * @returns {Object.} JSON object + */ + MetricsData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for MetricsData + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.MetricsData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.MetricsData"; + }; + return MetricsData; + })(); + v1.ResourceMetrics = (function () { + /** + * Properties of a ResourceMetrics. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IResourceMetrics + * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceMetrics resource + * @property {Array.|null} [scopeMetrics] ResourceMetrics scopeMetrics + * @property {string|null} [schemaUrl] ResourceMetrics schemaUrl + */ + /** + * Constructs a new ResourceMetrics. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a ResourceMetrics. + * @implements IResourceMetrics + * @constructor + * @param {opentelemetry.proto.metrics.v1.IResourceMetrics=} [properties] Properties to set + */ + function ResourceMetrics(properties) { + this.scopeMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ResourceMetrics resource. + * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @instance + */ + ResourceMetrics.prototype.resource = null; + /** + * ResourceMetrics scopeMetrics. + * @member {Array.} scopeMetrics + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @instance + */ + ResourceMetrics.prototype.scopeMetrics = $util.emptyArray; + /** + * ResourceMetrics schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @instance + */ + ResourceMetrics.prototype.schemaUrl = null; + /** + * Creates a new ResourceMetrics instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IResourceMetrics=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics instance + */ + ResourceMetrics.create = function create(properties) { + return new ResourceMetrics(properties); + }; + /** + * Encodes the specified ResourceMetrics message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ResourceMetrics.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IResourceMetrics} message ResourceMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.scopeMetrics != null && message.scopeMetrics.length) + for (var i = 0; i < message.scopeMetrics.length; ++i) + $root.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(message.scopeMetrics[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ResourceMetrics message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ResourceMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IResourceMetrics} message ResourceMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ResourceMetrics message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ResourceMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.scopeMetrics && message.scopeMetrics.length)) + message.scopeMetrics = []; + message.scopeMetrics.push($root.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ResourceMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ResourceMetrics message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.scopeMetrics != null && message.hasOwnProperty("scopeMetrics")) { + if (!Array.isArray(message.scopeMetrics)) + return "scopeMetrics: array expected"; + for (var i = 0; i < message.scopeMetrics.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(message.scopeMetrics[i]); + if (error) + return "scopeMetrics." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ResourceMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics + */ + ResourceMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.ResourceMetrics) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.ResourceMetrics(); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected"); + message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource); + } + if (object.scopeMetrics) { + if (!Array.isArray(object.scopeMetrics)) + throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected"); + message.scopeMetrics = []; + for (var i = 0; i < object.scopeMetrics.length; ++i) { + if (typeof object.scopeMetrics[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected"); + message.scopeMetrics[i] = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(object.scopeMetrics[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ResourceMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.ResourceMetrics} message ResourceMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopeMetrics = []; + if (options.defaults) { + object.resource = null; + object.schemaUrl = ""; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options); + if (message.scopeMetrics && message.scopeMetrics.length) { + object.scopeMetrics = []; + for (var j = 0; j < message.scopeMetrics.length; ++j) + object.scopeMetrics[j] = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(message.scopeMetrics[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ResourceMetrics to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @instance + * @returns {Object.} JSON object + */ + ResourceMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ResourceMetrics + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ResourceMetrics"; + }; + return ResourceMetrics; + })(); + v1.ScopeMetrics = (function () { + /** + * Properties of a ScopeMetrics. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IScopeMetrics + * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeMetrics scope + * @property {Array.|null} [metrics] ScopeMetrics metrics + * @property {string|null} [schemaUrl] ScopeMetrics schemaUrl + */ + /** + * Constructs a new ScopeMetrics. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a ScopeMetrics. + * @implements IScopeMetrics + * @constructor + * @param {opentelemetry.proto.metrics.v1.IScopeMetrics=} [properties] Properties to set + */ + function ScopeMetrics(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ScopeMetrics scope. + * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @instance + */ + ScopeMetrics.prototype.scope = null; + /** + * ScopeMetrics metrics. + * @member {Array.} metrics + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @instance + */ + ScopeMetrics.prototype.metrics = $util.emptyArray; + /** + * ScopeMetrics schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @instance + */ + ScopeMetrics.prototype.schemaUrl = null; + /** + * Creates a new ScopeMetrics instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IScopeMetrics=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics instance + */ + ScopeMetrics.create = function create(properties) { + return new ScopeMetrics(properties); + }; + /** + * Encodes the specified ScopeMetrics message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ScopeMetrics.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IScopeMetrics} message ScopeMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.opentelemetry.proto.metrics.v1.Metric.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ScopeMetrics message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ScopeMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.IScopeMetrics} message ScopeMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ScopeMetrics message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ScopeMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.opentelemetry.proto.metrics.v1.Metric.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ScopeMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ScopeMetrics message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScopeMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope); + if (error) + return "scope." + error; + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.Metric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ScopeMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics + */ + ScopeMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.ScopeMetrics) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.ScopeMetrics(); + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected"); + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope); + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected"); + message.metrics[i] = $root.opentelemetry.proto.metrics.v1.Metric.fromObject(object.metrics[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ScopeMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {opentelemetry.proto.metrics.v1.ScopeMetrics} message ScopeMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScopeMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) { + object.scope = null; + object.schemaUrl = ""; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options); + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.opentelemetry.proto.metrics.v1.Metric.toObject(message.metrics[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ScopeMetrics to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @instance + * @returns {Object.} JSON object + */ + ScopeMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ScopeMetrics + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScopeMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ScopeMetrics"; + }; + return ScopeMetrics; + })(); + v1.Metric = (function () { + /** + * Properties of a Metric. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IMetric + * @property {string|null} [name] Metric name + * @property {string|null} [description] Metric description + * @property {string|null} [unit] Metric unit + * @property {opentelemetry.proto.metrics.v1.IGauge|null} [gauge] Metric gauge + * @property {opentelemetry.proto.metrics.v1.ISum|null} [sum] Metric sum + * @property {opentelemetry.proto.metrics.v1.IHistogram|null} [histogram] Metric histogram + * @property {opentelemetry.proto.metrics.v1.IExponentialHistogram|null} [exponentialHistogram] Metric exponentialHistogram + * @property {opentelemetry.proto.metrics.v1.ISummary|null} [summary] Metric summary + */ + /** + * Constructs a new Metric. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {opentelemetry.proto.metrics.v1.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Metric name. + * @member {string|null|undefined} name + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.name = null; + /** + * Metric description. + * @member {string|null|undefined} description + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.description = null; + /** + * Metric unit. + * @member {string|null|undefined} unit + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.unit = null; + /** + * Metric gauge. + * @member {opentelemetry.proto.metrics.v1.IGauge|null|undefined} gauge + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.gauge = null; + /** + * Metric sum. + * @member {opentelemetry.proto.metrics.v1.ISum|null|undefined} sum + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.sum = null; + /** + * Metric histogram. + * @member {opentelemetry.proto.metrics.v1.IHistogram|null|undefined} histogram + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.histogram = null; + /** + * Metric exponentialHistogram. + * @member {opentelemetry.proto.metrics.v1.IExponentialHistogram|null|undefined} exponentialHistogram + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.exponentialHistogram = null; + /** + * Metric summary. + * @member {opentelemetry.proto.metrics.v1.ISummary|null|undefined} summary + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Metric.prototype.summary = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * Metric data. + * @member {"gauge"|"sum"|"histogram"|"exponentialHistogram"|"summary"|undefined} data + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + */ + Object.defineProperty(Metric.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["gauge", "sum", "histogram", "exponentialHistogram", "summary"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {opentelemetry.proto.metrics.v1.IMetric=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + /** + * Encodes the specified Metric message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Metric.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {opentelemetry.proto.metrics.v1.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.description); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.unit); + if (message.gauge != null && Object.hasOwnProperty.call(message, "gauge")) + $root.opentelemetry.proto.metrics.v1.Gauge.encode(message.gauge, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + $root.opentelemetry.proto.metrics.v1.Sum.encode(message.sum, writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); + if (message.histogram != null && Object.hasOwnProperty.call(message, "histogram")) + $root.opentelemetry.proto.metrics.v1.Histogram.encode(message.histogram, writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); + if (message.exponentialHistogram != null && Object.hasOwnProperty.call(message, "exponentialHistogram")) + $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(message.exponentialHistogram, writer.uint32(/* id 10, wireType 2 =*/ 82).fork()).ldelim(); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + $root.opentelemetry.proto.metrics.v1.Summary.encode(message.summary, writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {opentelemetry.proto.metrics.v1.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Metric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.unit = reader.string(); + break; + } + case 5: { + message.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.decode(reader, reader.uint32()); + break; + } + case 7: { + message.sum = $root.opentelemetry.proto.metrics.v1.Sum.decode(reader, reader.uint32()); + break; + } + case 9: { + message.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.decode(reader, reader.uint32()); + break; + } + case 10: { + message.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(reader, reader.uint32()); + break; + } + case 11: { + message.summary = $root.opentelemetry.proto.metrics.v1.Summary.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Metric message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.gauge != null && message.hasOwnProperty("gauge")) { + properties.data = 1; + { + var error = $root.opentelemetry.proto.metrics.v1.Gauge.verify(message.gauge); + if (error) + return "gauge." + error; + } + } + if (message.sum != null && message.hasOwnProperty("sum")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.opentelemetry.proto.metrics.v1.Sum.verify(message.sum); + if (error) + return "sum." + error; + } + } + if (message.histogram != null && message.hasOwnProperty("histogram")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.opentelemetry.proto.metrics.v1.Histogram.verify(message.histogram); + if (error) + return "histogram." + error; + } + } + if (message.exponentialHistogram != null && message.hasOwnProperty("exponentialHistogram")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(message.exponentialHistogram); + if (error) + return "exponentialHistogram." + error; + } + } + if (message.summary != null && message.hasOwnProperty("summary")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.opentelemetry.proto.metrics.v1.Summary.verify(message.summary); + if (error) + return "summary." + error; + } + } + return null; + }; + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Metric) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Metric(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.unit != null) + message.unit = String(object.unit); + if (object.gauge != null) { + if (typeof object.gauge !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected"); + message.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.fromObject(object.gauge); + } + if (object.sum != null) { + if (typeof object.sum !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected"); + message.sum = $root.opentelemetry.proto.metrics.v1.Sum.fromObject(object.sum); + } + if (object.histogram != null) { + if (typeof object.histogram !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected"); + message.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.fromObject(object.histogram); + } + if (object.exponentialHistogram != null) { + if (typeof object.exponentialHistogram !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected"); + message.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(object.exponentialHistogram); + } + if (object.summary != null) { + if (typeof object.summary !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected"); + message.summary = $root.opentelemetry.proto.metrics.v1.Summary.fromObject(object.summary); + } + return message; + }; + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {opentelemetry.proto.metrics.v1.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.unit = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + if (message.gauge != null && message.hasOwnProperty("gauge")) { + object.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.toObject(message.gauge, options); + if (options.oneofs) + object.data = "gauge"; + } + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = $root.opentelemetry.proto.metrics.v1.Sum.toObject(message.sum, options); + if (options.oneofs) + object.data = "sum"; + } + if (message.histogram != null && message.hasOwnProperty("histogram")) { + object.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.toObject(message.histogram, options); + if (options.oneofs) + object.data = "histogram"; + } + if (message.exponentialHistogram != null && message.hasOwnProperty("exponentialHistogram")) { + object.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(message.exponentialHistogram, options); + if (options.oneofs) + object.data = "exponentialHistogram"; + } + if (message.summary != null && message.hasOwnProperty("summary")) { + object.summary = $root.opentelemetry.proto.metrics.v1.Summary.toObject(message.summary, options); + if (options.oneofs) + object.data = "summary"; + } + return object; + }; + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Metric"; + }; + return Metric; + })(); + v1.Gauge = (function () { + /** + * Properties of a Gauge. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IGauge + * @property {Array.|null} [dataPoints] Gauge dataPoints + */ + /** + * Constructs a new Gauge. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a Gauge. + * @implements IGauge + * @constructor + * @param {opentelemetry.proto.metrics.v1.IGauge=} [properties] Properties to set + */ + function Gauge(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Gauge dataPoints. + * @member {Array.} dataPoints + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @instance + */ + Gauge.prototype.dataPoints = $util.emptyArray; + /** + * Creates a new Gauge instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {opentelemetry.proto.metrics.v1.IGauge=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge instance + */ + Gauge.create = function create(properties) { + return new Gauge(properties); + }; + /** + * Encodes the specified Gauge message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Gauge.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {opentelemetry.proto.metrics.v1.IGauge} message Gauge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gauge.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified Gauge message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Gauge.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {opentelemetry.proto.metrics.v1.IGauge} message Gauge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gauge.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Gauge message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gauge.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Gauge(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Gauge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gauge.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Gauge message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Gauge.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + return null; + }; + /** + * Creates a Gauge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge + */ + Gauge.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Gauge) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Gauge(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected"); + message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(object.dataPoints[i]); + } + } + return message; + }; + /** + * Creates a plain object from a Gauge message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {opentelemetry.proto.metrics.v1.Gauge} message Gauge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Gauge.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j], options); + } + return object; + }; + /** + * Converts this Gauge to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @instance + * @returns {Object.} JSON object + */ + Gauge.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Gauge + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Gauge + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Gauge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Gauge"; + }; + return Gauge; + })(); + v1.Sum = (function () { + /** + * Properties of a Sum. + * @memberof opentelemetry.proto.metrics.v1 + * @interface ISum + * @property {Array.|null} [dataPoints] Sum dataPoints + * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] Sum aggregationTemporality + * @property {boolean|null} [isMonotonic] Sum isMonotonic + */ + /** + * Constructs a new Sum. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a Sum. + * @implements ISum + * @constructor + * @param {opentelemetry.proto.metrics.v1.ISum=} [properties] Properties to set + */ + function Sum(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Sum dataPoints. + * @member {Array.} dataPoints + * @memberof opentelemetry.proto.metrics.v1.Sum + * @instance + */ + Sum.prototype.dataPoints = $util.emptyArray; + /** + * Sum aggregationTemporality. + * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality + * @memberof opentelemetry.proto.metrics.v1.Sum + * @instance + */ + Sum.prototype.aggregationTemporality = null; + /** + * Sum isMonotonic. + * @member {boolean|null|undefined} isMonotonic + * @memberof opentelemetry.proto.metrics.v1.Sum + * @instance + */ + Sum.prototype.isMonotonic = null; + /** + * Creates a new Sum instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {opentelemetry.proto.metrics.v1.ISum=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Sum} Sum instance + */ + Sum.create = function create(properties) { + return new Sum(properties); + }; + /** + * Encodes the specified Sum message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Sum.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {opentelemetry.proto.metrics.v1.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, "aggregationTemporality")) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality); + if (message.isMonotonic != null && Object.hasOwnProperty.call(message, "isMonotonic")) + writer.uint32(/* id 3, wireType 0 =*/ 24).bool(message.isMonotonic); + return writer; + }; + /** + * Encodes the specified Sum message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Sum.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {opentelemetry.proto.metrics.v1.ISum} message Sum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Sum message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Sum(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(reader, reader.uint32())); + break; + } + case 2: { + message.aggregationTemporality = reader.int32(); + break; + } + case 3: { + message.isMonotonic = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Sum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Sum} Sum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Sum message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + switch (message.aggregationTemporality) { + default: + return "aggregationTemporality: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.isMonotonic != null && message.hasOwnProperty("isMonotonic")) + if (typeof message.isMonotonic !== "boolean") + return "isMonotonic: boolean expected"; + return null; + }; + /** + * Creates a Sum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Sum} Sum + */ + Sum.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Sum) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Sum(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected"); + message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(object.dataPoints[i]); + } + } + switch (object.aggregationTemporality) { + default: + if (typeof object.aggregationTemporality === "number") { + message.aggregationTemporality = object.aggregationTemporality; + break; + } + break; + case "AGGREGATION_TEMPORALITY_UNSPECIFIED": + case 0: + message.aggregationTemporality = 0; + break; + case "AGGREGATION_TEMPORALITY_DELTA": + case 1: + message.aggregationTemporality = 1; + break; + case "AGGREGATION_TEMPORALITY_CUMULATIVE": + case 2: + message.aggregationTemporality = 2; + break; + } + if (object.isMonotonic != null) + message.isMonotonic = Boolean(object.isMonotonic); + return message; + }; + /** + * Creates a plain object from a Sum message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {opentelemetry.proto.metrics.v1.Sum} message Sum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sum.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (options.defaults) { + object.aggregationTemporality = options.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0; + object.isMonotonic = false; + } + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j], options); + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality; + if (message.isMonotonic != null && message.hasOwnProperty("isMonotonic")) + object.isMonotonic = message.isMonotonic; + return object; + }; + /** + * Converts this Sum to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Sum + * @instance + * @returns {Object.} JSON object + */ + Sum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Sum + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Sum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Sum"; + }; + return Sum; + })(); + v1.Histogram = (function () { + /** + * Properties of a Histogram. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IHistogram + * @property {Array.|null} [dataPoints] Histogram dataPoints + * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] Histogram aggregationTemporality + */ + /** + * Constructs a new Histogram. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a Histogram. + * @implements IHistogram + * @constructor + * @param {opentelemetry.proto.metrics.v1.IHistogram=} [properties] Properties to set + */ + function Histogram(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Histogram dataPoints. + * @member {Array.} dataPoints + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @instance + */ + Histogram.prototype.dataPoints = $util.emptyArray; + /** + * Histogram aggregationTemporality. + * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @instance + */ + Histogram.prototype.aggregationTemporality = null; + /** + * Creates a new Histogram instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogram=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram instance + */ + Histogram.create = function create(properties) { + return new Histogram(properties); + }; + /** + * Encodes the specified Histogram message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Histogram.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogram} message Histogram message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Histogram.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, "aggregationTemporality")) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality); + return writer; + }; + /** + * Encodes the specified Histogram message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Histogram.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogram} message Histogram message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Histogram.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Histogram message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Histogram.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Histogram(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(reader, reader.uint32())); + break; + } + case 2: { + message.aggregationTemporality = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Histogram message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Histogram.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Histogram message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Histogram.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + switch (message.aggregationTemporality) { + default: + return "aggregationTemporality: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + /** + * Creates a Histogram message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram + */ + Histogram.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Histogram) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Histogram(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected"); + message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(object.dataPoints[i]); + } + } + switch (object.aggregationTemporality) { + default: + if (typeof object.aggregationTemporality === "number") { + message.aggregationTemporality = object.aggregationTemporality; + break; + } + break; + case "AGGREGATION_TEMPORALITY_UNSPECIFIED": + case 0: + message.aggregationTemporality = 0; + break; + case "AGGREGATION_TEMPORALITY_DELTA": + case 1: + message.aggregationTemporality = 1; + break; + case "AGGREGATION_TEMPORALITY_CUMULATIVE": + case 2: + message.aggregationTemporality = 2; + break; + } + return message; + }; + /** + * Creates a plain object from a Histogram message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {opentelemetry.proto.metrics.v1.Histogram} message Histogram + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Histogram.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (options.defaults) + object.aggregationTemporality = options.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0; + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(message.dataPoints[j], options); + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality; + return object; + }; + /** + * Converts this Histogram to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @instance + * @returns {Object.} JSON object + */ + Histogram.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Histogram + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Histogram + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Histogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Histogram"; + }; + return Histogram; + })(); + v1.ExponentialHistogram = (function () { + /** + * Properties of an ExponentialHistogram. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IExponentialHistogram + * @property {Array.|null} [dataPoints] ExponentialHistogram dataPoints + * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] ExponentialHistogram aggregationTemporality + */ + /** + * Constructs a new ExponentialHistogram. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents an ExponentialHistogram. + * @implements IExponentialHistogram + * @constructor + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram=} [properties] Properties to set + */ + function ExponentialHistogram(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExponentialHistogram dataPoints. + * @member {Array.} dataPoints + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @instance + */ + ExponentialHistogram.prototype.dataPoints = $util.emptyArray; + /** + * ExponentialHistogram aggregationTemporality. + * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @instance + */ + ExponentialHistogram.prototype.aggregationTemporality = null; + /** + * Creates a new ExponentialHistogram instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram instance + */ + ExponentialHistogram.create = function create(properties) { + return new ExponentialHistogram(properties); + }; + /** + * Encodes the specified ExponentialHistogram message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogram.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram} message ExponentialHistogram message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExponentialHistogram.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, "aggregationTemporality")) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality); + return writer; + }; + /** + * Encodes the specified ExponentialHistogram message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogram.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram} message ExponentialHistogram message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExponentialHistogram.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExponentialHistogram message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExponentialHistogram.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogram(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(reader, reader.uint32())); + break; + } + case 2: { + message.aggregationTemporality = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExponentialHistogram message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExponentialHistogram.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExponentialHistogram message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExponentialHistogram.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + switch (message.aggregationTemporality) { + default: + return "aggregationTemporality: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + /** + * Creates an ExponentialHistogram message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram + */ + ExponentialHistogram.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogram) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogram(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected"); + message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(object.dataPoints[i]); + } + } + switch (object.aggregationTemporality) { + default: + if (typeof object.aggregationTemporality === "number") { + message.aggregationTemporality = object.aggregationTemporality; + break; + } + break; + case "AGGREGATION_TEMPORALITY_UNSPECIFIED": + case 0: + message.aggregationTemporality = 0; + break; + case "AGGREGATION_TEMPORALITY_DELTA": + case 1: + message.aggregationTemporality = 1; + break; + case "AGGREGATION_TEMPORALITY_CUMULATIVE": + case 2: + message.aggregationTemporality = 2; + break; + } + return message; + }; + /** + * Creates a plain object from an ExponentialHistogram message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogram} message ExponentialHistogram + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExponentialHistogram.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (options.defaults) + object.aggregationTemporality = options.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0; + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(message.dataPoints[j], options); + } + if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) + object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality; + return object; + }; + /** + * Converts this ExponentialHistogram to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @instance + * @returns {Object.} JSON object + */ + ExponentialHistogram.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExponentialHistogram + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExponentialHistogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ExponentialHistogram"; + }; + return ExponentialHistogram; + })(); + v1.Summary = (function () { + /** + * Properties of a Summary. + * @memberof opentelemetry.proto.metrics.v1 + * @interface ISummary + * @property {Array.|null} [dataPoints] Summary dataPoints + */ + /** + * Constructs a new Summary. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a Summary. + * @implements ISummary + * @constructor + * @param {opentelemetry.proto.metrics.v1.ISummary=} [properties] Properties to set + */ + function Summary(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Summary dataPoints. + * @member {Array.} dataPoints + * @memberof opentelemetry.proto.metrics.v1.Summary + * @instance + */ + Summary.prototype.dataPoints = $util.emptyArray; + /** + * Creates a new Summary instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {opentelemetry.proto.metrics.v1.ISummary=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Summary} Summary instance + */ + Summary.create = function create(properties) { + return new Summary(properties); + }; + /** + * Encodes the specified Summary message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Summary.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {opentelemetry.proto.metrics.v1.ISummary} message Summary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Summary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified Summary message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Summary.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {opentelemetry.proto.metrics.v1.ISummary} message Summary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Summary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Summary message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Summary} Summary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Summary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Summary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Summary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Summary} Summary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Summary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Summary message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Summary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + return null; + }; + /** + * Creates a Summary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Summary} Summary + */ + Summary.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Summary) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Summary(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected"); + message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(object.dataPoints[i]); + } + } + return message; + }; + /** + * Creates a plain object from a Summary message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {opentelemetry.proto.metrics.v1.Summary} message Summary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Summary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(message.dataPoints[j], options); + } + return object; + }; + /** + * Converts this Summary to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Summary + * @instance + * @returns {Object.} JSON object + */ + Summary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Summary + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Summary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Summary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Summary"; + }; + return Summary; + })(); + /** + * AggregationTemporality enum. + * @name opentelemetry.proto.metrics.v1.AggregationTemporality + * @enum {number} + * @property {number} AGGREGATION_TEMPORALITY_UNSPECIFIED=0 AGGREGATION_TEMPORALITY_UNSPECIFIED value + * @property {number} AGGREGATION_TEMPORALITY_DELTA=1 AGGREGATION_TEMPORALITY_DELTA value + * @property {number} AGGREGATION_TEMPORALITY_CUMULATIVE=2 AGGREGATION_TEMPORALITY_CUMULATIVE value + */ + v1.AggregationTemporality = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AGGREGATION_TEMPORALITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "AGGREGATION_TEMPORALITY_DELTA"] = 1; + values[valuesById[2] = "AGGREGATION_TEMPORALITY_CUMULATIVE"] = 2; + return values; + })(); + /** + * DataPointFlags enum. + * @name opentelemetry.proto.metrics.v1.DataPointFlags + * @enum {number} + * @property {number} DATA_POINT_FLAGS_DO_NOT_USE=0 DATA_POINT_FLAGS_DO_NOT_USE value + * @property {number} DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK=1 DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK value + */ + v1.DataPointFlags = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_POINT_FLAGS_DO_NOT_USE"] = 0; + values[valuesById[1] = "DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"] = 1; + return values; + })(); + v1.NumberDataPoint = (function () { + /** + * Properties of a NumberDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @interface INumberDataPoint + * @property {Array.|null} [attributes] NumberDataPoint attributes + * @property {number|Long|null} [startTimeUnixNano] NumberDataPoint startTimeUnixNano + * @property {number|Long|null} [timeUnixNano] NumberDataPoint timeUnixNano + * @property {number|null} [asDouble] NumberDataPoint asDouble + * @property {number|Long|null} [asInt] NumberDataPoint asInt + * @property {Array.|null} [exemplars] NumberDataPoint exemplars + * @property {number|null} [flags] NumberDataPoint flags + */ + /** + * Constructs a new NumberDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a NumberDataPoint. + * @implements INumberDataPoint + * @constructor + * @param {opentelemetry.proto.metrics.v1.INumberDataPoint=} [properties] Properties to set + */ + function NumberDataPoint(properties) { + this.attributes = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * NumberDataPoint attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.attributes = $util.emptyArray; + /** + * NumberDataPoint startTimeUnixNano. + * @member {number|Long|null|undefined} startTimeUnixNano + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.startTimeUnixNano = null; + /** + * NumberDataPoint timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.timeUnixNano = null; + /** + * NumberDataPoint asDouble. + * @member {number|null|undefined} asDouble + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.asDouble = null; + /** + * NumberDataPoint asInt. + * @member {number|Long|null|undefined} asInt + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.asInt = null; + /** + * NumberDataPoint exemplars. + * @member {Array.} exemplars + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.exemplars = $util.emptyArray; + /** + * NumberDataPoint flags. + * @member {number|null|undefined} flags + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + NumberDataPoint.prototype.flags = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * NumberDataPoint value. + * @member {"asDouble"|"asInt"|undefined} value + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + */ + Object.defineProperty(NumberDataPoint.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["asDouble", "asInt"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new NumberDataPoint instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.INumberDataPoint=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint instance + */ + NumberDataPoint.create = function create(properties) { + return new NumberDataPoint(properties); + }; + /** + * Encodes the specified NumberDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.NumberDataPoint.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.INumberDataPoint} message NumberDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumberDataPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) + writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); + if (message.asDouble != null && Object.hasOwnProperty.call(message, "asDouble")) + writer.uint32(/* id 4, wireType 1 =*/ 33).double(message.asDouble); + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); + if (message.asInt != null && Object.hasOwnProperty.call(message, "asInt")) + writer.uint32(/* id 6, wireType 1 =*/ 49).sfixed64(message.asInt); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 8, wireType 0 =*/ 64).uint32(message.flags); + return writer; + }; + /** + * Encodes the specified NumberDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.NumberDataPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.INumberDataPoint} message NumberDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumberDataPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a NumberDataPoint message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumberDataPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.NumberDataPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.startTimeUnixNano = reader.fixed64(); + break; + } + case 3: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 4: { + message.asDouble = reader.double(); + break; + } + case 6: { + message.asInt = reader.sfixed64(); + break; + } + case 5: { + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32())); + break; + } + case 8: { + message.flags = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a NumberDataPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumberDataPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a NumberDataPoint message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumberDataPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) + return "startTimeUnixNano: integer|Long expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.asDouble != null && message.hasOwnProperty("asDouble")) { + properties.value = 1; + if (typeof message.asDouble !== "number") + return "asDouble: number expected"; + } + if (message.asInt != null && message.hasOwnProperty("asInt")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.asInt) && !(message.asInt && $util.isInteger(message.asInt.low) && $util.isInteger(message.asInt.high))) + return "asInt: integer|Long expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + return null; + }; + /** + * Creates a NumberDataPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint + */ + NumberDataPoint.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.NumberDataPoint) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.NumberDataPoint(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.startTimeUnixNano != null) + if ($util.Long) + (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; + else if (typeof object.startTimeUnixNano === "string") + message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); + else if (typeof object.startTimeUnixNano === "number") + message.startTimeUnixNano = object.startTimeUnixNano; + else if (typeof object.startTimeUnixNano === "object") + message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.asDouble != null) + message.asDouble = Number(object.asDouble); + if (object.asInt != null) + if ($util.Long) + (message.asInt = $util.Long.fromValue(object.asInt)).unsigned = false; + else if (typeof object.asInt === "string") + message.asInt = parseInt(object.asInt, 10); + else if (typeof object.asInt === "number") + message.asInt = object.asInt; + else if (typeof object.asInt === "object") + message.asInt = new $util.LongBits(object.asInt.low >>> 0, object.asInt.high >>> 0).toNumber(); + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected"); + message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]); + } + } + if (object.flags != null) + message.flags = object.flags >>> 0; + return message; + }; + /** + * Creates a plain object from a NumberDataPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.NumberDataPoint} message NumberDataPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumberDataPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.exemplars = []; + object.attributes = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.startTimeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + object.flags = 0; + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (typeof message.startTimeUnixNano === "number") + object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; + else + object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.asDouble != null && message.hasOwnProperty("asDouble")) { + object.asDouble = options.json && !isFinite(message.asDouble) ? String(message.asDouble) : message.asDouble; + if (options.oneofs) + object.value = "asDouble"; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options); + } + if (message.asInt != null && message.hasOwnProperty("asInt")) { + if (typeof message.asInt === "number") + object.asInt = options.longs === String ? String(message.asInt) : message.asInt; + else + object.asInt = options.longs === String ? $util.Long.prototype.toString.call(message.asInt) : options.longs === Number ? new $util.LongBits(message.asInt.low >>> 0, message.asInt.high >>> 0).toNumber() : message.asInt; + if (options.oneofs) + object.value = "asInt"; + } + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + return object; + }; + /** + * Converts this NumberDataPoint to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @instance + * @returns {Object.} JSON object + */ + NumberDataPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for NumberDataPoint + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumberDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.NumberDataPoint"; + }; + return NumberDataPoint; + })(); + v1.HistogramDataPoint = (function () { + /** + * Properties of a HistogramDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IHistogramDataPoint + * @property {Array.|null} [attributes] HistogramDataPoint attributes + * @property {number|Long|null} [startTimeUnixNano] HistogramDataPoint startTimeUnixNano + * @property {number|Long|null} [timeUnixNano] HistogramDataPoint timeUnixNano + * @property {number|Long|null} [count] HistogramDataPoint count + * @property {number|null} [sum] HistogramDataPoint sum + * @property {Array.|null} [bucketCounts] HistogramDataPoint bucketCounts + * @property {Array.|null} [explicitBounds] HistogramDataPoint explicitBounds + * @property {Array.|null} [exemplars] HistogramDataPoint exemplars + * @property {number|null} [flags] HistogramDataPoint flags + * @property {number|null} [min] HistogramDataPoint min + * @property {number|null} [max] HistogramDataPoint max + */ + /** + * Constructs a new HistogramDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a HistogramDataPoint. + * @implements IHistogramDataPoint + * @constructor + * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint=} [properties] Properties to set + */ + function HistogramDataPoint(properties) { + this.attributes = []; + this.bucketCounts = []; + this.explicitBounds = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * HistogramDataPoint attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.attributes = $util.emptyArray; + /** + * HistogramDataPoint startTimeUnixNano. + * @member {number|Long|null|undefined} startTimeUnixNano + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.startTimeUnixNano = null; + /** + * HistogramDataPoint timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.timeUnixNano = null; + /** + * HistogramDataPoint count. + * @member {number|Long|null|undefined} count + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.count = null; + /** + * HistogramDataPoint sum. + * @member {number|null|undefined} sum + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.sum = null; + /** + * HistogramDataPoint bucketCounts. + * @member {Array.} bucketCounts + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.bucketCounts = $util.emptyArray; + /** + * HistogramDataPoint explicitBounds. + * @member {Array.} explicitBounds + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.explicitBounds = $util.emptyArray; + /** + * HistogramDataPoint exemplars. + * @member {Array.} exemplars + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.exemplars = $util.emptyArray; + /** + * HistogramDataPoint flags. + * @member {number|null|undefined} flags + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.flags = null; + /** + * HistogramDataPoint min. + * @member {number|null|undefined} min + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.min = null; + /** + * HistogramDataPoint max. + * @member {number|null|undefined} max + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + HistogramDataPoint.prototype.max = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * HistogramDataPoint _sum. + * @member {"sum"|undefined} _sum + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + Object.defineProperty(HistogramDataPoint.prototype, "_sum", { + get: $util.oneOfGetter($oneOfFields = ["sum"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * HistogramDataPoint _min. + * @member {"min"|undefined} _min + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + Object.defineProperty(HistogramDataPoint.prototype, "_min", { + get: $util.oneOfGetter($oneOfFields = ["min"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * HistogramDataPoint _max. + * @member {"max"|undefined} _max + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + */ + Object.defineProperty(HistogramDataPoint.prototype, "_max", { + get: $util.oneOfGetter($oneOfFields = ["max"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new HistogramDataPoint instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint instance + */ + HistogramDataPoint.create = function create(properties) { + return new HistogramDataPoint(properties); + }; + /** + * Encodes the specified HistogramDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.HistogramDataPoint.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint} message HistogramDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistogramDataPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) + writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 6, wireType 2 =*/ 50).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.fixed64(message.bucketCounts[i]); + writer.ldelim(); + } + if (message.explicitBounds != null && message.explicitBounds.length) { + writer.uint32(/* id 7, wireType 2 =*/ 58).fork(); + for (var i = 0; i < message.explicitBounds.length; ++i) + writer.double(message.explicitBounds[i]); + writer.ldelim(); + } + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 8, wireType 2 =*/ 66).fork()).ldelim(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.flags); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 11, wireType 1 =*/ 89).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 12, wireType 1 =*/ 97).double(message.max); + return writer; + }; + /** + * Encodes the specified HistogramDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.HistogramDataPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint} message HistogramDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistogramDataPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a HistogramDataPoint message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistogramDataPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.HistogramDataPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 9: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.startTimeUnixNano = reader.fixed64(); + break; + } + case 3: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 4: { + message.count = reader.fixed64(); + break; + } + case 5: { + message.sum = reader.double(); + break; + } + case 6: { + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.fixed64()); + } + else + message.bucketCounts.push(reader.fixed64()); + break; + } + case 7: { + if (!(message.explicitBounds && message.explicitBounds.length)) + message.explicitBounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.explicitBounds.push(reader.double()); + } + else + message.explicitBounds.push(reader.double()); + break; + } + case 8: { + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32())); + break; + } + case 10: { + message.flags = reader.uint32(); + break; + } + case 11: { + message.min = reader.double(); + break; + } + case 12: { + message.max = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a HistogramDataPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistogramDataPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a HistogramDataPoint message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistogramDataPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) + return "startTimeUnixNano: integer|Long expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.sum != null && message.hasOwnProperty("sum")) { + properties._sum = 1; + if (typeof message.sum !== "number") + return "sum: number expected"; + } + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + if (message.explicitBounds != null && message.hasOwnProperty("explicitBounds")) { + if (!Array.isArray(message.explicitBounds)) + return "explicitBounds: array expected"; + for (var i = 0; i < message.explicitBounds.length; ++i) + if (typeof message.explicitBounds[i] !== "number") + return "explicitBounds: number[] expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + if (message.min != null && message.hasOwnProperty("min")) { + properties._min = 1; + if (typeof message.min !== "number") + return "min: number expected"; + } + if (message.max != null && message.hasOwnProperty("max")) { + properties._max = 1; + if (typeof message.max !== "number") + return "max: number expected"; + } + return null; + }; + /** + * Creates a HistogramDataPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint + */ + HistogramDataPoint.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.HistogramDataPoint) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.HistogramDataPoint(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.startTimeUnixNano != null) + if ($util.Long) + (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; + else if (typeof object.startTimeUnixNano === "string") + message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); + else if (typeof object.startTimeUnixNano === "number") + message.startTimeUnixNano = object.startTimeUnixNano; + else if (typeof object.startTimeUnixNano === "object") + message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.sum != null) + message.sum = Number(object.sum); + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + } + if (object.explicitBounds) { + if (!Array.isArray(object.explicitBounds)) + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected"); + message.explicitBounds = []; + for (var i = 0; i < object.explicitBounds.length; ++i) + message.explicitBounds[i] = Number(object.explicitBounds[i]); + } + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected"); + message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]); + } + } + if (object.flags != null) + message.flags = object.flags >>> 0; + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + return message; + }; + /** + * Creates a plain object from a HistogramDataPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.HistogramDataPoint} message HistogramDataPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistogramDataPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bucketCounts = []; + object.explicitBounds = []; + object.exemplars = []; + object.attributes = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.startTimeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.count = options.longs === String ? "0" : 0; + object.flags = 0; + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (typeof message.startTimeUnixNano === "number") + object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; + else + object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum; + if (options.oneofs) + object._sum = "sum"; + } + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + } + if (message.explicitBounds && message.explicitBounds.length) { + object.explicitBounds = []; + for (var j = 0; j < message.explicitBounds.length; ++j) + object.explicitBounds[j] = options.json && !isFinite(message.explicitBounds[j]) ? String(message.explicitBounds[j]) : message.explicitBounds[j]; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options); + } + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + if (message.min != null && message.hasOwnProperty("min")) { + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (options.oneofs) + object._min = "min"; + } + if (message.max != null && message.hasOwnProperty("max")) { + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + if (options.oneofs) + object._max = "max"; + } + return object; + }; + /** + * Converts this HistogramDataPoint to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @instance + * @returns {Object.} JSON object + */ + HistogramDataPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for HistogramDataPoint + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HistogramDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.HistogramDataPoint"; + }; + return HistogramDataPoint; + })(); + v1.ExponentialHistogramDataPoint = (function () { + /** + * Properties of an ExponentialHistogramDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IExponentialHistogramDataPoint + * @property {Array.|null} [attributes] ExponentialHistogramDataPoint attributes + * @property {number|Long|null} [startTimeUnixNano] ExponentialHistogramDataPoint startTimeUnixNano + * @property {number|Long|null} [timeUnixNano] ExponentialHistogramDataPoint timeUnixNano + * @property {number|Long|null} [count] ExponentialHistogramDataPoint count + * @property {number|null} [sum] ExponentialHistogramDataPoint sum + * @property {number|null} [scale] ExponentialHistogramDataPoint scale + * @property {number|Long|null} [zeroCount] ExponentialHistogramDataPoint zeroCount + * @property {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null} [positive] ExponentialHistogramDataPoint positive + * @property {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null} [negative] ExponentialHistogramDataPoint negative + * @property {number|null} [flags] ExponentialHistogramDataPoint flags + * @property {Array.|null} [exemplars] ExponentialHistogramDataPoint exemplars + * @property {number|null} [min] ExponentialHistogramDataPoint min + * @property {number|null} [max] ExponentialHistogramDataPoint max + * @property {number|null} [zeroThreshold] ExponentialHistogramDataPoint zeroThreshold + */ + /** + * Constructs a new ExponentialHistogramDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents an ExponentialHistogramDataPoint. + * @implements IExponentialHistogramDataPoint + * @constructor + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint=} [properties] Properties to set + */ + function ExponentialHistogramDataPoint(properties) { + this.attributes = []; + this.exemplars = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ExponentialHistogramDataPoint attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.attributes = $util.emptyArray; + /** + * ExponentialHistogramDataPoint startTimeUnixNano. + * @member {number|Long|null|undefined} startTimeUnixNano + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.startTimeUnixNano = null; + /** + * ExponentialHistogramDataPoint timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.timeUnixNano = null; + /** + * ExponentialHistogramDataPoint count. + * @member {number|Long|null|undefined} count + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.count = null; + /** + * ExponentialHistogramDataPoint sum. + * @member {number|null|undefined} sum + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.sum = null; + /** + * ExponentialHistogramDataPoint scale. + * @member {number|null|undefined} scale + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.scale = null; + /** + * ExponentialHistogramDataPoint zeroCount. + * @member {number|Long|null|undefined} zeroCount + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.zeroCount = null; + /** + * ExponentialHistogramDataPoint positive. + * @member {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null|undefined} positive + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.positive = null; + /** + * ExponentialHistogramDataPoint negative. + * @member {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null|undefined} negative + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.negative = null; + /** + * ExponentialHistogramDataPoint flags. + * @member {number|null|undefined} flags + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.flags = null; + /** + * ExponentialHistogramDataPoint exemplars. + * @member {Array.} exemplars + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.exemplars = $util.emptyArray; + /** + * ExponentialHistogramDataPoint min. + * @member {number|null|undefined} min + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.min = null; + /** + * ExponentialHistogramDataPoint max. + * @member {number|null|undefined} max + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.max = null; + /** + * ExponentialHistogramDataPoint zeroThreshold. + * @member {number|null|undefined} zeroThreshold + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + ExponentialHistogramDataPoint.prototype.zeroThreshold = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * ExponentialHistogramDataPoint _sum. + * @member {"sum"|undefined} _sum + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + Object.defineProperty(ExponentialHistogramDataPoint.prototype, "_sum", { + get: $util.oneOfGetter($oneOfFields = ["sum"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * ExponentialHistogramDataPoint _min. + * @member {"min"|undefined} _min + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + Object.defineProperty(ExponentialHistogramDataPoint.prototype, "_min", { + get: $util.oneOfGetter($oneOfFields = ["min"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * ExponentialHistogramDataPoint _max. + * @member {"max"|undefined} _max + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + */ + Object.defineProperty(ExponentialHistogramDataPoint.prototype, "_max", { + get: $util.oneOfGetter($oneOfFields = ["max"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new ExponentialHistogramDataPoint instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint instance + */ + ExponentialHistogramDataPoint.create = function create(properties) { + return new ExponentialHistogramDataPoint(properties); + }; + /** + * Encodes the specified ExponentialHistogramDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint} message ExponentialHistogramDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExponentialHistogramDataPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) + writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 6, wireType 0 =*/ 48).sint32(message.scale); + if (message.zeroCount != null && Object.hasOwnProperty.call(message, "zeroCount")) + writer.uint32(/* id 7, wireType 1 =*/ 57).fixed64(message.zeroCount); + if (message.positive != null && Object.hasOwnProperty.call(message, "positive")) + $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(message.positive, writer.uint32(/* id 8, wireType 2 =*/ 66).fork()).ldelim(); + if (message.negative != null && Object.hasOwnProperty.call(message, "negative")) + $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(message.negative, writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.flags); + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 12, wireType 1 =*/ 97).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 13, wireType 1 =*/ 105).double(message.max); + if (message.zeroThreshold != null && Object.hasOwnProperty.call(message, "zeroThreshold")) + writer.uint32(/* id 14, wireType 1 =*/ 113).double(message.zeroThreshold); + return writer; + }; + /** + * Encodes the specified ExponentialHistogramDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint} message ExponentialHistogramDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExponentialHistogramDataPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an ExponentialHistogramDataPoint message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExponentialHistogramDataPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.startTimeUnixNano = reader.fixed64(); + break; + } + case 3: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 4: { + message.count = reader.fixed64(); + break; + } + case 5: { + message.sum = reader.double(); + break; + } + case 6: { + message.scale = reader.sint32(); + break; + } + case 7: { + message.zeroCount = reader.fixed64(); + break; + } + case 8: { + message.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(reader, reader.uint32()); + break; + } + case 9: { + message.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(reader, reader.uint32()); + break; + } + case 10: { + message.flags = reader.uint32(); + break; + } + case 11: { + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32())); + break; + } + case 12: { + message.min = reader.double(); + break; + } + case 13: { + message.max = reader.double(); + break; + } + case 14: { + message.zeroThreshold = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an ExponentialHistogramDataPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExponentialHistogramDataPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an ExponentialHistogramDataPoint message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExponentialHistogramDataPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) + return "startTimeUnixNano: integer|Long expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.sum != null && message.hasOwnProperty("sum")) { + properties._sum = 1; + if (typeof message.sum !== "number") + return "sum: number expected"; + } + if (message.scale != null && message.hasOwnProperty("scale")) + if (!$util.isInteger(message.scale)) + return "scale: integer expected"; + if (message.zeroCount != null && message.hasOwnProperty("zeroCount")) + if (!$util.isInteger(message.zeroCount) && !(message.zeroCount && $util.isInteger(message.zeroCount.low) && $util.isInteger(message.zeroCount.high))) + return "zeroCount: integer|Long expected"; + if (message.positive != null && message.hasOwnProperty("positive")) { + var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(message.positive); + if (error) + return "positive." + error; + } + if (message.negative != null && message.hasOwnProperty("negative")) { + var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(message.negative); + if (error) + return "negative." + error; + } + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + if (message.min != null && message.hasOwnProperty("min")) { + properties._min = 1; + if (typeof message.min !== "number") + return "min: number expected"; + } + if (message.max != null && message.hasOwnProperty("max")) { + properties._max = 1; + if (typeof message.max !== "number") + return "max: number expected"; + } + if (message.zeroThreshold != null && message.hasOwnProperty("zeroThreshold")) + if (typeof message.zeroThreshold !== "number") + return "zeroThreshold: number expected"; + return null; + }; + /** + * Creates an ExponentialHistogramDataPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint + */ + ExponentialHistogramDataPoint.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.startTimeUnixNano != null) + if ($util.Long) + (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; + else if (typeof object.startTimeUnixNano === "string") + message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); + else if (typeof object.startTimeUnixNano === "number") + message.startTimeUnixNano = object.startTimeUnixNano; + else if (typeof object.startTimeUnixNano === "object") + message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.sum != null) + message.sum = Number(object.sum); + if (object.scale != null) + message.scale = object.scale | 0; + if (object.zeroCount != null) + if ($util.Long) + (message.zeroCount = $util.Long.fromValue(object.zeroCount)).unsigned = false; + else if (typeof object.zeroCount === "string") + message.zeroCount = parseInt(object.zeroCount, 10); + else if (typeof object.zeroCount === "number") + message.zeroCount = object.zeroCount; + else if (typeof object.zeroCount === "object") + message.zeroCount = new $util.LongBits(object.zeroCount.low >>> 0, object.zeroCount.high >>> 0).toNumber(); + if (object.positive != null) { + if (typeof object.positive !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected"); + message.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(object.positive); + } + if (object.negative != null) { + if (typeof object.negative !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected"); + message.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(object.negative); + } + if (object.flags != null) + message.flags = object.flags >>> 0; + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected"); + message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]); + } + } + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + if (object.zeroThreshold != null) + message.zeroThreshold = Number(object.zeroThreshold); + return message; + }; + /** + * Creates a plain object from an ExponentialHistogramDataPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} message ExponentialHistogramDataPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExponentialHistogramDataPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.attributes = []; + object.exemplars = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.startTimeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.count = options.longs === String ? "0" : 0; + object.scale = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.zeroCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.zeroCount = options.longs === String ? "0" : 0; + object.positive = null; + object.negative = null; + object.flags = 0; + object.zeroThreshold = 0; + } + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (typeof message.startTimeUnixNano === "number") + object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; + else + object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.sum != null && message.hasOwnProperty("sum")) { + object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum; + if (options.oneofs) + object._sum = "sum"; + } + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = message.scale; + if (message.zeroCount != null && message.hasOwnProperty("zeroCount")) + if (typeof message.zeroCount === "number") + object.zeroCount = options.longs === String ? String(message.zeroCount) : message.zeroCount; + else + object.zeroCount = options.longs === String ? $util.Long.prototype.toString.call(message.zeroCount) : options.longs === Number ? new $util.LongBits(message.zeroCount.low >>> 0, message.zeroCount.high >>> 0).toNumber() : message.zeroCount; + if (message.positive != null && message.hasOwnProperty("positive")) + object.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.positive, options); + if (message.negative != null && message.hasOwnProperty("negative")) + object.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.negative, options); + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options); + } + if (message.min != null && message.hasOwnProperty("min")) { + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (options.oneofs) + object._min = "min"; + } + if (message.max != null && message.hasOwnProperty("max")) { + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + if (options.oneofs) + object._max = "max"; + } + if (message.zeroThreshold != null && message.hasOwnProperty("zeroThreshold")) + object.zeroThreshold = options.json && !isFinite(message.zeroThreshold) ? String(message.zeroThreshold) : message.zeroThreshold; + return object; + }; + /** + * Converts this ExponentialHistogramDataPoint to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @instance + * @returns {Object.} JSON object + */ + ExponentialHistogramDataPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ExponentialHistogramDataPoint + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExponentialHistogramDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"; + }; + ExponentialHistogramDataPoint.Buckets = (function () { + /** + * Properties of a Buckets. + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @interface IBuckets + * @property {number|null} [offset] Buckets offset + * @property {Array.|null} [bucketCounts] Buckets bucketCounts + */ + /** + * Constructs a new Buckets. + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint + * @classdesc Represents a Buckets. + * @implements IBuckets + * @constructor + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets=} [properties] Properties to set + */ + function Buckets(properties) { + this.bucketCounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Buckets offset. + * @member {number|null|undefined} offset + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @instance + */ + Buckets.prototype.offset = null; + /** + * Buckets bucketCounts. + * @member {Array.} bucketCounts + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @instance + */ + Buckets.prototype.bucketCounts = $util.emptyArray; + /** + * Creates a new Buckets instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets instance + */ + Buckets.create = function create(properties) { + return new Buckets(properties); + }; + /** + * Encodes the specified Buckets message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets} message Buckets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Buckets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 1, wireType 0 =*/ 8).sint32(message.offset); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.uint64(message.bucketCounts[i]); + writer.ldelim(); + } + return writer; + }; + /** + * Encodes the specified Buckets message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets} message Buckets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Buckets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a Buckets message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Buckets.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.offset = reader.sint32(); + break; + } + case 2: { + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.uint64()); + } + else + message.bucketCounts.push(reader.uint64()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a Buckets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Buckets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a Buckets message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Buckets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset)) + return "offset: integer expected"; + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + return null; + }; + /** + * Creates a Buckets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets + */ + Buckets.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets(); + if (object.offset != null) + message.offset = object.offset | 0; + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = true; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(true); + } + return message; + }; + /** + * Creates a plain object from a Buckets message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} message Buckets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Buckets.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bucketCounts = []; + if (options.defaults) + object.offset = 0; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = message.offset; + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber(true) : message.bucketCounts[j]; + } + return object; + }; + /** + * Converts this Buckets to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @instance + * @returns {Object.} JSON object + */ + Buckets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Buckets + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Buckets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"; + }; + return Buckets; + })(); + return ExponentialHistogramDataPoint; + })(); + v1.SummaryDataPoint = (function () { + /** + * Properties of a SummaryDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @interface ISummaryDataPoint + * @property {Array.|null} [attributes] SummaryDataPoint attributes + * @property {number|Long|null} [startTimeUnixNano] SummaryDataPoint startTimeUnixNano + * @property {number|Long|null} [timeUnixNano] SummaryDataPoint timeUnixNano + * @property {number|Long|null} [count] SummaryDataPoint count + * @property {number|null} [sum] SummaryDataPoint sum + * @property {Array.|null} [quantileValues] SummaryDataPoint quantileValues + * @property {number|null} [flags] SummaryDataPoint flags + */ + /** + * Constructs a new SummaryDataPoint. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents a SummaryDataPoint. + * @implements ISummaryDataPoint + * @constructor + * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint=} [properties] Properties to set + */ + function SummaryDataPoint(properties) { + this.attributes = []; + this.quantileValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * SummaryDataPoint attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.attributes = $util.emptyArray; + /** + * SummaryDataPoint startTimeUnixNano. + * @member {number|Long|null|undefined} startTimeUnixNano + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.startTimeUnixNano = null; + /** + * SummaryDataPoint timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.timeUnixNano = null; + /** + * SummaryDataPoint count. + * @member {number|Long|null|undefined} count + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.count = null; + /** + * SummaryDataPoint sum. + * @member {number|null|undefined} sum + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.sum = null; + /** + * SummaryDataPoint quantileValues. + * @member {Array.} quantileValues + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.quantileValues = $util.emptyArray; + /** + * SummaryDataPoint flags. + * @member {number|null|undefined} flags + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + */ + SummaryDataPoint.prototype.flags = null; + /** + * Creates a new SummaryDataPoint instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint instance + */ + SummaryDataPoint.create = function create(properties) { + return new SummaryDataPoint(properties); + }; + /** + * Encodes the specified SummaryDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint} message SummaryDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummaryDataPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) + writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum); + if (message.quantileValues != null && message.quantileValues.length) + for (var i = 0; i < message.quantileValues.length; ++i) + $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(message.quantileValues[i], writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 8, wireType 0 =*/ 64).uint32(message.flags); + return writer; + }; + /** + * Encodes the specified SummaryDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint} message SummaryDataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummaryDataPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a SummaryDataPoint message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummaryDataPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.startTimeUnixNano = reader.fixed64(); + break; + } + case 3: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 4: { + message.count = reader.fixed64(); + break; + } + case 5: { + message.sum = reader.double(); + break; + } + case 6: { + if (!(message.quantileValues && message.quantileValues.length)) + message.quantileValues = []; + message.quantileValues.push($root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(reader, reader.uint32())); + break; + } + case 8: { + message.flags = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a SummaryDataPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummaryDataPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a SummaryDataPoint message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummaryDataPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) + return "startTimeUnixNano: integer|Long expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.sum != null && message.hasOwnProperty("sum")) + if (typeof message.sum !== "number") + return "sum: number expected"; + if (message.quantileValues != null && message.hasOwnProperty("quantileValues")) { + if (!Array.isArray(message.quantileValues)) + return "quantileValues: array expected"; + for (var i = 0; i < message.quantileValues.length; ++i) { + var error = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(message.quantileValues[i]); + if (error) + return "quantileValues." + error; + } + } + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + return null; + }; + /** + * Creates a SummaryDataPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint + */ + SummaryDataPoint.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.SummaryDataPoint) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint(); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.startTimeUnixNano != null) + if ($util.Long) + (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; + else if (typeof object.startTimeUnixNano === "string") + message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); + else if (typeof object.startTimeUnixNano === "number") + message.startTimeUnixNano = object.startTimeUnixNano; + else if (typeof object.startTimeUnixNano === "object") + message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.sum != null) + message.sum = Number(object.sum); + if (object.quantileValues) { + if (!Array.isArray(object.quantileValues)) + throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected"); + message.quantileValues = []; + for (var i = 0; i < object.quantileValues.length; ++i) { + if (typeof object.quantileValues[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected"); + message.quantileValues[i] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(object.quantileValues[i]); + } + } + if (object.flags != null) + message.flags = object.flags >>> 0; + return message; + }; + /** + * Creates a plain object from a SummaryDataPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint} message SummaryDataPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummaryDataPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.quantileValues = []; + object.attributes = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.startTimeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.count = options.longs === String ? "0" : 0; + object.sum = 0; + object.flags = 0; + } + if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) + if (typeof message.startTimeUnixNano === "number") + object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; + else + object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.sum != null && message.hasOwnProperty("sum")) + object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum; + if (message.quantileValues && message.quantileValues.length) { + object.quantileValues = []; + for (var j = 0; j < message.quantileValues.length; ++j) + object.quantileValues[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(message.quantileValues[j], options); + } + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + return object; + }; + /** + * Converts this SummaryDataPoint to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @instance + * @returns {Object.} JSON object + */ + SummaryDataPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for SummaryDataPoint + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummaryDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.SummaryDataPoint"; + }; + SummaryDataPoint.ValueAtQuantile = (function () { + /** + * Properties of a ValueAtQuantile. + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @interface IValueAtQuantile + * @property {number|null} [quantile] ValueAtQuantile quantile + * @property {number|null} [value] ValueAtQuantile value + */ + /** + * Constructs a new ValueAtQuantile. + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint + * @classdesc Represents a ValueAtQuantile. + * @implements IValueAtQuantile + * @constructor + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile=} [properties] Properties to set + */ + function ValueAtQuantile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ValueAtQuantile quantile. + * @member {number|null|undefined} quantile + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @instance + */ + ValueAtQuantile.prototype.quantile = null; + /** + * ValueAtQuantile value. + * @member {number|null|undefined} value + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @instance + */ + ValueAtQuantile.prototype.value = null; + /** + * Creates a new ValueAtQuantile instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile instance + */ + ValueAtQuantile.create = function create(properties) { + return new ValueAtQuantile(properties); + }; + /** + * Encodes the specified ValueAtQuantile message. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile} message ValueAtQuantile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueAtQuantile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quantile != null && Object.hasOwnProperty.call(message, "quantile")) + writer.uint32(/* id 1, wireType 1 =*/ 9).double(message.quantile); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 1 =*/ 17).double(message.value); + return writer; + }; + /** + * Encodes the specified ValueAtQuantile message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile} message ValueAtQuantile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueAtQuantile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ValueAtQuantile message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueAtQuantile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.quantile = reader.double(); + break; + } + case 2: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ValueAtQuantile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueAtQuantile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ValueAtQuantile message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueAtQuantile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.quantile != null && message.hasOwnProperty("quantile")) + if (typeof message.quantile !== "number") + return "quantile: number expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + /** + * Creates a ValueAtQuantile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile + */ + ValueAtQuantile.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile(); + if (object.quantile != null) + message.quantile = Number(object.quantile); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + /** + * Creates a plain object from a ValueAtQuantile message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} message ValueAtQuantile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueAtQuantile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.quantile = 0; + object.value = 0; + } + if (message.quantile != null && message.hasOwnProperty("quantile")) + object.quantile = options.json && !isFinite(message.quantile) ? String(message.quantile) : message.quantile; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + /** + * Converts this ValueAtQuantile to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @instance + * @returns {Object.} JSON object + */ + ValueAtQuantile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ValueAtQuantile + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValueAtQuantile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"; + }; + return ValueAtQuantile; + })(); + return SummaryDataPoint; + })(); + v1.Exemplar = (function () { + /** + * Properties of an Exemplar. + * @memberof opentelemetry.proto.metrics.v1 + * @interface IExemplar + * @property {Array.|null} [filteredAttributes] Exemplar filteredAttributes + * @property {number|Long|null} [timeUnixNano] Exemplar timeUnixNano + * @property {number|null} [asDouble] Exemplar asDouble + * @property {number|Long|null} [asInt] Exemplar asInt + * @property {Uint8Array|null} [spanId] Exemplar spanId + * @property {Uint8Array|null} [traceId] Exemplar traceId + */ + /** + * Constructs a new Exemplar. + * @memberof opentelemetry.proto.metrics.v1 + * @classdesc Represents an Exemplar. + * @implements IExemplar + * @constructor + * @param {opentelemetry.proto.metrics.v1.IExemplar=} [properties] Properties to set + */ + function Exemplar(properties) { + this.filteredAttributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * Exemplar filteredAttributes. + * @member {Array.} filteredAttributes + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.filteredAttributes = $util.emptyArray; + /** + * Exemplar timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.timeUnixNano = null; + /** + * Exemplar asDouble. + * @member {number|null|undefined} asDouble + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.asDouble = null; + /** + * Exemplar asInt. + * @member {number|Long|null|undefined} asInt + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.asInt = null; + /** + * Exemplar spanId. + * @member {Uint8Array|null|undefined} spanId + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.spanId = null; + /** + * Exemplar traceId. + * @member {Uint8Array|null|undefined} traceId + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Exemplar.prototype.traceId = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + /** + * Exemplar value. + * @member {"asDouble"|"asInt"|undefined} value + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + */ + Object.defineProperty(Exemplar.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["asDouble", "asInt"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** + * Creates a new Exemplar instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {opentelemetry.proto.metrics.v1.IExemplar=} [properties] Properties to set + * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar instance + */ + Exemplar.create = function create(properties) { + return new Exemplar(properties); + }; + /** + * Encodes the specified Exemplar message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Exemplar.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {opentelemetry.proto.metrics.v1.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.timeUnixNano); + if (message.asDouble != null && Object.hasOwnProperty.call(message, "asDouble")) + writer.uint32(/* id 3, wireType 1 =*/ 25).double(message.asDouble); + if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) + writer.uint32(/* id 4, wireType 2 =*/ 34).bytes(message.spanId); + if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) + writer.uint32(/* id 5, wireType 2 =*/ 42).bytes(message.traceId); + if (message.asInt != null && Object.hasOwnProperty.call(message, "asInt")) + writer.uint32(/* id 6, wireType 1 =*/ 49).sfixed64(message.asInt); + if (message.filteredAttributes != null && message.filteredAttributes.length) + for (var i = 0; i < message.filteredAttributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.filteredAttributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Exemplar.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {opentelemetry.proto.metrics.v1.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Exemplar(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + if (!(message.filteredAttributes && message.filteredAttributes.length)) + message.filteredAttributes = []; + message.filteredAttributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 3: { + message.asDouble = reader.double(); + break; + } + case 6: { + message.asInt = reader.sfixed64(); + break; + } + case 4: { + message.spanId = reader.bytes(); + break; + } + case 5: { + message.traceId = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies an Exemplar message. + * @function verify + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exemplar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.filteredAttributes != null && message.hasOwnProperty("filteredAttributes")) { + if (!Array.isArray(message.filteredAttributes)) + return "filteredAttributes: array expected"; + for (var i = 0; i < message.filteredAttributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.filteredAttributes[i]); + if (error) + return "filteredAttributes." + error; + } + } + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.asDouble != null && message.hasOwnProperty("asDouble")) { + properties.value = 1; + if (typeof message.asDouble !== "number") + return "asDouble: number expected"; + } + if (message.asInt != null && message.hasOwnProperty("asInt")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.asInt) && !(message.asInt && $util.isInteger(message.asInt.low) && $util.isInteger(message.asInt.high))) + return "asInt: integer|Long expected"; + } + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) + return "spanId: buffer expected"; + if (message.traceId != null && message.hasOwnProperty("traceId")) + if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) + return "traceId: buffer expected"; + return null; + }; + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar + */ + Exemplar.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.metrics.v1.Exemplar) + return object; + var message = new $root.opentelemetry.proto.metrics.v1.Exemplar(); + if (object.filteredAttributes) { + if (!Array.isArray(object.filteredAttributes)) + throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected"); + message.filteredAttributes = []; + for (var i = 0; i < object.filteredAttributes.length; ++i) { + if (typeof object.filteredAttributes[i] !== "object") + throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected"); + message.filteredAttributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.filteredAttributes[i]); + } + } + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.asDouble != null) + message.asDouble = Number(object.asDouble); + if (object.asInt != null) + if ($util.Long) + (message.asInt = $util.Long.fromValue(object.asInt)).unsigned = false; + else if (typeof object.asInt === "string") + message.asInt = parseInt(object.asInt, 10); + else if (typeof object.asInt === "number") + message.asInt = object.asInt; + else if (typeof object.asInt === "object") + message.asInt = new $util.LongBits(object.asInt.low >>> 0, object.asInt.high >>> 0).toNumber(); + if (object.spanId != null) + if (typeof object.spanId === "string") + $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); + else if (object.spanId.length >= 0) + message.spanId = object.spanId; + if (object.traceId != null) + if (typeof object.traceId === "string") + $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); + else if (object.traceId.length >= 0) + message.traceId = object.traceId; + return message; + }; + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {opentelemetry.proto.metrics.v1.Exemplar} message Exemplar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exemplar.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filteredAttributes = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.spanId = ""; + else { + object.spanId = []; + if (options.bytes !== Array) + object.spanId = $util.newBuffer(object.spanId); + } + if (options.bytes === String) + object.traceId = ""; + else { + object.traceId = []; + if (options.bytes !== Array) + object.traceId = $util.newBuffer(object.traceId); + } + } + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.asDouble != null && message.hasOwnProperty("asDouble")) { + object.asDouble = options.json && !isFinite(message.asDouble) ? String(message.asDouble) : message.asDouble; + if (options.oneofs) + object.value = "asDouble"; + } + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; + if (message.traceId != null && message.hasOwnProperty("traceId")) + object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; + if (message.asInt != null && message.hasOwnProperty("asInt")) { + if (typeof message.asInt === "number") + object.asInt = options.longs === String ? String(message.asInt) : message.asInt; + else + object.asInt = options.longs === String ? $util.Long.prototype.toString.call(message.asInt) : options.longs === Number ? new $util.LongBits(message.asInt.low >>> 0, message.asInt.high >>> 0).toNumber() : message.asInt; + if (options.oneofs) + object.value = "asInt"; + } + if (message.filteredAttributes && message.filteredAttributes.length) { + object.filteredAttributes = []; + for (var j = 0; j < message.filteredAttributes.length; ++j) + object.filteredAttributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.filteredAttributes[j], options); + } + return object; + }; + /** + * Converts this Exemplar to JSON. + * @function toJSON + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @instance + * @returns {Object.} JSON object + */ + Exemplar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for Exemplar + * @function getTypeUrl + * @memberof opentelemetry.proto.metrics.v1.Exemplar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Exemplar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Exemplar"; + }; + return Exemplar; + })(); + return v1; + })(); + return metrics; + })(); + proto.logs = (function () { + /** + * Namespace logs. + * @memberof opentelemetry.proto + * @namespace + */ + var logs = {}; + logs.v1 = (function () { + /** + * Namespace v1. + * @memberof opentelemetry.proto.logs + * @namespace + */ + var v1 = {}; + v1.LogsData = (function () { + /** + * Properties of a LogsData. + * @memberof opentelemetry.proto.logs.v1 + * @interface ILogsData + * @property {Array.|null} [resourceLogs] LogsData resourceLogs + */ + /** + * Constructs a new LogsData. + * @memberof opentelemetry.proto.logs.v1 + * @classdesc Represents a LogsData. + * @implements ILogsData + * @constructor + * @param {opentelemetry.proto.logs.v1.ILogsData=} [properties] Properties to set + */ + function LogsData(properties) { + this.resourceLogs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * LogsData resourceLogs. + * @member {Array.} resourceLogs + * @memberof opentelemetry.proto.logs.v1.LogsData + * @instance + */ + LogsData.prototype.resourceLogs = $util.emptyArray; + /** + * Creates a new LogsData instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {opentelemetry.proto.logs.v1.ILogsData=} [properties] Properties to set + * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData instance + */ + LogsData.create = function create(properties) { + return new LogsData(properties); + }; + /** + * Encodes the specified LogsData message. Does not implicitly {@link opentelemetry.proto.logs.v1.LogsData.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {opentelemetry.proto.logs.v1.ILogsData} message LogsData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogsData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceLogs != null && message.resourceLogs.length) + for (var i = 0; i < message.resourceLogs.length; ++i) + $root.opentelemetry.proto.logs.v1.ResourceLogs.encode(message.resourceLogs[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + return writer; + }; + /** + * Encodes the specified LogsData message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.LogsData.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {opentelemetry.proto.logs.v1.ILogsData} message LogsData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogsData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a LogsData message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogsData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.LogsData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceLogs && message.resourceLogs.length)) + message.resourceLogs = []; + message.resourceLogs.push($root.opentelemetry.proto.logs.v1.ResourceLogs.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a LogsData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogsData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a LogsData message. + * @function verify + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogsData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceLogs != null && message.hasOwnProperty("resourceLogs")) { + if (!Array.isArray(message.resourceLogs)) + return "resourceLogs: array expected"; + for (var i = 0; i < message.resourceLogs.length; ++i) { + var error = $root.opentelemetry.proto.logs.v1.ResourceLogs.verify(message.resourceLogs[i]); + if (error) + return "resourceLogs." + error; + } + } + return null; + }; + /** + * Creates a LogsData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData + */ + LogsData.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.logs.v1.LogsData) + return object; + var message = new $root.opentelemetry.proto.logs.v1.LogsData(); + if (object.resourceLogs) { + if (!Array.isArray(object.resourceLogs)) + throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected"); + message.resourceLogs = []; + for (var i = 0; i < object.resourceLogs.length; ++i) { + if (typeof object.resourceLogs[i] !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected"); + message.resourceLogs[i] = $root.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(object.resourceLogs[i]); + } + } + return message; + }; + /** + * Creates a plain object from a LogsData message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {opentelemetry.proto.logs.v1.LogsData} message LogsData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogsData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceLogs = []; + if (message.resourceLogs && message.resourceLogs.length) { + object.resourceLogs = []; + for (var j = 0; j < message.resourceLogs.length; ++j) + object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j], options); + } + return object; + }; + /** + * Converts this LogsData to JSON. + * @function toJSON + * @memberof opentelemetry.proto.logs.v1.LogsData + * @instance + * @returns {Object.} JSON object + */ + LogsData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for LogsData + * @function getTypeUrl + * @memberof opentelemetry.proto.logs.v1.LogsData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.logs.v1.LogsData"; + }; + return LogsData; + })(); + v1.ResourceLogs = (function () { + /** + * Properties of a ResourceLogs. + * @memberof opentelemetry.proto.logs.v1 + * @interface IResourceLogs + * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceLogs resource + * @property {Array.|null} [scopeLogs] ResourceLogs scopeLogs + * @property {string|null} [schemaUrl] ResourceLogs schemaUrl + */ + /** + * Constructs a new ResourceLogs. + * @memberof opentelemetry.proto.logs.v1 + * @classdesc Represents a ResourceLogs. + * @implements IResourceLogs + * @constructor + * @param {opentelemetry.proto.logs.v1.IResourceLogs=} [properties] Properties to set + */ + function ResourceLogs(properties) { + this.scopeLogs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ResourceLogs resource. + * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @instance + */ + ResourceLogs.prototype.resource = null; + /** + * ResourceLogs scopeLogs. + * @member {Array.} scopeLogs + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @instance + */ + ResourceLogs.prototype.scopeLogs = $util.emptyArray; + /** + * ResourceLogs schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @instance + */ + ResourceLogs.prototype.schemaUrl = null; + /** + * Creates a new ResourceLogs instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {opentelemetry.proto.logs.v1.IResourceLogs=} [properties] Properties to set + * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs instance + */ + ResourceLogs.create = function create(properties) { + return new ResourceLogs(properties); + }; + /** + * Encodes the specified ResourceLogs message. Does not implicitly {@link opentelemetry.proto.logs.v1.ResourceLogs.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {opentelemetry.proto.logs.v1.IResourceLogs} message ResourceLogs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLogs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.scopeLogs != null && message.scopeLogs.length) + for (var i = 0; i < message.scopeLogs.length; ++i) + $root.opentelemetry.proto.logs.v1.ScopeLogs.encode(message.scopeLogs[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ResourceLogs message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.ResourceLogs.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {opentelemetry.proto.logs.v1.IResourceLogs} message ResourceLogs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceLogs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ResourceLogs message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLogs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.ResourceLogs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.scopeLogs && message.scopeLogs.length)) + message.scopeLogs = []; + message.scopeLogs.push($root.opentelemetry.proto.logs.v1.ScopeLogs.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ResourceLogs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceLogs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ResourceLogs message. + * @function verify + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceLogs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.scopeLogs != null && message.hasOwnProperty("scopeLogs")) { + if (!Array.isArray(message.scopeLogs)) + return "scopeLogs: array expected"; + for (var i = 0; i < message.scopeLogs.length; ++i) { + var error = $root.opentelemetry.proto.logs.v1.ScopeLogs.verify(message.scopeLogs[i]); + if (error) + return "scopeLogs." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ResourceLogs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs + */ + ResourceLogs.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.logs.v1.ResourceLogs) + return object; + var message = new $root.opentelemetry.proto.logs.v1.ResourceLogs(); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected"); + message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource); + } + if (object.scopeLogs) { + if (!Array.isArray(object.scopeLogs)) + throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected"); + message.scopeLogs = []; + for (var i = 0; i < object.scopeLogs.length; ++i) { + if (typeof object.scopeLogs[i] !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected"); + message.scopeLogs[i] = $root.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(object.scopeLogs[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ResourceLogs message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {opentelemetry.proto.logs.v1.ResourceLogs} message ResourceLogs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceLogs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopeLogs = []; + if (options.defaults) { + object.resource = null; + object.schemaUrl = ""; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options); + if (message.scopeLogs && message.scopeLogs.length) { + object.scopeLogs = []; + for (var j = 0; j < message.scopeLogs.length; ++j) + object.scopeLogs[j] = $root.opentelemetry.proto.logs.v1.ScopeLogs.toObject(message.scopeLogs[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ResourceLogs to JSON. + * @function toJSON + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @instance + * @returns {Object.} JSON object + */ + ResourceLogs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ResourceLogs + * @function getTypeUrl + * @memberof opentelemetry.proto.logs.v1.ResourceLogs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceLogs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.logs.v1.ResourceLogs"; + }; + return ResourceLogs; + })(); + v1.ScopeLogs = (function () { + /** + * Properties of a ScopeLogs. + * @memberof opentelemetry.proto.logs.v1 + * @interface IScopeLogs + * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeLogs scope + * @property {Array.|null} [logRecords] ScopeLogs logRecords + * @property {string|null} [schemaUrl] ScopeLogs schemaUrl + */ + /** + * Constructs a new ScopeLogs. + * @memberof opentelemetry.proto.logs.v1 + * @classdesc Represents a ScopeLogs. + * @implements IScopeLogs + * @constructor + * @param {opentelemetry.proto.logs.v1.IScopeLogs=} [properties] Properties to set + */ + function ScopeLogs(properties) { + this.logRecords = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * ScopeLogs scope. + * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @instance + */ + ScopeLogs.prototype.scope = null; + /** + * ScopeLogs logRecords. + * @member {Array.} logRecords + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @instance + */ + ScopeLogs.prototype.logRecords = $util.emptyArray; + /** + * ScopeLogs schemaUrl. + * @member {string|null|undefined} schemaUrl + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @instance + */ + ScopeLogs.prototype.schemaUrl = null; + /** + * Creates a new ScopeLogs instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {opentelemetry.proto.logs.v1.IScopeLogs=} [properties] Properties to set + * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs instance + */ + ScopeLogs.create = function create(properties) { + return new ScopeLogs(properties); + }; + /** + * Encodes the specified ScopeLogs message. Does not implicitly {@link opentelemetry.proto.logs.v1.ScopeLogs.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {opentelemetry.proto.logs.v1.IScopeLogs} message ScopeLogs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeLogs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); + if (message.logRecords != null && message.logRecords.length) + for (var i = 0; i < message.logRecords.length; ++i) + $root.opentelemetry.proto.logs.v1.LogRecord.encode(message.logRecords[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); + if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); + return writer; + }; + /** + * Encodes the specified ScopeLogs message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.ScopeLogs.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {opentelemetry.proto.logs.v1.IScopeLogs} message ScopeLogs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScopeLogs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a ScopeLogs message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeLogs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.ScopeLogs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.logRecords && message.logRecords.length)) + message.logRecords = []; + message.logRecords.push($root.opentelemetry.proto.logs.v1.LogRecord.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a ScopeLogs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScopeLogs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a ScopeLogs message. + * @function verify + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScopeLogs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope); + if (error) + return "scope." + error; + } + if (message.logRecords != null && message.hasOwnProperty("logRecords")) { + if (!Array.isArray(message.logRecords)) + return "logRecords: array expected"; + for (var i = 0; i < message.logRecords.length; ++i) { + var error = $root.opentelemetry.proto.logs.v1.LogRecord.verify(message.logRecords[i]); + if (error) + return "logRecords." + error; + } + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + if (!$util.isString(message.schemaUrl)) + return "schemaUrl: string expected"; + return null; + }; + /** + * Creates a ScopeLogs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs + */ + ScopeLogs.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.logs.v1.ScopeLogs) + return object; + var message = new $root.opentelemetry.proto.logs.v1.ScopeLogs(); + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected"); + message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope); + } + if (object.logRecords) { + if (!Array.isArray(object.logRecords)) + throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected"); + message.logRecords = []; + for (var i = 0; i < object.logRecords.length; ++i) { + if (typeof object.logRecords[i] !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected"); + message.logRecords[i] = $root.opentelemetry.proto.logs.v1.LogRecord.fromObject(object.logRecords[i]); + } + } + if (object.schemaUrl != null) + message.schemaUrl = String(object.schemaUrl); + return message; + }; + /** + * Creates a plain object from a ScopeLogs message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {opentelemetry.proto.logs.v1.ScopeLogs} message ScopeLogs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScopeLogs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.logRecords = []; + if (options.defaults) { + object.scope = null; + object.schemaUrl = ""; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options); + if (message.logRecords && message.logRecords.length) { + object.logRecords = []; + for (var j = 0; j < message.logRecords.length; ++j) + object.logRecords[j] = $root.opentelemetry.proto.logs.v1.LogRecord.toObject(message.logRecords[j], options); + } + if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) + object.schemaUrl = message.schemaUrl; + return object; + }; + /** + * Converts this ScopeLogs to JSON. + * @function toJSON + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @instance + * @returns {Object.} JSON object + */ + ScopeLogs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for ScopeLogs + * @function getTypeUrl + * @memberof opentelemetry.proto.logs.v1.ScopeLogs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScopeLogs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.logs.v1.ScopeLogs"; + }; + return ScopeLogs; + })(); + /** + * SeverityNumber enum. + * @name opentelemetry.proto.logs.v1.SeverityNumber + * @enum {number} + * @property {number} SEVERITY_NUMBER_UNSPECIFIED=0 SEVERITY_NUMBER_UNSPECIFIED value + * @property {number} SEVERITY_NUMBER_TRACE=1 SEVERITY_NUMBER_TRACE value + * @property {number} SEVERITY_NUMBER_TRACE2=2 SEVERITY_NUMBER_TRACE2 value + * @property {number} SEVERITY_NUMBER_TRACE3=3 SEVERITY_NUMBER_TRACE3 value + * @property {number} SEVERITY_NUMBER_TRACE4=4 SEVERITY_NUMBER_TRACE4 value + * @property {number} SEVERITY_NUMBER_DEBUG=5 SEVERITY_NUMBER_DEBUG value + * @property {number} SEVERITY_NUMBER_DEBUG2=6 SEVERITY_NUMBER_DEBUG2 value + * @property {number} SEVERITY_NUMBER_DEBUG3=7 SEVERITY_NUMBER_DEBUG3 value + * @property {number} SEVERITY_NUMBER_DEBUG4=8 SEVERITY_NUMBER_DEBUG4 value + * @property {number} SEVERITY_NUMBER_INFO=9 SEVERITY_NUMBER_INFO value + * @property {number} SEVERITY_NUMBER_INFO2=10 SEVERITY_NUMBER_INFO2 value + * @property {number} SEVERITY_NUMBER_INFO3=11 SEVERITY_NUMBER_INFO3 value + * @property {number} SEVERITY_NUMBER_INFO4=12 SEVERITY_NUMBER_INFO4 value + * @property {number} SEVERITY_NUMBER_WARN=13 SEVERITY_NUMBER_WARN value + * @property {number} SEVERITY_NUMBER_WARN2=14 SEVERITY_NUMBER_WARN2 value + * @property {number} SEVERITY_NUMBER_WARN3=15 SEVERITY_NUMBER_WARN3 value + * @property {number} SEVERITY_NUMBER_WARN4=16 SEVERITY_NUMBER_WARN4 value + * @property {number} SEVERITY_NUMBER_ERROR=17 SEVERITY_NUMBER_ERROR value + * @property {number} SEVERITY_NUMBER_ERROR2=18 SEVERITY_NUMBER_ERROR2 value + * @property {number} SEVERITY_NUMBER_ERROR3=19 SEVERITY_NUMBER_ERROR3 value + * @property {number} SEVERITY_NUMBER_ERROR4=20 SEVERITY_NUMBER_ERROR4 value + * @property {number} SEVERITY_NUMBER_FATAL=21 SEVERITY_NUMBER_FATAL value + * @property {number} SEVERITY_NUMBER_FATAL2=22 SEVERITY_NUMBER_FATAL2 value + * @property {number} SEVERITY_NUMBER_FATAL3=23 SEVERITY_NUMBER_FATAL3 value + * @property {number} SEVERITY_NUMBER_FATAL4=24 SEVERITY_NUMBER_FATAL4 value + */ + v1.SeverityNumber = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_NUMBER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SEVERITY_NUMBER_TRACE"] = 1; + values[valuesById[2] = "SEVERITY_NUMBER_TRACE2"] = 2; + values[valuesById[3] = "SEVERITY_NUMBER_TRACE3"] = 3; + values[valuesById[4] = "SEVERITY_NUMBER_TRACE4"] = 4; + values[valuesById[5] = "SEVERITY_NUMBER_DEBUG"] = 5; + values[valuesById[6] = "SEVERITY_NUMBER_DEBUG2"] = 6; + values[valuesById[7] = "SEVERITY_NUMBER_DEBUG3"] = 7; + values[valuesById[8] = "SEVERITY_NUMBER_DEBUG4"] = 8; + values[valuesById[9] = "SEVERITY_NUMBER_INFO"] = 9; + values[valuesById[10] = "SEVERITY_NUMBER_INFO2"] = 10; + values[valuesById[11] = "SEVERITY_NUMBER_INFO3"] = 11; + values[valuesById[12] = "SEVERITY_NUMBER_INFO4"] = 12; + values[valuesById[13] = "SEVERITY_NUMBER_WARN"] = 13; + values[valuesById[14] = "SEVERITY_NUMBER_WARN2"] = 14; + values[valuesById[15] = "SEVERITY_NUMBER_WARN3"] = 15; + values[valuesById[16] = "SEVERITY_NUMBER_WARN4"] = 16; + values[valuesById[17] = "SEVERITY_NUMBER_ERROR"] = 17; + values[valuesById[18] = "SEVERITY_NUMBER_ERROR2"] = 18; + values[valuesById[19] = "SEVERITY_NUMBER_ERROR3"] = 19; + values[valuesById[20] = "SEVERITY_NUMBER_ERROR4"] = 20; + values[valuesById[21] = "SEVERITY_NUMBER_FATAL"] = 21; + values[valuesById[22] = "SEVERITY_NUMBER_FATAL2"] = 22; + values[valuesById[23] = "SEVERITY_NUMBER_FATAL3"] = 23; + values[valuesById[24] = "SEVERITY_NUMBER_FATAL4"] = 24; + return values; + })(); + /** + * LogRecordFlags enum. + * @name opentelemetry.proto.logs.v1.LogRecordFlags + * @enum {number} + * @property {number} LOG_RECORD_FLAGS_DO_NOT_USE=0 LOG_RECORD_FLAGS_DO_NOT_USE value + * @property {number} LOG_RECORD_FLAGS_TRACE_FLAGS_MASK=255 LOG_RECORD_FLAGS_TRACE_FLAGS_MASK value + */ + v1.LogRecordFlags = (function () { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_RECORD_FLAGS_DO_NOT_USE"] = 0; + values[valuesById[255] = "LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"] = 255; + return values; + })(); + v1.LogRecord = (function () { + /** + * Properties of a LogRecord. + * @memberof opentelemetry.proto.logs.v1 + * @interface ILogRecord + * @property {number|Long|null} [timeUnixNano] LogRecord timeUnixNano + * @property {number|Long|null} [observedTimeUnixNano] LogRecord observedTimeUnixNano + * @property {opentelemetry.proto.logs.v1.SeverityNumber|null} [severityNumber] LogRecord severityNumber + * @property {string|null} [severityText] LogRecord severityText + * @property {opentelemetry.proto.common.v1.IAnyValue|null} [body] LogRecord body + * @property {Array.|null} [attributes] LogRecord attributes + * @property {number|null} [droppedAttributesCount] LogRecord droppedAttributesCount + * @property {number|null} [flags] LogRecord flags + * @property {Uint8Array|null} [traceId] LogRecord traceId + * @property {Uint8Array|null} [spanId] LogRecord spanId + */ + /** + * Constructs a new LogRecord. + * @memberof opentelemetry.proto.logs.v1 + * @classdesc Represents a LogRecord. + * @implements ILogRecord + * @constructor + * @param {opentelemetry.proto.logs.v1.ILogRecord=} [properties] Properties to set + */ + function LogRecord(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + /** + * LogRecord timeUnixNano. + * @member {number|Long|null|undefined} timeUnixNano + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.timeUnixNano = null; + /** + * LogRecord observedTimeUnixNano. + * @member {number|Long|null|undefined} observedTimeUnixNano + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.observedTimeUnixNano = null; + /** + * LogRecord severityNumber. + * @member {opentelemetry.proto.logs.v1.SeverityNumber|null|undefined} severityNumber + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.severityNumber = null; + /** + * LogRecord severityText. + * @member {string|null|undefined} severityText + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.severityText = null; + /** + * LogRecord body. + * @member {opentelemetry.proto.common.v1.IAnyValue|null|undefined} body + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.body = null; + /** + * LogRecord attributes. + * @member {Array.} attributes + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.attributes = $util.emptyArray; + /** + * LogRecord droppedAttributesCount. + * @member {number|null|undefined} droppedAttributesCount + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.droppedAttributesCount = null; + /** + * LogRecord flags. + * @member {number|null|undefined} flags + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.flags = null; + /** + * LogRecord traceId. + * @member {Uint8Array|null|undefined} traceId + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.traceId = null; + /** + * LogRecord spanId. + * @member {Uint8Array|null|undefined} spanId + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + */ + LogRecord.prototype.spanId = null; + /** + * Creates a new LogRecord instance using the specified properties. + * @function create + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {opentelemetry.proto.logs.v1.ILogRecord=} [properties] Properties to set + * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord instance + */ + LogRecord.create = function create(properties) { + return new LogRecord(properties); + }; + /** + * Encodes the specified LogRecord message. Does not implicitly {@link opentelemetry.proto.logs.v1.LogRecord.verify|verify} messages. + * @function encode + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {opentelemetry.proto.logs.v1.ILogRecord} message LogRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) + writer.uint32(/* id 1, wireType 1 =*/ 9).fixed64(message.timeUnixNano); + if (message.severityNumber != null && Object.hasOwnProperty.call(message, "severityNumber")) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.severityNumber); + if (message.severityText != null && Object.hasOwnProperty.call(message, "severityText")) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.severityText); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.opentelemetry.proto.common.v1.AnyValue.encode(message.body, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim(); + if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) + writer.uint32(/* id 7, wireType 0 =*/ 56).uint32(message.droppedAttributesCount); + if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) + writer.uint32(/* id 8, wireType 5 =*/ 69).fixed32(message.flags); + if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) + writer.uint32(/* id 9, wireType 2 =*/ 74).bytes(message.traceId); + if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) + writer.uint32(/* id 10, wireType 2 =*/ 82).bytes(message.spanId); + if (message.observedTimeUnixNano != null && Object.hasOwnProperty.call(message, "observedTimeUnixNano")) + writer.uint32(/* id 11, wireType 1 =*/ 89).fixed64(message.observedTimeUnixNano); + return writer; + }; + /** + * Encodes the specified LogRecord message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.LogRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {opentelemetry.proto.logs.v1.ILogRecord} message LogRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** + * Decodes a LogRecord message from the specified reader or buffer. + * @function decode + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.LogRecord(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.timeUnixNano = reader.fixed64(); + break; + } + case 11: { + message.observedTimeUnixNano = reader.fixed64(); + break; + } + case 2: { + message.severityNumber = reader.int32(); + break; + } + case 3: { + message.severityText = reader.string(); + break; + } + case 5: { + message.body = $root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); + break; + } + case 7: { + message.droppedAttributesCount = reader.uint32(); + break; + } + case 8: { + message.flags = reader.fixed32(); + break; + } + case 9: { + message.traceId = reader.bytes(); + break; + } + case 10: { + message.spanId = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** + * Decodes a LogRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** + * Verifies a LogRecord message. + * @function verify + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) + return "timeUnixNano: integer|Long expected"; + if (message.observedTimeUnixNano != null && message.hasOwnProperty("observedTimeUnixNano")) + if (!$util.isInteger(message.observedTimeUnixNano) && !(message.observedTimeUnixNano && $util.isInteger(message.observedTimeUnixNano.low) && $util.isInteger(message.observedTimeUnixNano.high))) + return "observedTimeUnixNano: integer|Long expected"; + if (message.severityNumber != null && message.hasOwnProperty("severityNumber")) + switch (message.severityNumber) { + default: + return "severityNumber: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + break; + } + if (message.severityText != null && message.hasOwnProperty("severityText")) + if (!$util.isString(message.severityText)) + return "severityText: string expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.body); + if (error) + return "body." + error; + } + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + if (!$util.isInteger(message.droppedAttributesCount)) + return "droppedAttributesCount: integer expected"; + if (message.flags != null && message.hasOwnProperty("flags")) + if (!$util.isInteger(message.flags)) + return "flags: integer expected"; + if (message.traceId != null && message.hasOwnProperty("traceId")) + if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) + return "traceId: buffer expected"; + if (message.spanId != null && message.hasOwnProperty("spanId")) + if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) + return "spanId: buffer expected"; + return null; + }; + /** + * Creates a LogRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {Object.} object Plain object + * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord + */ + LogRecord.fromObject = function fromObject(object) { + if (object instanceof $root.opentelemetry.proto.logs.v1.LogRecord) + return object; + var message = new $root.opentelemetry.proto.logs.v1.LogRecord(); + if (object.timeUnixNano != null) + if ($util.Long) + (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; + else if (typeof object.timeUnixNano === "string") + message.timeUnixNano = parseInt(object.timeUnixNano, 10); + else if (typeof object.timeUnixNano === "number") + message.timeUnixNano = object.timeUnixNano; + else if (typeof object.timeUnixNano === "object") + message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); + if (object.observedTimeUnixNano != null) + if ($util.Long) + (message.observedTimeUnixNano = $util.Long.fromValue(object.observedTimeUnixNano)).unsigned = false; + else if (typeof object.observedTimeUnixNano === "string") + message.observedTimeUnixNano = parseInt(object.observedTimeUnixNano, 10); + else if (typeof object.observedTimeUnixNano === "number") + message.observedTimeUnixNano = object.observedTimeUnixNano; + else if (typeof object.observedTimeUnixNano === "object") + message.observedTimeUnixNano = new $util.LongBits(object.observedTimeUnixNano.low >>> 0, object.observedTimeUnixNano.high >>> 0).toNumber(); + switch (object.severityNumber) { + default: + if (typeof object.severityNumber === "number") { + message.severityNumber = object.severityNumber; + break; + } + break; + case "SEVERITY_NUMBER_UNSPECIFIED": + case 0: + message.severityNumber = 0; + break; + case "SEVERITY_NUMBER_TRACE": + case 1: + message.severityNumber = 1; + break; + case "SEVERITY_NUMBER_TRACE2": + case 2: + message.severityNumber = 2; + break; + case "SEVERITY_NUMBER_TRACE3": + case 3: + message.severityNumber = 3; + break; + case "SEVERITY_NUMBER_TRACE4": + case 4: + message.severityNumber = 4; + break; + case "SEVERITY_NUMBER_DEBUG": + case 5: + message.severityNumber = 5; + break; + case "SEVERITY_NUMBER_DEBUG2": + case 6: + message.severityNumber = 6; + break; + case "SEVERITY_NUMBER_DEBUG3": + case 7: + message.severityNumber = 7; + break; + case "SEVERITY_NUMBER_DEBUG4": + case 8: + message.severityNumber = 8; + break; + case "SEVERITY_NUMBER_INFO": + case 9: + message.severityNumber = 9; + break; + case "SEVERITY_NUMBER_INFO2": + case 10: + message.severityNumber = 10; + break; + case "SEVERITY_NUMBER_INFO3": + case 11: + message.severityNumber = 11; + break; + case "SEVERITY_NUMBER_INFO4": + case 12: + message.severityNumber = 12; + break; + case "SEVERITY_NUMBER_WARN": + case 13: + message.severityNumber = 13; + break; + case "SEVERITY_NUMBER_WARN2": + case 14: + message.severityNumber = 14; + break; + case "SEVERITY_NUMBER_WARN3": + case 15: + message.severityNumber = 15; + break; + case "SEVERITY_NUMBER_WARN4": + case 16: + message.severityNumber = 16; + break; + case "SEVERITY_NUMBER_ERROR": + case 17: + message.severityNumber = 17; + break; + case "SEVERITY_NUMBER_ERROR2": + case 18: + message.severityNumber = 18; + break; + case "SEVERITY_NUMBER_ERROR3": + case 19: + message.severityNumber = 19; + break; + case "SEVERITY_NUMBER_ERROR4": + case 20: + message.severityNumber = 20; + break; + case "SEVERITY_NUMBER_FATAL": + case 21: + message.severityNumber = 21; + break; + case "SEVERITY_NUMBER_FATAL2": + case 22: + message.severityNumber = 22; + break; + case "SEVERITY_NUMBER_FATAL3": + case 23: + message.severityNumber = 23; + break; + case "SEVERITY_NUMBER_FATAL4": + case 24: + message.severityNumber = 24; + break; + } + if (object.severityText != null) + message.severityText = String(object.severityText); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected"); + message.body = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.body); + } + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected"); + message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); + } + } + if (object.droppedAttributesCount != null) + message.droppedAttributesCount = object.droppedAttributesCount >>> 0; + if (object.flags != null) + message.flags = object.flags >>> 0; + if (object.traceId != null) + if (typeof object.traceId === "string") + $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); + else if (object.traceId.length >= 0) + message.traceId = object.traceId; + if (object.spanId != null) + if (typeof object.spanId === "string") + $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); + else if (object.spanId.length >= 0) + message.spanId = object.spanId; + return message; + }; + /** + * Creates a plain object from a LogRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {opentelemetry.proto.logs.v1.LogRecord} message LogRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.timeUnixNano = options.longs === String ? "0" : 0; + object.severityNumber = options.enums === String ? "SEVERITY_NUMBER_UNSPECIFIED" : 0; + object.severityText = ""; + object.body = null; + object.droppedAttributesCount = 0; + object.flags = 0; + if (options.bytes === String) + object.traceId = ""; + else { + object.traceId = []; + if (options.bytes !== Array) + object.traceId = $util.newBuffer(object.traceId); + } + if (options.bytes === String) + object.spanId = ""; + else { + object.spanId = []; + if (options.bytes !== Array) + object.spanId = $util.newBuffer(object.spanId); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.observedTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } + else + object.observedTimeUnixNano = options.longs === String ? "0" : 0; + } + if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) + if (typeof message.timeUnixNano === "number") + object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; + else + object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; + if (message.severityNumber != null && message.hasOwnProperty("severityNumber")) + object.severityNumber = options.enums === String ? $root.opentelemetry.proto.logs.v1.SeverityNumber[message.severityNumber] === undefined ? message.severityNumber : $root.opentelemetry.proto.logs.v1.SeverityNumber[message.severityNumber] : message.severityNumber; + if (message.severityText != null && message.hasOwnProperty("severityText")) + object.severityText = message.severityText; + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.body, options); + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); + } + if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) + object.droppedAttributesCount = message.droppedAttributesCount; + if (message.flags != null && message.hasOwnProperty("flags")) + object.flags = message.flags; + if (message.traceId != null && message.hasOwnProperty("traceId")) + object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; + if (message.spanId != null && message.hasOwnProperty("spanId")) + object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; + if (message.observedTimeUnixNano != null && message.hasOwnProperty("observedTimeUnixNano")) + if (typeof message.observedTimeUnixNano === "number") + object.observedTimeUnixNano = options.longs === String ? String(message.observedTimeUnixNano) : message.observedTimeUnixNano; + else + object.observedTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.observedTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.observedTimeUnixNano.low >>> 0, message.observedTimeUnixNano.high >>> 0).toNumber() : message.observedTimeUnixNano; + return object; + }; + /** + * Converts this LogRecord to JSON. + * @function toJSON + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @instance + * @returns {Object.} JSON object + */ + LogRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + /** + * Gets the default type url for LogRecord + * @function getTypeUrl + * @memberof opentelemetry.proto.logs.v1.LogRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/opentelemetry.proto.logs.v1.LogRecord"; + }; + return LogRecord; + })(); + return v1; + })(); + return logs; + })(); + return proto; + })(); + return opentelemetry; +})(); +module.exports = $root; +//# sourceMappingURL=root.js.map /***/ }), -/***/ 68972: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 61216: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0; -const api_1 = __nccwpck_require__(65163); -const SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING'); -function suppressTracing(context) { - return context.setValue(SUPPRESS_TRACING_KEY, true); -} -exports.suppressTracing = suppressTracing; -function unsuppressTracing(context) { - return context.deleteValue(SUPPRESS_TRACING_KEY); -} -exports.unsuppressTracing = unsuppressTracing; -function isTracingSuppressed(context) { - return context.getValue(SUPPRESS_TRACING_KEY) === true; -} -exports.isTracingSuppressed = isTracingSuppressed; -//# sourceMappingURL=suppress-tracing.js.map - -/***/ }), - -/***/ 34247: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - /* * Copyright The OpenTelemetry Authors * @@ -53424,49 +56054,16 @@ exports.isTracingSuppressed = isTracingSuppressed; * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BindOnceFuture = void 0; -const promise_1 = __nccwpck_require__(93003); -/** - * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked. - */ -class BindOnceFuture { - constructor(_callback, _that) { - this._callback = _callback; - this._that = _that; - this._isCalled = false; - this._deferred = new promise_1.Deferred(); - } - get isCalled() { - return this._isCalled; - } - get promise() { - return this._deferred.promise; - } - call(...args) { - if (!this._isCalled) { - this._isCalled = true; - try { - Promise.resolve(this._callback.call(this._that, ...args)) - .then(val => this._deferred.resolve(val), err => this._deferred.reject(err)); - } - catch (err) { - this._deferred.reject(err); - } - } - return this._deferred.promise; - } -} -exports.BindOnceFuture = BindOnceFuture; -//# sourceMappingURL=callback.js.map + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +__exportStar(__nccwpck_require__(27606), exports); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 57484: +/***/ 26105: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -53487,183 +56084,48 @@ exports.BindOnceFuture = BindOnceFuture; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0; +exports.OTLPProtoExporterBrowserBase = void 0; const api_1 = __nccwpck_require__(65163); -const sampling_1 = __nccwpck_require__(77700); -const DEFAULT_LIST_SEPARATOR = ','; -/** - * Environment interface to define all names - */ -const ENVIRONMENT_NUMBERS_KEYS = [ - 'OTEL_BSP_EXPORT_TIMEOUT', - 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE', - 'OTEL_BSP_MAX_QUEUE_SIZE', - 'OTEL_BSP_SCHEDULE_DELAY', - 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_EVENT_COUNT_LIMIT', - 'OTEL_SPAN_LINK_COUNT_LIMIT', - 'OTEL_EXPORTER_JAEGER_AGENT_PORT', -]; -function isEnvVarANumber(key) { - return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1); -} -const ENVIRONMENT_LISTS_KEYS = [ - 'OTEL_NO_PATCH_MODULES', - 'OTEL_PROPAGATORS', -]; -function isEnvVarAList(key) { - return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1; -} -exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity; -exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128; -/** - * Default environment variables - */ -exports.DEFAULT_ENVIRONMENT = { - CONTAINER_NAME: '', - ECS_CONTAINER_METADATA_URI_V4: '', - ECS_CONTAINER_METADATA_URI: '', - HOSTNAME: '', - KUBERNETES_SERVICE_HOST: '', - NAMESPACE: '', - OTEL_BSP_EXPORT_TIMEOUT: 30000, - OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512, - OTEL_BSP_MAX_QUEUE_SIZE: 2048, - OTEL_BSP_SCHEDULE_DELAY: 5000, - OTEL_EXPORTER_JAEGER_AGENT_HOST: '', - OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832, - OTEL_EXPORTER_JAEGER_ENDPOINT: '', - OTEL_EXPORTER_JAEGER_PASSWORD: '', - OTEL_EXPORTER_JAEGER_USER: '', - OTEL_EXPORTER_OTLP_ENDPOINT: '', - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '', - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '', - OTEL_EXPORTER_OTLP_HEADERS: '', - OTEL_EXPORTER_OTLP_TRACES_HEADERS: '', - OTEL_EXPORTER_OTLP_METRICS_HEADERS: '', - OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans', - OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO, - OTEL_NO_PATCH_MODULES: [], - OTEL_PROPAGATORS: ['tracecontext', 'baggage'], - OTEL_RESOURCE_ATTRIBUTES: '', - OTEL_SERVICE_NAME: '', - OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_EVENT_COUNT_LIMIT: 128, - OTEL_SPAN_LINK_COUNT_LIMIT: 128, - OTEL_TRACES_EXPORTER: 'none', - OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn, - OTEL_TRACES_SAMPLER_ARG: '', - OTEL_EXPORTER_OTLP_COMPRESSION: '', - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '', - OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '' -}; -/** - * Parses a variable as number with number validation - * @param name - * @param environment - * @param values - * @param min - * @param max - */ -function parseNumber(name, environment, values, min = -Infinity, max = Infinity) { - if (typeof values[name] !== 'undefined') { - const value = Number(values[name]); - if (!isNaN(value)) { - if (value < min) { - environment[name] = min; - } - else if (value > max) { - environment[name] = max; - } - else { - environment[name] = value; - } - } - } -} +const otlp_exporter_base_1 = __nccwpck_require__(11363); +const util_1 = __nccwpck_require__(68298); /** - * Parses list-like strings from input into output. - * @param name - * @param environment - * @param values - * @param separator + * Collector Exporter abstract base class */ -function parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) { - const givenValue = input[name]; - if (typeof givenValue === 'string') { - output[name] = givenValue.split(separator).map(v => v.trim()); +class OTLPProtoExporterBrowserBase extends otlp_exporter_base_1.OTLPExporterBrowserBase { + constructor(config = {}) { + super(config); } -} -// The support string -> DiagLogLevel mappings -const logLevelMap = { - ALL: api_1.DiagLogLevel.ALL, - VERBOSE: api_1.DiagLogLevel.VERBOSE, - DEBUG: api_1.DiagLogLevel.DEBUG, - INFO: api_1.DiagLogLevel.INFO, - WARN: api_1.DiagLogLevel.WARN, - ERROR: api_1.DiagLogLevel.ERROR, - NONE: api_1.DiagLogLevel.NONE, -}; -/** - * Environmentally sets log level if valid log level string is provided - * @param key - * @param environment - * @param values - */ -function setLogLevelFromEnv(key, environment, values) { - const value = values[key]; - if (typeof value === 'string') { - const theLevel = logLevelMap[value.toUpperCase()]; - if (theLevel != null) { - environment[key] = theLevel; + send(objects, onSuccess, onError) { + if (this._shutdownOnce.isCalled) { + api_1.diag.debug('Shutdown already started. Cannot send objects'); + return; } - } -} -/** - * Parses environment values - * @param values - */ -function parseEnvironment(values) { - const environment = {}; - for (const env in exports.DEFAULT_ENVIRONMENT) { - const key = env; - switch (key) { - case 'OTEL_LOG_LEVEL': - setLogLevelFromEnv(key, environment, values); - break; - default: - if (isEnvVarANumber(key)) { - parseNumber(key, environment, values); - } - else if (isEnvVarAList(key)) { - parseStringList(key, environment, values); - } - else { - const value = values[key]; - if (typeof value !== 'undefined' && value !== null) { - environment[key] = String(value); - } - } + const serviceRequest = this.convert(objects); + const exportRequestType = (0, util_1.getExportRequestProto)(this.getServiceClientType()); + const message = exportRequestType.create(serviceRequest); + if (message) { + const body = exportRequestType.encode(message).finish(); + if (body) { + (0, otlp_exporter_base_1.sendWithXhr)(new Blob([body], { type: 'application/x-protobuf' }), this.url, Object.assign(Object.assign({}, this._headers), { 'Content-Type': 'application/x-protobuf', Accept: 'application/x-protobuf' }), this.timeoutMillis, onSuccess, onError); + } + } + else { + onError(new otlp_exporter_base_1.OTLPExporterError('No proto')); } } - return environment; } -exports.parseEnvironment = parseEnvironment; -//# sourceMappingURL=environment.js.map +exports.OTLPProtoExporterBrowserBase = OTLPProtoExporterBrowserBase; +//# sourceMappingURL=OTLPProtoExporterBrowserBase.js.map /***/ }), -/***/ 72557: -/***/ ((__unused_webpack_module, exports) => { +/***/ 93103: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ServiceClientType = exports.OTLPProtoExporterBrowserBase = void 0; /* * Copyright The OpenTelemetry Authors * @@ -53679,163 +56141,50 @@ exports.parseEnvironment = parseEnvironment; * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPlainObject = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * based on lodash in order to support esm builds without esModuleInterop. - * lodash is using MIT License. - **/ -const objectTag = '[object Object]'; -const nullTag = '[object Null]'; -const undefinedTag = '[object Undefined]'; -const funcProto = Function.prototype; -const funcToString = funcProto.toString; -const objectCtorString = funcToString.call(Object); -const getPrototype = overArg(Object.getPrototypeOf, Object); -const objectProto = Object.prototype; -const hasOwnProperty = objectProto.hasOwnProperty; -const symToStringTag = Symbol ? Symbol.toStringTag : undefined; -const nativeObjectToString = objectProto.toString; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function (arg) { - return func(transform(arg)); - }; -} -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) !== objectTag) { - return false; - } - const proto = getPrototype(value); - if (proto === null) { - return true; - } - const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) === objectCtorString; -} -exports.isPlainObject = isPlainObject; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} -/** - * The base implementation of `getTag` without fallbacks for buggy environments. +var OTLPProtoExporterBrowserBase_1 = __nccwpck_require__(26105); +Object.defineProperty(exports, "OTLPProtoExporterBrowserBase", ({ enumerable: true, get: function () { return OTLPProtoExporterBrowserBase_1.OTLPProtoExporterBrowserBase; } })); +var types_1 = __nccwpck_require__(85579); +Object.defineProperty(exports, "ServiceClientType", ({ enumerable: true, get: function () { return types_1.ServiceClientType; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 27606: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; - let unmasked = false; - try { - value[symToStringTag] = undefined; - unmasked = true; - } - catch (e) { - // silence - } - const result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } - else { - delete value[symToStringTag]; - } - } - return result; -} -/** - * Converts `value` to a string using `Object.prototype.toString`. + * https://www.apache.org/licenses/LICENSE-2.0 * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -function objectToString(value) { - return nativeObjectToString.call(value); -} -//# sourceMappingURL=lodash.merge.js.map +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getExportRequestProto = exports.ServiceClientType = exports.OTLPProtoExporterBrowserBase = exports.send = exports.OTLPProtoExporterNodeBase = void 0; +var node_1 = __nccwpck_require__(13000); +Object.defineProperty(exports, "OTLPProtoExporterNodeBase", ({ enumerable: true, get: function () { return node_1.OTLPProtoExporterNodeBase; } })); +Object.defineProperty(exports, "send", ({ enumerable: true, get: function () { return node_1.send; } })); +var browser_1 = __nccwpck_require__(93103); +Object.defineProperty(exports, "OTLPProtoExporterBrowserBase", ({ enumerable: true, get: function () { return browser_1.OTLPProtoExporterBrowserBase; } })); +var types_1 = __nccwpck_require__(85579); +Object.defineProperty(exports, "ServiceClientType", ({ enumerable: true, get: function () { return types_1.ServiceClientType; } })); +var util_1 = __nccwpck_require__(68298); +Object.defineProperty(exports, "getExportRequestProto", ({ enumerable: true, get: function () { return util_1.getExportRequestProto; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 28174: +/***/ 16296: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -53856,153 +56205,84 @@ function objectToString(value) { * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.merge = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -const lodash_merge_1 = __nccwpck_require__(72557); -const MAX_LEVEL = 20; -/** - * Merges objects together - * @param args - objects / values to be merged - */ -function merge(...args) { - let result = args.shift(); - const objects = new WeakMap(); - while (args.length > 0) { - result = mergeTwoObjects(result, args.shift(), 0, objects); - } - return result; -} -exports.merge = merge; -function takeValue(value) { - if (isArray(value)) { - return value.slice(); - } - return value; -} +exports.OTLPProtoExporterNodeBase = void 0; +const api_1 = __nccwpck_require__(65163); +const otlp_exporter_base_1 = __nccwpck_require__(11363); /** - * Merges two objects - * @param one - first object - * @param two - second object - * @param level - current deep level - * @param objects - objects holder that has been already referenced - to prevent - * cyclic dependency + * Collector Exporter abstract base class */ -function mergeTwoObjects(one, two, level = 0, objects) { - let result; - if (level > MAX_LEVEL) { - return undefined; +class OTLPProtoExporterNodeBase extends otlp_exporter_base_1.OTLPExporterNodeBase { + constructor(config = {}) { + super(config); } - level++; - if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) { - result = takeValue(two); + _sendPromise(objects, onSuccess, onError) { + const promise = new Promise((resolve, reject) => { + this._send(this, objects, this.compression, resolve, reject); + }).then(onSuccess, onError); + this._sendingPromises.push(promise); + const popPromise = () => { + const index = this._sendingPromises.indexOf(promise); + this._sendingPromises.splice(index, 1); + }; + promise.then(popPromise, popPromise); } - else if (isArray(one)) { - result = one.slice(); - if (isArray(two)) { - for (let i = 0, j = two.length; i < j; i++) { - result.push(takeValue(two[i])); - } - } - else if (isObject(two)) { - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - result[key] = takeValue(two[key]); - } + send(objects, onSuccess, onError) { + if (this._shutdownOnce.isCalled) { + api_1.diag.debug('Shutdown already started. Cannot send objects'); + return; } - } - else if (isObject(one)) { - if (isObject(two)) { - if (!shouldMerge(one, two)) { - return two; - } - result = Object.assign({}, one); - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - const twoValue = two[key]; - if (isPrimitive(twoValue)) { - if (typeof twoValue === 'undefined') { - delete result[key]; - } - else { - // result[key] = takeValue(twoValue); - result[key] = twoValue; - } - } - else { - const obj1 = result[key]; - const obj2 = twoValue; - if (wasObjectReferenced(one, key, objects) || - wasObjectReferenced(two, key, objects)) { - delete result[key]; - } - else { - if (isObject(obj1) && isObject(obj2)) { - const arr1 = objects.get(obj1) || []; - const arr2 = objects.get(obj2) || []; - arr1.push({ obj: one, key }); - arr2.push({ obj: two, key }); - objects.set(obj1, arr1); - objects.set(obj2, arr2); - } - result[key] = mergeTwoObjects(result[key], twoValue, level, objects); - } - } - } + if (!this._send) { + // defer to next tick and lazy load to avoid loading protobufjs too early + // and making this impossible to be instrumented + setImmediate(() => { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const { send } = __nccwpck_require__(76060); + this._send = send; + this._sendPromise(objects, onSuccess, onError); + }); } else { - result = two; - } - } - return result; -} -/** - * Function to check if object has been already reference - * @param obj - * @param key - * @param objects - */ -function wasObjectReferenced(obj, key, objects) { - const arr = objects.get(obj[key]) || []; - for (let i = 0, j = arr.length; i < j; i++) { - const info = arr[i]; - if (info.key === key && info.obj === obj) { - return true; + this._sendPromise(objects, onSuccess, onError); } } - return false; -} -function isArray(value) { - return Array.isArray(value); -} -function isFunction(value) { - return typeof value === 'function'; -} -function isObject(value) { - return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object'; -} -function isPrimitive(value) { - return typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean' || - typeof value === 'undefined' || - value instanceof Date || - value instanceof RegExp || - value === null; -} -function shouldMerge(one, two) { - if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) { - return false; - } - return true; } -//# sourceMappingURL=merge.js.map +exports.OTLPProtoExporterNodeBase = OTLPProtoExporterNodeBase; +//# sourceMappingURL=OTLPProtoExporterNodeBase.js.map + +/***/ }), + +/***/ 13000: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.send = exports.OTLPProtoExporterNodeBase = void 0; +var OTLPProtoExporterNodeBase_1 = __nccwpck_require__(16296); +Object.defineProperty(exports, "OTLPProtoExporterNodeBase", ({ enumerable: true, get: function () { return OTLPProtoExporterNodeBase_1.OTLPProtoExporterNodeBase; } })); +var util_1 = __nccwpck_require__(76060); +Object.defineProperty(exports, "send", ({ enumerable: true, get: function () { return util_1.send; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 93003: -/***/ ((__unused_webpack_module, exports) => { +/***/ 76060: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -54022,30 +56302,29 @@ function shouldMerge(one, two) { * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Deferred = void 0; -class Deferred { - constructor() { - this._promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - }); - } - get promise() { - return this._promise; - } - resolve(val) { - this._resolve(val); +exports.send = void 0; +const otlp_exporter_base_1 = __nccwpck_require__(11363); +const util_1 = __nccwpck_require__(68298); +function send(collector, objects, compression, onSuccess, onError) { + const serviceRequest = collector.convert(objects); + const exportRequestType = (0, util_1.getExportRequestProto)(collector.getServiceClientType()); + const message = exportRequestType.create(serviceRequest); + if (message) { + const body = exportRequestType.encode(message).finish(); + if (body) { + (0, otlp_exporter_base_1.sendWithHttp)(collector, Buffer.from(body), 'application/x-protobuf', onSuccess, onError); + } } - reject(err) { - this._reject(err); + else { + onError(new otlp_exporter_base_1.OTLPExporterError('No proto')); } } -exports.Deferred = Deferred; -//# sourceMappingURL=promise.js.map +exports.send = send; +//# sourceMappingURL=util.js.map /***/ }), -/***/ 77700: +/***/ 85579: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -54066,27 +56345,22 @@ exports.Deferred = Deferred; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TracesSamplerValues = void 0; -var TracesSamplerValues; -(function (TracesSamplerValues) { - TracesSamplerValues["AlwaysOff"] = "always_off"; - TracesSamplerValues["AlwaysOn"] = "always_on"; - TracesSamplerValues["ParentBasedAlwaysOff"] = "parentbased_always_off"; - TracesSamplerValues["ParentBasedAlwaysOn"] = "parentbased_always_on"; - TracesSamplerValues["ParentBasedTraceIdRatio"] = "parentbased_traceidratio"; - TracesSamplerValues["TraceIdRatio"] = "traceidratio"; -})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {})); -//# sourceMappingURL=sampling.js.map +exports.ServiceClientType = void 0; +var ServiceClientType; +(function (ServiceClientType) { + ServiceClientType[ServiceClientType["SPANS"] = 0] = "SPANS"; + ServiceClientType[ServiceClientType["METRICS"] = 1] = "METRICS"; + ServiceClientType[ServiceClientType["LOGS"] = 2] = "LOGS"; +})(ServiceClientType = exports.ServiceClientType || (exports.ServiceClientType = {})); +//# sourceMappingURL=types.js.map /***/ }), -/***/ 72750: -/***/ ((__unused_webpack_module, exports) => { +/***/ 68298: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isUrlIgnored = exports.urlMatches = void 0; /* * Copyright The OpenTelemetry Authors * @@ -54102,38 +56376,31 @@ exports.isUrlIgnored = exports.urlMatches = void 0; * See the License for the specific language governing permissions and * limitations under the License. */ -function urlMatches(url, urlToMatch) { - if (typeof urlToMatch === 'string') { - return url === urlToMatch; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getExportRequestProto = void 0; +const root = __nccwpck_require__(59093); +const types_1 = __nccwpck_require__(85579); +function getExportRequestProto(clientType) { + if (clientType === types_1.ServiceClientType.SPANS) { + return root.opentelemetry.proto.collector.trace.v1 + .ExportTraceServiceRequest; + } + else if (clientType === types_1.ServiceClientType.LOGS) { + return root.opentelemetry.proto.collector.logs.v1 + .ExportLogsServiceRequest; } else { - return !!url.match(urlToMatch); - } -} -exports.urlMatches = urlMatches; -/** - * Check if {@param url} should be ignored when comparing against {@param ignoredUrls} - * @param url - * @param ignoredUrls - */ -function isUrlIgnored(url, ignoredUrls) { - if (!ignoredUrls) { - return false; - } - for (const ignoreUrl of ignoredUrls) { - if (urlMatches(url, ignoreUrl)) { - return true; - } + return root.opentelemetry.proto.collector.metrics.v1 + .ExportMetricsServiceRequest; } - return false; } -exports.isUrlIgnored = isUrlIgnored; -//# sourceMappingURL=url.js.map +exports.getExportRequestProto = getExportRequestProto; +//# sourceMappingURL=util.js.map /***/ }), -/***/ 87638: -/***/ ((__unused_webpack_module, exports) => { +/***/ 27471: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -54153,23 +56420,115 @@ exports.isUrlIgnored = isUrlIgnored; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isWrapped = void 0; -/** - * Checks if certain function has been already wrapped - * @param func - */ -function isWrapped(func) { - return (typeof func === 'function' && - typeof func.__original === 'function' && - typeof func.__unwrap === 'function' && - func.__wrapped === true); +exports.getOtlpEncoder = exports.encodeAsString = exports.encodeAsLongBits = exports.toLongBits = exports.hrTimeToNanos = void 0; +const core_1 = __nccwpck_require__(89736); +function hrTimeToNanos(hrTime) { + const NANOSECONDS = BigInt(1000000000); + return BigInt(hrTime[0]) * NANOSECONDS + BigInt(hrTime[1]); +} +exports.hrTimeToNanos = hrTimeToNanos; +function toLongBits(value) { + const low = Number(BigInt.asUintN(32, value)); + const high = Number(BigInt.asUintN(32, value >> BigInt(32))); + return { low, high }; +} +exports.toLongBits = toLongBits; +function encodeAsLongBits(hrTime) { + const nanos = hrTimeToNanos(hrTime); + return toLongBits(nanos); +} +exports.encodeAsLongBits = encodeAsLongBits; +function encodeAsString(hrTime) { + const nanos = hrTimeToNanos(hrTime); + return nanos.toString(); +} +exports.encodeAsString = encodeAsString; +const encodeTimestamp = typeof BigInt !== 'undefined' ? encodeAsString : core_1.hrTimeToNanoseconds; +function identity(value) { + return value; } -exports.isWrapped = isWrapped; -//# sourceMappingURL=wrap.js.map +function optionalHexToBinary(str) { + if (str === undefined) + return undefined; + return (0, core_1.hexToBinary)(str); +} +const DEFAULT_ENCODER = { + encodeHrTime: encodeAsLongBits, + encodeSpanContext: core_1.hexToBinary, + encodeOptionalSpanContext: optionalHexToBinary, +}; +function getOtlpEncoder(options) { + var _a, _b; + if (options === undefined) { + return DEFAULT_ENCODER; + } + const useLongBits = (_a = options.useLongBits) !== null && _a !== void 0 ? _a : true; + const useHex = (_b = options.useHex) !== null && _b !== void 0 ? _b : false; + return { + encodeHrTime: useLongBits ? encodeAsLongBits : encodeTimestamp, + encodeSpanContext: useHex ? identity : core_1.hexToBinary, + encodeOptionalSpanContext: useHex ? identity : optionalHexToBinary, + }; +} +exports.getOtlpEncoder = getOtlpEncoder; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 50037: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toAnyValue = exports.toKeyValue = exports.toAttributes = exports.createInstrumentationScope = void 0; +function createInstrumentationScope(scope) { + return { + name: scope.name, + version: scope.version, + }; +} +exports.createInstrumentationScope = createInstrumentationScope; +function toAttributes(attributes) { + return Object.keys(attributes).map(key => toKeyValue(key, attributes[key])); +} +exports.toAttributes = toAttributes; +function toKeyValue(key, value) { + return { + key: key, + value: toAnyValue(value), + }; +} +exports.toKeyValue = toKeyValue; +function toAnyValue(value) { + const t = typeof value; + if (t === 'string') + return { stringValue: value }; + if (t === 'number') { + if (!Number.isInteger(value)) + return { doubleValue: value }; + return { intValue: value }; + } + if (t === 'boolean') + return { boolValue: value }; + if (value instanceof Uint8Array) + return { bytesValue: value }; + if (Array.isArray(value)) + return { arrayValue: { values: value.map(toAnyValue) } }; + if (t === 'object' && value != null) + return { + kvlistValue: { + values: Object.entries(value).map(([k, v]) => toKeyValue(k, v)), + }, + }; + return {}; +} +exports.toAnyValue = toAnyValue; +//# sourceMappingURL=internal.js.map /***/ }), -/***/ 59775: +/***/ 70231: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -54190,14 +56549,11 @@ exports.isWrapped = isWrapped; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VERSION = void 0; -// this is autogenerated file, see scripts/version-update.js -exports.VERSION = '1.2.0'; -//# sourceMappingURL=version.js.map +//# sourceMappingURL=types.js.map /***/ }), -/***/ 69004: +/***/ 74357: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -54228,13 +56584,115 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(823), exports); -__exportStar(__nccwpck_require__(52381), exports); +exports.createExportLogsServiceRequest = exports.createExportMetricsServiceRequest = exports.createExportTraceServiceRequest = void 0; +__exportStar(__nccwpck_require__(70231), exports); +__exportStar(__nccwpck_require__(27471), exports); +__exportStar(__nccwpck_require__(87629), exports); +__exportStar(__nccwpck_require__(88531), exports); +__exportStar(__nccwpck_require__(31699), exports); +__exportStar(__nccwpck_require__(51270), exports); +var trace_1 = __nccwpck_require__(29036); +Object.defineProperty(exports, "createExportTraceServiceRequest", ({ enumerable: true, get: function () { return trace_1.createExportTraceServiceRequest; } })); +var metrics_1 = __nccwpck_require__(17387); +Object.defineProperty(exports, "createExportMetricsServiceRequest", ({ enumerable: true, get: function () { return metrics_1.createExportMetricsServiceRequest; } })); +var logs_1 = __nccwpck_require__(17861); +Object.defineProperty(exports, "createExportLogsServiceRequest", ({ enumerable: true, get: function () { return logs_1.createExportLogsServiceRequest; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 17861: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toLogAttributes = exports.createExportLogsServiceRequest = void 0; +const common_1 = __nccwpck_require__(27471); +const internal_1 = __nccwpck_require__(50037); +const internal_2 = __nccwpck_require__(72018); +function createExportLogsServiceRequest(logRecords, options) { + const encoder = (0, common_1.getOtlpEncoder)(options); + return { + resourceLogs: logRecordsToResourceLogs(logRecords, encoder), + }; +} +exports.createExportLogsServiceRequest = createExportLogsServiceRequest; +function createResourceMap(logRecords) { + const resourceMap = new Map(); + for (const record of logRecords) { + const { resource, instrumentationScope: { name, version = '', schemaUrl = '' }, } = record; + let ismMap = resourceMap.get(resource); + if (!ismMap) { + ismMap = new Map(); + resourceMap.set(resource, ismMap); + } + const ismKey = `${name}@${version}:${schemaUrl}`; + let records = ismMap.get(ismKey); + if (!records) { + records = []; + ismMap.set(ismKey, records); + } + records.push(record); + } + return resourceMap; +} +function logRecordsToResourceLogs(logRecords, encoder) { + const resourceMap = createResourceMap(logRecords); + return Array.from(resourceMap, ([resource, ismMap]) => ({ + resource: (0, internal_2.createResource)(resource), + scopeLogs: Array.from(ismMap, ([, scopeLogs]) => { + return { + scope: (0, internal_1.createInstrumentationScope)(scopeLogs[0].instrumentationScope), + logRecords: scopeLogs.map(log => toLogRecord(log, encoder)), + schemaUrl: scopeLogs[0].instrumentationScope.schemaUrl, + }; + }), + schemaUrl: undefined, + })); +} +function toLogRecord(log, encoder) { + var _a, _b, _c; + return { + timeUnixNano: encoder.encodeHrTime(log.hrTime), + observedTimeUnixNano: encoder.encodeHrTime(log.hrTimeObserved), + severityNumber: toSeverityNumber(log.severityNumber), + severityText: log.severityText, + body: (0, internal_1.toAnyValue)(log.body), + attributes: toLogAttributes(log.attributes), + droppedAttributesCount: log.droppedAttributesCount, + flags: (_a = log.spanContext) === null || _a === void 0 ? void 0 : _a.traceFlags, + traceId: encoder.encodeOptionalSpanContext((_b = log.spanContext) === null || _b === void 0 ? void 0 : _b.traceId), + spanId: encoder.encodeOptionalSpanContext((_c = log.spanContext) === null || _c === void 0 ? void 0 : _c.spanId), + }; +} +function toSeverityNumber(severityNumber) { + return severityNumber; +} +function toLogAttributes(attributes) { + return Object.keys(attributes).map(key => (0, internal_1.toKeyValue)(key, attributes[key])); +} +exports.toLogAttributes = toLogAttributes; //# sourceMappingURL=index.js.map /***/ }), -/***/ 29996: +/***/ 51270: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -54255,521 +56713,418 @@ __exportStar(__nccwpck_require__(52381), exports); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticResourceAttributes = { - /** - * Name of the cloud provider. - */ - CLOUD_PROVIDER: 'cloud.provider', - /** - * The cloud account ID the resource is assigned to. - */ - CLOUD_ACCOUNT_ID: 'cloud.account.id', - /** - * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations). - */ - CLOUD_REGION: 'cloud.region', - /** - * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. - * - * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. - */ - CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone', - /** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - */ - CLOUD_PLATFORM: 'cloud.platform', - /** - * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - */ - AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn', - /** - * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - */ - AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn', - /** - * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - */ - AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype', - /** - * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). - */ - AWS_ECS_TASK_ARN: 'aws.ecs.task.arn', - /** - * The task definition family this task definition is a member of. - */ - AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family', - /** - * The revision for this task definition. - */ - AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision', - /** - * The ARN of an EKS cluster. - */ - AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn', - /** - * The name(s) of the AWS log group(s) an application is writing to. - * - * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. - */ - AWS_LOG_GROUP_NAMES: 'aws.log.group.names', - /** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * - * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - */ - AWS_LOG_GROUP_ARNS: 'aws.log.group.arns', - /** - * The name(s) of the AWS log stream(s) an application is writing to. - */ - AWS_LOG_STREAM_NAMES: 'aws.log.stream.names', - /** - * The ARN(s) of the AWS log stream(s). - * - * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. - */ - AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns', - /** - * Container name. - */ - CONTAINER_NAME: 'container.name', - /** - * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. - */ - CONTAINER_ID: 'container.id', - /** - * The container runtime managing this container. - */ - CONTAINER_RUNTIME: 'container.runtime', - /** - * Name of the image the container was built on. - */ - CONTAINER_IMAGE_NAME: 'container.image.name', - /** - * Container image tag. - */ - CONTAINER_IMAGE_TAG: 'container.image.tag', - /** - * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). - */ - DEPLOYMENT_ENVIRONMENT: 'deployment.environment', - /** - * A unique identifier representing the device. - * - * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. - */ - DEVICE_ID: 'device.id', - /** - * The model identifier for the device. - * - * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. - */ - DEVICE_MODEL_IDENTIFIER: 'device.model.identifier', - /** - * The marketing name for the device model. - * - * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. - */ - DEVICE_MODEL_NAME: 'device.model.name', - /** - * The name of the single function that this runtime instance executes. - * - * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes). - */ - FAAS_NAME: 'faas.name', - /** - * The unique ID of the single function that this runtime instance executes. - * - * Note: Depending on the cloud provider, use: - - * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - Take care not to use the "invoked ARN" directly but replace any - [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple - different aliases. - * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) - * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id). - - On some providers, it may not be possible to determine the full ID at startup, - which is why this field cannot be made required. For example, on AWS the account ID - part of the ARN is not available without calling another AWS API - which may be deemed too slow for a short-running lambda function. - As an alternative, consider setting `faas.id` as a span attribute instead. - */ - FAAS_ID: 'faas.id', - /** - * The immutable version of the function being executed. - * - * Note: Depending on the cloud provider and platform, use: - - * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - (an integer represented as a decimal string). - * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) - (i.e., the function name plus the revision suffix). - * **Google Cloud Functions:** The value of the - [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - * **Azure Functions:** Not applicable. Do not set this attribute. - */ - FAAS_VERSION: 'faas.version', - /** - * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. - * - * Note: * **AWS Lambda:** Use the (full) log stream name. - */ - FAAS_INSTANCE: 'faas.instance', - /** - * The amount of memory available to the serverless function in MiB. - * - * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. - */ - FAAS_MAX_MEMORY: 'faas.max_memory', - /** - * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. - */ - HOST_ID: 'host.id', - /** - * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. - */ - HOST_NAME: 'host.name', - /** - * Type of host. For Cloud, this must be the machine type. - */ - HOST_TYPE: 'host.type', - /** - * The CPU architecture the host system is running on. - */ - HOST_ARCH: 'host.arch', - /** - * Name of the VM image or OS install the host was instantiated from. - */ - HOST_IMAGE_NAME: 'host.image.name', - /** - * VM image ID. For Cloud, this value is from the provider. - */ - HOST_IMAGE_ID: 'host.image.id', - /** - * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes). - */ - HOST_IMAGE_VERSION: 'host.image.version', - /** - * The name of the cluster. - */ - K8S_CLUSTER_NAME: 'k8s.cluster.name', - /** - * The name of the Node. - */ - K8S_NODE_NAME: 'k8s.node.name', - /** - * The UID of the Node. - */ - K8S_NODE_UID: 'k8s.node.uid', - /** - * The name of the namespace that the pod is running in. - */ - K8S_NAMESPACE_NAME: 'k8s.namespace.name', - /** - * The UID of the Pod. - */ - K8S_POD_UID: 'k8s.pod.uid', - /** - * The name of the Pod. - */ - K8S_POD_NAME: 'k8s.pod.name', - /** - * The name of the Container in a Pod template. - */ - K8S_CONTAINER_NAME: 'k8s.container.name', - /** - * The UID of the ReplicaSet. - */ - K8S_REPLICASET_UID: 'k8s.replicaset.uid', - /** - * The name of the ReplicaSet. - */ - K8S_REPLICASET_NAME: 'k8s.replicaset.name', - /** - * The UID of the Deployment. - */ - K8S_DEPLOYMENT_UID: 'k8s.deployment.uid', - /** - * The name of the Deployment. - */ - K8S_DEPLOYMENT_NAME: 'k8s.deployment.name', - /** - * The UID of the StatefulSet. - */ - K8S_STATEFULSET_UID: 'k8s.statefulset.uid', - /** - * The name of the StatefulSet. - */ - K8S_STATEFULSET_NAME: 'k8s.statefulset.name', - /** - * The UID of the DaemonSet. - */ - K8S_DAEMONSET_UID: 'k8s.daemonset.uid', - /** - * The name of the DaemonSet. - */ - K8S_DAEMONSET_NAME: 'k8s.daemonset.name', - /** - * The UID of the Job. - */ - K8S_JOB_UID: 'k8s.job.uid', - /** - * The name of the Job. - */ - K8S_JOB_NAME: 'k8s.job.name', - /** - * The UID of the CronJob. - */ - K8S_CRONJOB_UID: 'k8s.cronjob.uid', - /** - * The name of the CronJob. - */ - K8S_CRONJOB_NAME: 'k8s.cronjob.name', - /** - * The operating system type. - */ - OS_TYPE: 'os.type', - /** - * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. - */ - OS_DESCRIPTION: 'os.description', - /** - * Human readable operating system name. - */ - OS_NAME: 'os.name', - /** - * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes). - */ - OS_VERSION: 'os.version', - /** - * Process identifier (PID). - */ - PROCESS_PID: 'process.pid', - /** - * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_NAME: 'process.executable.name', - /** - * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_PATH: 'process.executable.path', - /** - * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. - */ - PROCESS_COMMAND: 'process.command', - /** - * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. - */ - PROCESS_COMMAND_LINE: 'process.command_line', - /** - * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. - */ - PROCESS_COMMAND_ARGS: 'process.command_args', - /** - * The username of the user that owns the process. - */ - PROCESS_OWNER: 'process.owner', - /** - * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. - */ - PROCESS_RUNTIME_NAME: 'process.runtime.name', - /** - * The version of the runtime of this process, as returned by the runtime without modification. - */ - PROCESS_RUNTIME_VERSION: 'process.runtime.version', - /** - * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. - */ - PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description', - /** - * Logical name of the service. - * - * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. - */ - SERVICE_NAME: 'service.name', - /** - * A namespace for `service.name`. - * - * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. - */ - SERVICE_NAMESPACE: 'service.namespace', - /** - * The string ID of the service instance. - * - * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). - */ - SERVICE_INSTANCE_ID: 'service.instance.id', - /** - * The version string of the service API or implementation. - */ - SERVICE_VERSION: 'service.version', - /** - * The name of the telemetry SDK as defined above. - */ - TELEMETRY_SDK_NAME: 'telemetry.sdk.name', - /** - * The language of the telemetry SDK. - */ - TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language', - /** - * The version string of the telemetry SDK. - */ - TELEMETRY_SDK_VERSION: 'telemetry.sdk.version', - /** - * The version string of the auto instrumentation agent, if used. - */ - TELEMETRY_AUTO_VERSION: 'telemetry.auto.version', - /** - * The name of the web engine. - */ - WEBENGINE_NAME: 'webengine.name', - /** - * The version of the web engine. - */ - WEBENGINE_VERSION: 'webengine.version', - /** - * Additional description of the web engine (e.g. detailed version and edition information). - */ - WEBENGINE_DESCRIPTION: 'webengine.description', -}; -exports.CloudProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.CloudPlatformValues = { - /** Alibaba Cloud Elastic Compute Service. */ - ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs', - /** Alibaba Cloud Function Compute. */ - ALIBABA_CLOUD_FC: 'alibaba_cloud_fc', - /** AWS Elastic Compute Cloud. */ - AWS_EC2: 'aws_ec2', - /** AWS Elastic Container Service. */ - AWS_ECS: 'aws_ecs', - /** AWS Elastic Kubernetes Service. */ - AWS_EKS: 'aws_eks', - /** AWS Lambda. */ - AWS_LAMBDA: 'aws_lambda', - /** AWS Elastic Beanstalk. */ - AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk', - /** Azure Virtual Machines. */ - AZURE_VM: 'azure_vm', - /** Azure Container Instances. */ - AZURE_CONTAINER_INSTANCES: 'azure_container_instances', - /** Azure Kubernetes Service. */ - AZURE_AKS: 'azure_aks', - /** Azure Functions. */ - AZURE_FUNCTIONS: 'azure_functions', - /** Azure App Service. */ - AZURE_APP_SERVICE: 'azure_app_service', - /** Google Cloud Compute Engine (GCE). */ - GCP_COMPUTE_ENGINE: 'gcp_compute_engine', - /** Google Cloud Run. */ - GCP_CLOUD_RUN: 'gcp_cloud_run', - /** Google Cloud Kubernetes Engine (GKE). */ - GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine', - /** Google Cloud Functions (GCF). */ - GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions', - /** Google Cloud App Engine (GAE). */ - GCP_APP_ENGINE: 'gcp_app_engine', -}; -exports.AwsEcsLaunchtypeValues = { - /** ec2. */ - EC2: 'ec2', - /** fargate. */ - FARGATE: 'fargate', -}; -exports.HostArchValues = { - /** AMD64. */ - AMD64: 'amd64', - /** ARM32. */ - ARM32: 'arm32', - /** ARM64. */ - ARM64: 'arm64', - /** Itanium. */ - IA64: 'ia64', - /** 32-bit PowerPC. */ - PPC32: 'ppc32', - /** 64-bit PowerPC. */ - PPC64: 'ppc64', - /** 32-bit x86. */ - X86: 'x86', -}; -exports.OsTypeValues = { - /** Microsoft Windows. */ - WINDOWS: 'windows', - /** Linux. */ - LINUX: 'linux', - /** Apple Darwin. */ - DARWIN: 'darwin', - /** FreeBSD. */ - FREEBSD: 'freebsd', - /** NetBSD. */ - NETBSD: 'netbsd', - /** OpenBSD. */ - OPENBSD: 'openbsd', - /** DragonFly BSD. */ - DRAGONFLYBSD: 'dragonflybsd', - /** HP-UX (Hewlett Packard Unix). */ - HPUX: 'hpux', - /** AIX (Advanced Interactive eXecutive). */ - AIX: 'aix', - /** Oracle Solaris. */ - SOLARIS: 'solaris', - /** IBM z/OS. */ - Z_OS: 'z_os', -}; -exports.TelemetrySdkLanguageValues = { - /** cpp. */ - CPP: 'cpp', - /** dotnet. */ - DOTNET: 'dotnet', - /** erlang. */ - ERLANG: 'erlang', - /** go. */ - GO: 'go', - /** java. */ - JAVA: 'java', - /** nodejs. */ - NODEJS: 'nodejs', - /** php. */ - PHP: 'php', - /** python. */ - PYTHON: 'python', - /** ruby. */ - RUBY: 'ruby', - /** webjs. */ - WEBJS: 'webjs', -}; -//# sourceMappingURL=SemanticResourceAttributes.js.map +//# sourceMappingURL=types.js.map + +/***/ }), + +/***/ 17387: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createExportMetricsServiceRequest = void 0; +const internal_1 = __nccwpck_require__(2587); +function createExportMetricsServiceRequest(resourceMetrics, options) { + return { + resourceMetrics: resourceMetrics.map(metrics => (0, internal_1.toResourceMetrics)(metrics, options)), + }; +} +exports.createExportMetricsServiceRequest = createExportMetricsServiceRequest; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 2587: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toMetric = exports.toScopeMetrics = exports.toResourceMetrics = void 0; +const api_1 = __nccwpck_require__(65163); +const sdk_metrics_1 = __nccwpck_require__(67349); +const common_1 = __nccwpck_require__(27471); +const internal_1 = __nccwpck_require__(50037); +const internal_2 = __nccwpck_require__(72018); +function toResourceMetrics(resourceMetrics, options) { + const encoder = (0, common_1.getOtlpEncoder)(options); + return { + resource: (0, internal_2.createResource)(resourceMetrics.resource), + schemaUrl: undefined, + scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics, encoder), + }; +} +exports.toResourceMetrics = toResourceMetrics; +function toScopeMetrics(scopeMetrics, encoder) { + return Array.from(scopeMetrics.map(metrics => ({ + scope: (0, internal_1.createInstrumentationScope)(metrics.scope), + metrics: metrics.metrics.map(metricData => toMetric(metricData, encoder)), + schemaUrl: metrics.scope.schemaUrl, + }))); +} +exports.toScopeMetrics = toScopeMetrics; +function toMetric(metricData, encoder) { + const out = { + name: metricData.descriptor.name, + description: metricData.descriptor.description, + unit: metricData.descriptor.unit, + }; + const aggregationTemporality = toAggregationTemporality(metricData.aggregationTemporality); + switch (metricData.dataPointType) { + case sdk_metrics_1.DataPointType.SUM: + out.sum = { + aggregationTemporality, + isMonotonic: metricData.isMonotonic, + dataPoints: toSingularDataPoints(metricData, encoder), + }; + break; + case sdk_metrics_1.DataPointType.GAUGE: + out.gauge = { + dataPoints: toSingularDataPoints(metricData, encoder), + }; + break; + case sdk_metrics_1.DataPointType.HISTOGRAM: + out.histogram = { + aggregationTemporality, + dataPoints: toHistogramDataPoints(metricData, encoder), + }; + break; + case sdk_metrics_1.DataPointType.EXPONENTIAL_HISTOGRAM: + out.exponentialHistogram = { + aggregationTemporality, + dataPoints: toExponentialHistogramDataPoints(metricData, encoder), + }; + break; + } + return out; +} +exports.toMetric = toMetric; +function toSingularDataPoint(dataPoint, valueType, encoder) { + const out = { + attributes: (0, internal_1.toAttributes)(dataPoint.attributes), + startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime), + timeUnixNano: encoder.encodeHrTime(dataPoint.endTime), + }; + switch (valueType) { + case api_1.ValueType.INT: + out.asInt = dataPoint.value; + break; + case api_1.ValueType.DOUBLE: + out.asDouble = dataPoint.value; + break; + } + return out; +} +function toSingularDataPoints(metricData, encoder) { + return metricData.dataPoints.map(dataPoint => { + return toSingularDataPoint(dataPoint, metricData.descriptor.valueType, encoder); + }); +} +function toHistogramDataPoints(metricData, encoder) { + return metricData.dataPoints.map(dataPoint => { + const histogram = dataPoint.value; + return { + attributes: (0, internal_1.toAttributes)(dataPoint.attributes), + bucketCounts: histogram.buckets.counts, + explicitBounds: histogram.buckets.boundaries, + count: histogram.count, + sum: histogram.sum, + min: histogram.min, + max: histogram.max, + startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime), + timeUnixNano: encoder.encodeHrTime(dataPoint.endTime), + }; + }); +} +function toExponentialHistogramDataPoints(metricData, encoder) { + return metricData.dataPoints.map(dataPoint => { + const histogram = dataPoint.value; + return { + attributes: (0, internal_1.toAttributes)(dataPoint.attributes), + count: histogram.count, + min: histogram.min, + max: histogram.max, + sum: histogram.sum, + positive: { + offset: histogram.positive.offset, + bucketCounts: histogram.positive.bucketCounts, + }, + negative: { + offset: histogram.negative.offset, + bucketCounts: histogram.negative.bucketCounts, + }, + scale: histogram.scale, + zeroCount: histogram.zeroCount, + startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime), + timeUnixNano: encoder.encodeHrTime(dataPoint.endTime), + }; + }); +} +function toAggregationTemporality(temporality) { + switch (temporality) { + case sdk_metrics_1.AggregationTemporality.DELTA: + return 1 /* AGGREGATION_TEMPORALITY_DELTA */; + case sdk_metrics_1.AggregationTemporality.CUMULATIVE: + return 2 /* AGGREGATION_TEMPORALITY_CUMULATIVE */; + } +} +//# sourceMappingURL=internal.js.map + +/***/ }), + +/***/ 87629: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=types.js.map + +/***/ }), + +/***/ 72018: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createResource = void 0; +const internal_1 = __nccwpck_require__(50037); +function createResource(resource) { + return { + attributes: (0, internal_1.toAttributes)(resource.attributes), + droppedAttributesCount: 0, + }; +} +exports.createResource = createResource; +//# sourceMappingURL=internal.js.map + +/***/ }), + +/***/ 88531: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=types.js.map + +/***/ }), + +/***/ 29036: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createExportTraceServiceRequest = void 0; +const internal_1 = __nccwpck_require__(18106); +const common_1 = __nccwpck_require__(27471); +const internal_2 = __nccwpck_require__(50037); +const internal_3 = __nccwpck_require__(72018); +function createExportTraceServiceRequest(spans, options) { + const encoder = (0, common_1.getOtlpEncoder)(options); + return { + resourceSpans: spanRecordsToResourceSpans(spans, encoder), + }; +} +exports.createExportTraceServiceRequest = createExportTraceServiceRequest; +function createResourceMap(readableSpans) { + const resourceMap = new Map(); + for (const record of readableSpans) { + let ilmMap = resourceMap.get(record.resource); + if (!ilmMap) { + ilmMap = new Map(); + resourceMap.set(record.resource, ilmMap); + } + // TODO this is duplicated in basic tracer. Consolidate on a common helper in core + const instrumentationLibraryKey = `${record.instrumentationLibrary.name}@${record.instrumentationLibrary.version || ''}:${record.instrumentationLibrary.schemaUrl || ''}`; + let records = ilmMap.get(instrumentationLibraryKey); + if (!records) { + records = []; + ilmMap.set(instrumentationLibraryKey, records); + } + records.push(record); + } + return resourceMap; +} +function spanRecordsToResourceSpans(readableSpans, encoder) { + const resourceMap = createResourceMap(readableSpans); + const out = []; + const entryIterator = resourceMap.entries(); + let entry = entryIterator.next(); + while (!entry.done) { + const [resource, ilmMap] = entry.value; + const scopeResourceSpans = []; + const ilmIterator = ilmMap.values(); + let ilmEntry = ilmIterator.next(); + while (!ilmEntry.done) { + const scopeSpans = ilmEntry.value; + if (scopeSpans.length > 0) { + const spans = scopeSpans.map(readableSpan => (0, internal_1.sdkSpanToOtlpSpan)(readableSpan, encoder)); + scopeResourceSpans.push({ + scope: (0, internal_2.createInstrumentationScope)(scopeSpans[0].instrumentationLibrary), + spans: spans, + schemaUrl: scopeSpans[0].instrumentationLibrary.schemaUrl, + }); + } + ilmEntry = ilmIterator.next(); + } + // TODO SDK types don't provide resource schema URL at this time + const transformedSpans = { + resource: (0, internal_3.createResource)(resource), + scopeSpans: scopeResourceSpans, + schemaUrl: undefined, + }; + out.push(transformedSpans); + entry = entryIterator.next(); + } + return out; +} +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 18106: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toOtlpSpanEvent = exports.toOtlpLink = exports.sdkSpanToOtlpSpan = void 0; +const internal_1 = __nccwpck_require__(50037); +function sdkSpanToOtlpSpan(span, encoder) { + var _a; + const ctx = span.spanContext(); + const status = span.status; + return { + traceId: encoder.encodeSpanContext(ctx.traceId), + spanId: encoder.encodeSpanContext(ctx.spanId), + parentSpanId: encoder.encodeOptionalSpanContext(span.parentSpanId), + traceState: (_a = ctx.traceState) === null || _a === void 0 ? void 0 : _a.serialize(), + name: span.name, + // Span kind is offset by 1 because the API does not define a value for unset + kind: span.kind == null ? 0 : span.kind + 1, + startTimeUnixNano: encoder.encodeHrTime(span.startTime), + endTimeUnixNano: encoder.encodeHrTime(span.endTime), + attributes: (0, internal_1.toAttributes)(span.attributes), + droppedAttributesCount: span.droppedAttributesCount, + events: span.events.map(event => toOtlpSpanEvent(event, encoder)), + droppedEventsCount: span.droppedEventsCount, + status: { + // API and proto enums share the same values + code: status.code, + message: status.message, + }, + links: span.links.map(link => toOtlpLink(link, encoder)), + droppedLinksCount: span.droppedLinksCount, + }; +} +exports.sdkSpanToOtlpSpan = sdkSpanToOtlpSpan; +function toOtlpLink(link, encoder) { + var _a; + return { + attributes: link.attributes ? (0, internal_1.toAttributes)(link.attributes) : [], + spanId: encoder.encodeSpanContext(link.context.spanId), + traceId: encoder.encodeSpanContext(link.context.traceId), + traceState: (_a = link.context.traceState) === null || _a === void 0 ? void 0 : _a.serialize(), + droppedAttributesCount: link.droppedAttributesCount || 0, + }; +} +exports.toOtlpLink = toOtlpLink; +function toOtlpSpanEvent(timedEvent, encoder) { + return { + attributes: timedEvent.attributes + ? (0, internal_1.toAttributes)(timedEvent.attributes) + : [], + name: timedEvent.name, + timeUnixNano: encoder.encodeHrTime(timedEvent.time), + droppedAttributesCount: timedEvent.droppedAttributesCount || 0, + }; +} +exports.toOtlpSpanEvent = toOtlpSpanEvent; +//# sourceMappingURL=internal.js.map + +/***/ }), + +/***/ 31699: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ESpanKind = void 0; +/** + * SpanKind is the type of span. Can be used to specify additional relationships between spans + * in addition to a parent/child relationship. + */ +var ESpanKind; +(function (ESpanKind) { + /** Unspecified. Do NOT use as default. Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED. */ + ESpanKind[ESpanKind["SPAN_KIND_UNSPECIFIED"] = 0] = "SPAN_KIND_UNSPECIFIED"; + /** Indicates that the span represents an internal operation within an application, + * as opposed to an operation happening at the boundaries. Default value. + */ + ESpanKind[ESpanKind["SPAN_KIND_INTERNAL"] = 1] = "SPAN_KIND_INTERNAL"; + /** Indicates that the span covers server-side handling of an RPC or other + * remote network request. + */ + ESpanKind[ESpanKind["SPAN_KIND_SERVER"] = 2] = "SPAN_KIND_SERVER"; + /** Indicates that the span describes a request to some remote service. + */ + ESpanKind[ESpanKind["SPAN_KIND_CLIENT"] = 3] = "SPAN_KIND_CLIENT"; + /** Indicates that the span describes a producer sending a message to a broker. + * Unlike CLIENT and SERVER, there is often no direct critical path latency relationship + * between producer and consumer spans. A PRODUCER span ends when the message was accepted + * by the broker while the logical processing of the message might span a much longer time. + */ + ESpanKind[ESpanKind["SPAN_KIND_PRODUCER"] = 4] = "SPAN_KIND_PRODUCER"; + /** Indicates that the span describes consumer receiving a message from a broker. + * Like the PRODUCER kind, there is often no direct critical path latency relationship + * between producer and consumer spans. + */ + ESpanKind[ESpanKind["SPAN_KIND_CONSUMER"] = 5] = "SPAN_KIND_CONSUMER"; +})(ESpanKind = exports.ESpanKind || (exports.ESpanKind = {})); +//# sourceMappingURL=types.js.map /***/ }), -/***/ 52381: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 72723: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); /* * Copyright The OpenTelemetry Authors * @@ -54785,13 +57140,108 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); * See the License for the specific language governing permissions and * limitations under the License. */ -__exportStar(__nccwpck_require__(29996), exports); -//# sourceMappingURL=index.js.map +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Resource = void 0; +const api_1 = __nccwpck_require__(65163); +const semantic_conventions_1 = __nccwpck_require__(67275); +const core_1 = __nccwpck_require__(89736); +const platform_1 = __nccwpck_require__(7784); +/** + * A Resource describes the entity for which a signals (metrics or trace) are + * collected. + */ +class Resource { + constructor( + /** + * A dictionary of attributes with string keys and values that provide + * information about the entity as numbers, strings or booleans + * TODO: Consider to add check/validation on attributes. + */ + attributes, asyncAttributesPromise) { + var _a; + this._attributes = attributes; + this.asyncAttributesPending = asyncAttributesPromise != null; + this._syncAttributes = (_a = this._attributes) !== null && _a !== void 0 ? _a : {}; + this._asyncAttributesPromise = asyncAttributesPromise === null || asyncAttributesPromise === void 0 ? void 0 : asyncAttributesPromise.then(asyncAttributes => { + this._attributes = Object.assign({}, this._attributes, asyncAttributes); + this.asyncAttributesPending = false; + return asyncAttributes; + }, err => { + api_1.diag.debug("a resource's async attributes promise rejected: %s", err); + this.asyncAttributesPending = false; + return {}; + }); + } + /** + * Returns an empty Resource + */ + static empty() { + return Resource.EMPTY; + } + /** + * Returns a Resource that identifies the SDK in use. + */ + static default() { + return new Resource({ + [semantic_conventions_1.SEMRESATTRS_SERVICE_NAME]: (0, platform_1.defaultServiceName)(), + [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]: core_1.SDK_INFO[semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE], + [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_NAME]: core_1.SDK_INFO[semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_NAME], + [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_VERSION]: core_1.SDK_INFO[semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_VERSION], + }); + } + get attributes() { + var _a; + if (this.asyncAttributesPending) { + api_1.diag.error('Accessing resource attributes before async attributes settled'); + } + return (_a = this._attributes) !== null && _a !== void 0 ? _a : {}; + } + /** + * Returns a promise that will never be rejected. Resolves when all async attributes have finished being added to + * this Resource's attributes. This is useful in exporters to block until resource detection + * has finished. + */ + async waitForAsyncAttributes() { + if (this.asyncAttributesPending) { + await this._asyncAttributesPromise; + } + } + /** + * Returns a new, merged {@link Resource} by merging the current Resource + * with the other Resource. In case of a collision, other Resource takes + * precedence. + * + * @param other the Resource that will be merged with this. + * @returns the newly merged Resource. + */ + merge(other) { + var _a; + if (!other) + return this; + // SpanAttributes from other resource overwrite attributes from this resource. + const mergedSyncAttributes = Object.assign(Object.assign({}, this._syncAttributes), ((_a = other._syncAttributes) !== null && _a !== void 0 ? _a : other.attributes)); + if (!this._asyncAttributesPromise && + !other._asyncAttributesPromise) { + return new Resource(mergedSyncAttributes); + } + const mergedAttributesPromise = Promise.all([ + this._asyncAttributesPromise, + other._asyncAttributesPromise, + ]).then(([thisAsyncAttributes, otherAsyncAttributes]) => { + var _a; + return Object.assign(Object.assign(Object.assign(Object.assign({}, this._syncAttributes), thisAsyncAttributes), ((_a = other._syncAttributes) !== null && _a !== void 0 ? _a : other.attributes)), otherAsyncAttributes); + }); + return new Resource(mergedSyncAttributes, mergedAttributesPromise); + } +} +exports.Resource = Resource; +Resource.EMPTY = new Resource({}); +//# sourceMappingURL=Resource.js.map /***/ }), -/***/ 76409: -/***/ ((__unused_webpack_module, exports) => { +/***/ 990: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -54811,895 +57261,104 @@ __exportStar(__nccwpck_require__(29996), exports); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticAttributes = { - /** - * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). - * - * Note: This may be different from `faas.id` if an alias is involved. - */ - AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn', - /** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - */ - DB_SYSTEM: 'db.system', - /** - * The connection string used to connect to the database. It is recommended to remove embedded credentials. - */ - DB_CONNECTION_STRING: 'db.connection_string', - /** - * Username for accessing the database. - */ - DB_USER: 'db.user', - /** - * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. - */ - DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname', - /** - * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). - * - * Note: In some SQL databases, the database name to be used is called "schema name". - */ - DB_NAME: 'db.name', - /** - * The database statement being executed. - * - * Note: The value may be sanitized to exclude sensitive information. - */ - DB_STATEMENT: 'db.statement', - /** - * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. - * - * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. - */ - DB_OPERATION: 'db.operation', - /** - * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. - * - * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). - */ - DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name', - /** - * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace', - /** - * The fetch size used for paging, i.e. how many rows will be returned at once. - */ - DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size', - /** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - */ - DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_CASSANDRA_TABLE: 'db.cassandra.table', - /** - * Whether or not the query is idempotent. - */ - DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence', - /** - * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. - */ - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count', - /** - * The ID of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id', - /** - * The data center of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc', - /** - * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_HBASE_NAMESPACE: 'db.hbase.namespace', - /** - * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. - */ - DB_REDIS_DATABASE_INDEX: 'db.redis.database_index', - /** - * The collection being accessed within the database stated in `db.name`. - */ - DB_MONGODB_COLLECTION: 'db.mongodb.collection', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_SQL_TABLE: 'db.sql.table', - /** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. - */ - EXCEPTION_TYPE: 'exception.type', - /** - * The exception message. - */ - EXCEPTION_MESSAGE: 'exception.message', - /** - * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - */ - EXCEPTION_STACKTRACE: 'exception.stacktrace', - /** - * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. - * - * Note: An exception is considered to have escaped (or left) the scope of a span, - if that span is ended while the exception is still logically "in flight". - This may be actually "in flight" in some languages (e.g. if the exception - is passed to a Context manager's `__exit__` method in Python) but will - usually be caught at the point of recording the exception in most languages. - - It is usually not possible to determine at the point where an exception is thrown - whether it will escape the scope of a span. - However, it is trivial to know that an exception - will escape, if one checks for an active exception just before ending the span, - as done in the [example above](#exception-end-example). - - It follows that an exception may still escape the scope of the span - even if the `exception.escaped` attribute was not set or set to false, - since the event might have been recorded at a time where it was not - clear whether the exception will escape. - */ - EXCEPTION_ESCAPED: 'exception.escaped', - /** - * Type of the trigger on which the function is executed. - */ - FAAS_TRIGGER: 'faas.trigger', - /** - * The execution ID of the current function execution. - */ - FAAS_EXECUTION: 'faas.execution', - /** - * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - */ - FAAS_DOCUMENT_COLLECTION: 'faas.document.collection', - /** - * Describes the type of the operation that was performed on the data. - */ - FAAS_DOCUMENT_OPERATION: 'faas.document.operation', - /** - * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_DOCUMENT_TIME: 'faas.document.time', - /** - * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. - */ - FAAS_DOCUMENT_NAME: 'faas.document.name', - /** - * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_TIME: 'faas.time', - /** - * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - */ - FAAS_CRON: 'faas.cron', - /** - * A boolean that is true if the serverless function is executed for the first time (aka cold-start). - */ - FAAS_COLDSTART: 'faas.coldstart', - /** - * The name of the invoked function. - * - * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. - */ - FAAS_INVOKED_NAME: 'faas.invoked_name', - /** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - */ - FAAS_INVOKED_PROVIDER: 'faas.invoked_provider', - /** - * The cloud region of the invoked function. - * - * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. - */ - FAAS_INVOKED_REGION: 'faas.invoked_region', - /** - * Transport protocol used. See note below. - */ - NET_TRANSPORT: 'net.transport', - /** - * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). - */ - NET_PEER_IP: 'net.peer.ip', - /** - * Remote port number. - */ - NET_PEER_PORT: 'net.peer.port', - /** - * Remote hostname or similar, see note below. - */ - NET_PEER_NAME: 'net.peer.name', - /** - * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. - */ - NET_HOST_IP: 'net.host.ip', - /** - * Like `net.peer.port` but for the host port. - */ - NET_HOST_PORT: 'net.host.port', - /** - * Local hostname or similar, see note below. - */ - NET_HOST_NAME: 'net.host.name', - /** - * The internet connection type currently being used by the host. - */ - NET_HOST_CONNECTION_TYPE: 'net.host.connection.type', - /** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - */ - NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype', - /** - * The name of the mobile carrier. - */ - NET_HOST_CARRIER_NAME: 'net.host.carrier.name', - /** - * The mobile carrier country code. - */ - NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc', - /** - * The mobile carrier network code. - */ - NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc', - /** - * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. - */ - NET_HOST_CARRIER_ICC: 'net.host.carrier.icc', - /** - * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. - */ - PEER_SERVICE: 'peer.service', - /** - * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. - */ - ENDUSER_ID: 'enduser.id', - /** - * Actual/assumed role the client is making the request under extracted from token or application security context. - */ - ENDUSER_ROLE: 'enduser.role', - /** - * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - */ - ENDUSER_SCOPE: 'enduser.scope', - /** - * Current "managed" thread ID (as opposed to OS thread ID). - */ - THREAD_ID: 'thread.id', - /** - * Current thread name. - */ - THREAD_NAME: 'thread.name', - /** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). - */ - CODE_FUNCTION: 'code.function', - /** - * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. - */ - CODE_NAMESPACE: 'code.namespace', - /** - * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). - */ - CODE_FILEPATH: 'code.filepath', - /** - * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. - */ - CODE_LINENO: 'code.lineno', - /** - * HTTP request method. - */ - HTTP_METHOD: 'http.method', - /** - * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. - * - * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`. - */ - HTTP_URL: 'http.url', - /** - * The full request target as passed in a HTTP request line or equivalent. - */ - HTTP_TARGET: 'http.target', - /** - * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note. - * - * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set. - */ - HTTP_HOST: 'http.host', - /** - * The URI scheme identifying the used protocol. - */ - HTTP_SCHEME: 'http.scheme', - /** - * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). - */ - HTTP_STATUS_CODE: 'http.status_code', - /** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - */ - HTTP_FLAVOR: 'http.flavor', - /** - * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. - */ - HTTP_USER_AGENT: 'http.user_agent', - /** - * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length', - /** - * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed', - /** - * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length', - /** - * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed', - /** - * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). - * - * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available. - */ - HTTP_SERVER_NAME: 'http.server_name', - /** - * The matched route (path template). - */ - HTTP_ROUTE: 'http.route', - /** - * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). - * - * Note: This is not necessarily the same as `net.peer.ip`, which would - identify the network-level peer, which may be a proxy. - - This attribute should be set when a source of information different - from the one used for `net.peer.ip`, is available even if that other - source just confirms the same value as `net.peer.ip`. - Rationale: For `net.peer.ip`, one typically does not know if it - comes from a proxy, reverse proxy, or the actual client. Setting - `http.client_ip` when it's the same as `net.peer.ip` means that - one is at least somewhat confident that the address is not that of - the closest proxy. - */ - HTTP_CLIENT_IP: 'http.client_ip', - /** - * The keys in the `RequestItems` object field. - */ - AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names', - /** - * The JSON-serialized value of each item in the `ConsumedCapacity` response field. - */ - AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity', - /** - * The JSON-serialized value of the `ItemCollectionMetrics` response field. - */ - AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics', - /** - * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity', - /** - * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity', - /** - * The value of the `ConsistentRead` request parameter. - */ - AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read', - /** - * The value of the `ProjectionExpression` request parameter. - */ - AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection', - /** - * The value of the `Limit` request parameter. - */ - AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit', - /** - * The value of the `AttributesToGet` request parameter. - */ - AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get', - /** - * The value of the `IndexName` request parameter. - */ - AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name', - /** - * The value of the `Select` request parameter. - */ - AWS_DYNAMODB_SELECT: 'aws.dynamodb.select', - /** - * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes', - /** - * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes', - /** - * The value of the `ExclusiveStartTableName` request parameter. - */ - AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table', - /** - * The the number of items in the `TableNames` response parameter. - */ - AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count', - /** - * The value of the `ScanIndexForward` request parameter. - */ - AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward', - /** - * The value of the `Segment` request parameter. - */ - AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment', - /** - * The value of the `TotalSegments` request parameter. - */ - AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments', - /** - * The value of the `Count` response parameter. - */ - AWS_DYNAMODB_COUNT: 'aws.dynamodb.count', - /** - * The value of the `ScannedCount` response parameter. - */ - AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count', - /** - * The JSON-serialized value of each item in the `AttributeDefinitions` request field. - */ - AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions', - /** - * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates', - /** - * A string identifying the messaging system. - */ - MESSAGING_SYSTEM: 'messaging.system', - /** - * The message destination name. This might be equal to the span name but is required nevertheless. - */ - MESSAGING_DESTINATION: 'messaging.destination', - /** - * The kind of message destination. - */ - MESSAGING_DESTINATION_KIND: 'messaging.destination_kind', - /** - * A boolean that is true if the message destination is temporary. - */ - MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination', - /** - * The name of the transport protocol. - */ - MESSAGING_PROTOCOL: 'messaging.protocol', - /** - * The version of the transport protocol. - */ - MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version', - /** - * Connection string. - */ - MESSAGING_URL: 'messaging.url', - /** - * A value used by the messaging system as an identifier for the message, represented as a string. - */ - MESSAGING_MESSAGE_ID: 'messaging.message_id', - /** - * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". - */ - MESSAGING_CONVERSATION_ID: 'messaging.conversation_id', - /** - * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. - */ - MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes', - /** - * The compressed size of the message payload in bytes. - */ - MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes', - /** - * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. - */ - MESSAGING_OPERATION: 'messaging.operation', - /** - * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. - */ - MESSAGING_CONSUMER_ID: 'messaging.consumer_id', - /** - * RabbitMQ message routing key. - */ - MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key', - /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. - * - * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. - */ - MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key', - /** - * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. - */ - MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group', - /** - * Client Id for the Consumer or Producer that is handling the message. - */ - MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id', - /** - * Partition the message is sent to. - */ - MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition', - /** - * A boolean that is true if the message is a tombstone. - */ - MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone', - /** - * A string identifying the remoting system. - */ - RPC_SYSTEM: 'rpc.system', - /** - * The full (logical) name of the service being called, including its package name, if applicable. - * - * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). - */ - RPC_SERVICE: 'rpc.service', - /** - * The name of the (logical) method being called, must be equal to the $method part in the span name. - * - * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). - */ - RPC_METHOD: 'rpc.method', - /** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - */ - RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code', - /** - * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted. - */ - RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version', - /** - * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. - */ - RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id', - /** - * `error.code` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code', - /** - * `error.message` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message', - /** - * Whether this is a received or sent message. - */ - MESSAGE_TYPE: 'message.type', - /** - * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. - * - * Note: This way we guarantee that the values will be consistent between different implementations. - */ - MESSAGE_ID: 'message.id', - /** - * Compressed size of the message in bytes. - */ - MESSAGE_COMPRESSED_SIZE: 'message.compressed_size', - /** - * Uncompressed size of the message in bytes. - */ - MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size', -}; -exports.DbSystemValues = { - /** Some other SQL database. Fallback only. See notes. */ - OTHER_SQL: 'other_sql', - /** Microsoft SQL Server. */ - MSSQL: 'mssql', - /** MySQL. */ - MYSQL: 'mysql', - /** Oracle Database. */ - ORACLE: 'oracle', - /** IBM Db2. */ - DB2: 'db2', - /** PostgreSQL. */ - POSTGRESQL: 'postgresql', - /** Amazon Redshift. */ - REDSHIFT: 'redshift', - /** Apache Hive. */ - HIVE: 'hive', - /** Cloudscape. */ - CLOUDSCAPE: 'cloudscape', - /** HyperSQL DataBase. */ - HSQLDB: 'hsqldb', - /** Progress Database. */ - PROGRESS: 'progress', - /** SAP MaxDB. */ - MAXDB: 'maxdb', - /** SAP HANA. */ - HANADB: 'hanadb', - /** Ingres. */ - INGRES: 'ingres', - /** FirstSQL. */ - FIRSTSQL: 'firstsql', - /** EnterpriseDB. */ - EDB: 'edb', - /** InterSystems Caché. */ - CACHE: 'cache', - /** Adabas (Adaptable Database System). */ - ADABAS: 'adabas', - /** Firebird. */ - FIREBIRD: 'firebird', - /** Apache Derby. */ - DERBY: 'derby', - /** FileMaker. */ - FILEMAKER: 'filemaker', - /** Informix. */ - INFORMIX: 'informix', - /** InstantDB. */ - INSTANTDB: 'instantdb', - /** InterBase. */ - INTERBASE: 'interbase', - /** MariaDB. */ - MARIADB: 'mariadb', - /** Netezza. */ - NETEZZA: 'netezza', - /** Pervasive PSQL. */ - PERVASIVE: 'pervasive', - /** PointBase. */ - POINTBASE: 'pointbase', - /** SQLite. */ - SQLITE: 'sqlite', - /** Sybase. */ - SYBASE: 'sybase', - /** Teradata. */ - TERADATA: 'teradata', - /** Vertica. */ - VERTICA: 'vertica', - /** H2. */ - H2: 'h2', - /** ColdFusion IMQ. */ - COLDFUSION: 'coldfusion', - /** Apache Cassandra. */ - CASSANDRA: 'cassandra', - /** Apache HBase. */ - HBASE: 'hbase', - /** MongoDB. */ - MONGODB: 'mongodb', - /** Redis. */ - REDIS: 'redis', - /** Couchbase. */ - COUCHBASE: 'couchbase', - /** CouchDB. */ - COUCHDB: 'couchdb', - /** Microsoft Azure Cosmos DB. */ - COSMOSDB: 'cosmosdb', - /** Amazon DynamoDB. */ - DYNAMODB: 'dynamodb', - /** Neo4j. */ - NEO4J: 'neo4j', - /** Apache Geode. */ - GEODE: 'geode', - /** Elasticsearch. */ - ELASTICSEARCH: 'elasticsearch', - /** Memcached. */ - MEMCACHED: 'memcached', - /** CockroachDB. */ - COCKROACHDB: 'cockroachdb', -}; -exports.DbCassandraConsistencyLevelValues = { - /** all. */ - ALL: 'all', - /** each_quorum. */ - EACH_QUORUM: 'each_quorum', - /** quorum. */ - QUORUM: 'quorum', - /** local_quorum. */ - LOCAL_QUORUM: 'local_quorum', - /** one. */ - ONE: 'one', - /** two. */ - TWO: 'two', - /** three. */ - THREE: 'three', - /** local_one. */ - LOCAL_ONE: 'local_one', - /** any. */ - ANY: 'any', - /** serial. */ - SERIAL: 'serial', - /** local_serial. */ - LOCAL_SERIAL: 'local_serial', -}; -exports.FaasTriggerValues = { - /** A response to some data source operation such as a database or filesystem read/write. */ - DATASOURCE: 'datasource', - /** To provide an answer to an inbound HTTP request. */ - HTTP: 'http', - /** A function is set to be executed when messages are sent to a messaging system. */ - PUBSUB: 'pubsub', - /** A function is scheduled to be executed regularly. */ - TIMER: 'timer', - /** If none of the others apply. */ - OTHER: 'other', -}; -exports.FaasDocumentOperationValues = { - /** When a new object is created. */ - INSERT: 'insert', - /** When an object is modified. */ - EDIT: 'edit', - /** When an object is deleted. */ - DELETE: 'delete', -}; -exports.FaasInvokedProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.NetTransportValues = { - /** ip_tcp. */ - IP_TCP: 'ip_tcp', - /** ip_udp. */ - IP_UDP: 'ip_udp', - /** Another IP-based protocol. */ - IP: 'ip', - /** Unix Domain socket. See below. */ - UNIX: 'unix', - /** Named or anonymous pipe. See note below. */ - PIPE: 'pipe', - /** In-process communication. */ - INPROC: 'inproc', - /** Something else (non IP-based). */ - OTHER: 'other', -}; -exports.NetHostConnectionTypeValues = { - /** wifi. */ - WIFI: 'wifi', - /** wired. */ - WIRED: 'wired', - /** cell. */ - CELL: 'cell', - /** unavailable. */ - UNAVAILABLE: 'unavailable', - /** unknown. */ - UNKNOWN: 'unknown', -}; -exports.NetHostConnectionSubtypeValues = { - /** GPRS. */ - GPRS: 'gprs', - /** EDGE. */ - EDGE: 'edge', - /** UMTS. */ - UMTS: 'umts', - /** CDMA. */ - CDMA: 'cdma', - /** EVDO Rel. 0. */ - EVDO_0: 'evdo_0', - /** EVDO Rev. A. */ - EVDO_A: 'evdo_a', - /** CDMA2000 1XRTT. */ - CDMA2000_1XRTT: 'cdma2000_1xrtt', - /** HSDPA. */ - HSDPA: 'hsdpa', - /** HSUPA. */ - HSUPA: 'hsupa', - /** HSPA. */ - HSPA: 'hspa', - /** IDEN. */ - IDEN: 'iden', - /** EVDO Rev. B. */ - EVDO_B: 'evdo_b', - /** LTE. */ - LTE: 'lte', - /** EHRPD. */ - EHRPD: 'ehrpd', - /** HSPAP. */ - HSPAP: 'hspap', - /** GSM. */ - GSM: 'gsm', - /** TD-SCDMA. */ - TD_SCDMA: 'td_scdma', - /** IWLAN. */ - IWLAN: 'iwlan', - /** 5G NR (New Radio). */ - NR: 'nr', - /** 5G NRNSA (New Radio Non-Standalone). */ - NRNSA: 'nrnsa', - /** LTE CA. */ - LTE_CA: 'lte_ca', -}; -exports.HttpFlavorValues = { - /** HTTP 1.0. */ - HTTP_1_0: '1.0', - /** HTTP 1.1. */ - HTTP_1_1: '1.1', - /** HTTP 2. */ - HTTP_2_0: '2.0', - /** SPDY protocol. */ - SPDY: 'SPDY', - /** QUIC protocol. */ - QUIC: 'QUIC', -}; -exports.MessagingDestinationKindValues = { - /** A message sent to a queue. */ - QUEUE: 'queue', - /** A message sent to a topic. */ - TOPIC: 'topic', -}; -exports.MessagingOperationValues = { - /** receive. */ - RECEIVE: 'receive', - /** process. */ - PROCESS: 'process', +exports.detectResourcesSync = exports.detectResources = void 0; +const Resource_1 = __nccwpck_require__(72723); +const api_1 = __nccwpck_require__(65163); +const utils_1 = __nccwpck_require__(44298); +/** + * Runs all resource detectors and returns the results merged into a single Resource. Promise + * does not resolve until all the underlying detectors have resolved, unlike + * detectResourcesSync. + * + * @deprecated use detectResourcesSync() instead. + * @param config Configuration for resource detection + */ +const detectResources = async (config = {}) => { + const resources = await Promise.all((config.detectors || []).map(async (d) => { + try { + const resource = await d.detect(config); + api_1.diag.debug(`${d.constructor.name} found resource.`, resource); + return resource; + } + catch (e) { + api_1.diag.debug(`${d.constructor.name} failed: ${e.message}`); + return Resource_1.Resource.empty(); + } + })); + // Future check if verbose logging is enabled issue #1903 + logResources(resources); + return resources.reduce((acc, resource) => acc.merge(resource), Resource_1.Resource.empty()); }; -exports.RpcGrpcStatusCodeValues = { - /** OK. */ - OK: 0, - /** CANCELLED. */ - CANCELLED: 1, - /** UNKNOWN. */ - UNKNOWN: 2, - /** INVALID_ARGUMENT. */ - INVALID_ARGUMENT: 3, - /** DEADLINE_EXCEEDED. */ - DEADLINE_EXCEEDED: 4, - /** NOT_FOUND. */ - NOT_FOUND: 5, - /** ALREADY_EXISTS. */ - ALREADY_EXISTS: 6, - /** PERMISSION_DENIED. */ - PERMISSION_DENIED: 7, - /** RESOURCE_EXHAUSTED. */ - RESOURCE_EXHAUSTED: 8, - /** FAILED_PRECONDITION. */ - FAILED_PRECONDITION: 9, - /** ABORTED. */ - ABORTED: 10, - /** OUT_OF_RANGE. */ - OUT_OF_RANGE: 11, - /** UNIMPLEMENTED. */ - UNIMPLEMENTED: 12, - /** INTERNAL. */ - INTERNAL: 13, - /** UNAVAILABLE. */ - UNAVAILABLE: 14, - /** DATA_LOSS. */ - DATA_LOSS: 15, - /** UNAUTHENTICATED. */ - UNAUTHENTICATED: 16, +exports.detectResources = detectResources; +/** + * Runs all resource detectors synchronously, merging their results. In case of attribute collision later resources will take precedence. + * + * @param config Configuration for resource detection + */ +const detectResourcesSync = (config = {}) => { + var _a; + const resources = ((_a = config.detectors) !== null && _a !== void 0 ? _a : []).map((d) => { + try { + const resourceOrPromise = d.detect(config); + let resource; + if ((0, utils_1.isPromiseLike)(resourceOrPromise)) { + const createPromise = async () => { + const resolvedResource = await resourceOrPromise; + return resolvedResource.attributes; + }; + resource = new Resource_1.Resource({}, createPromise()); + } + else { + resource = resourceOrPromise; + } + if (resource.waitForAsyncAttributes) { + void resource + .waitForAsyncAttributes() + .then(() => api_1.diag.debug(`${d.constructor.name} found resource.`, resource)); + } + else { + api_1.diag.debug(`${d.constructor.name} found resource.`, resource); + } + return resource; + } + catch (e) { + api_1.diag.error(`${d.constructor.name} failed: ${e.message}`); + return Resource_1.Resource.empty(); + } + }); + const mergedResources = resources.reduce((acc, resource) => acc.merge(resource), Resource_1.Resource.empty()); + if (mergedResources.waitForAsyncAttributes) { + void mergedResources.waitForAsyncAttributes().then(() => { + // Future check if verbose logging is enabled issue #1903 + logResources(resources); + }); + } + return mergedResources; }; -exports.MessageTypeValues = { - /** sent. */ - SENT: 'SENT', - /** received. */ - RECEIVED: 'RECEIVED', +exports.detectResourcesSync = detectResourcesSync; +/** + * Writes debug information about the detected resources to the logger defined in the resource detection config, if one is provided. + * + * @param resources The array of {@link Resource} that should be logged. Empty entries will be ignored. + */ +const logResources = (resources) => { + resources.forEach(resource => { + // Print only populated resources + if (Object.keys(resource.attributes).length > 0) { + const resourceDebugString = JSON.stringify(resource.attributes, null, 4); + api_1.diag.verbose(resourceDebugString); + } + }); }; -//# sourceMappingURL=SemanticAttributes.js.map +//# sourceMappingURL=detect-resources.js.map /***/ }), -/***/ 823: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 15969: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); /* * Copyright The OpenTelemetry Authors * @@ -55715,12 +57374,23 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); * See the License for the specific language governing permissions and * limitations under the License. */ -__exportStar(__nccwpck_require__(76409), exports); -//# sourceMappingURL=index.js.map +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.browserDetector = void 0; +const BrowserDetectorSync_1 = __nccwpck_require__(33010); +/** + * BrowserDetector will be used to detect the resources related to browser. + */ +class BrowserDetector { + detect(config) { + return Promise.resolve(BrowserDetectorSync_1.browserDetectorSync.detect(config)); + } +} +exports.browserDetector = new BrowserDetector(); +//# sourceMappingURL=BrowserDetector.js.map /***/ }), -/***/ 5255: +/***/ 33010: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -55741,83 +57411,55 @@ __exportStar(__nccwpck_require__(76409), exports); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPGRPCExporterNodeBase = void 0; +exports.browserDetectorSync = void 0; +const semantic_conventions_1 = __nccwpck_require__(67275); const api_1 = __nccwpck_require__(65163); -const grpc_js_1 = __nccwpck_require__(7025); -const core_1 = __nccwpck_require__(80664); -const util_1 = __nccwpck_require__(66394); -const otlp_exporter_base_1 = __nccwpck_require__(11363); +const Resource_1 = __nccwpck_require__(72723); /** - * OTLP Exporter abstract base class + * BrowserDetectorSync will be used to detect the resources related to browser. */ -class OTLPGRPCExporterNodeBase extends otlp_exporter_base_1.OTLPExporterBase { - constructor(config = {}) { - super(config); - this.grpcQueue = []; - this.serviceClient = undefined; - if (config.headers) { - api_1.diag.warn('Headers cannot be set when using grpc'); - } - const headers = core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS); - this.metadata = config.metadata || new grpc_js_1.Metadata(); - for (const [k, v] of Object.entries(headers)) { - this.metadata.set(k, v); +class BrowserDetectorSync { + detect(config) { + var _a, _b, _c; + const isBrowser = typeof navigator !== 'undefined' && + ((_b = (_a = global.process) === null || _a === void 0 ? void 0 : _a.versions) === null || _b === void 0 ? void 0 : _b.node) === undefined && // Node.js v21 adds `navigator` + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore don't have Bun types + ((_c = global.Bun) === null || _c === void 0 ? void 0 : _c.version) === undefined; // Bun (bun.sh) defines `navigator` + if (!isBrowser) { + return Resource_1.Resource.empty(); } - this.compression = (0, util_1.configureCompression)(config.compression); - } - _sendPromise(objects, onSuccess, onError) { - const promise = new Promise((resolve, reject) => { - this._send(this, objects, resolve, reject); - }) - .then(onSuccess, onError); - this._sendingPromises.push(promise); - const popPromise = () => { - const index = this._sendingPromises.indexOf(promise); - this._sendingPromises.splice(index, 1); + const browserResource = { + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser', + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser', + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent, }; - promise.then(popPromise, popPromise); - } - onInit(config) { - // defer to next tick and lazy load to avoid loading grpc too early - // and making this impossible to be instrumented - setImmediate(() => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { onInit } = __nccwpck_require__(66394); - onInit(this, config); - }); + return this._getResourceAttributes(browserResource, config); } - send(objects, onSuccess, onError) { - if (this._shutdownOnce.isCalled) { - api_1.diag.debug('Shutdown already started. Cannot send objects'); - return; - } - if (!this._send) { - // defer to next tick and lazy load to avoid loading grpc too early - // and making this impossible to be instrumented - setImmediate(() => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { send } = __nccwpck_require__(66394); - this._send = send; - this._sendPromise(objects, onSuccess, onError); - }); + /** + * Validates process resource attribute map from process variables + * + * @param browserResource The un-sanitized resource attributes from process as key/value pairs. + * @param config: Config + * @returns The sanitized resource attributes. + */ + _getResourceAttributes(browserResource, _config) { + if (browserResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === '') { + api_1.diag.debug('BrowserDetector failed: Unable to find required browser resources. '); + return Resource_1.Resource.empty(); } else { - this._sendPromise(objects, onSuccess, onError); - } - } - onShutdown() { - if (this.serviceClient) { - this.serviceClient.close(); + return new Resource_1.Resource(Object.assign({}, browserResource)); } } } -exports.OTLPGRPCExporterNodeBase = OTLPGRPCExporterNodeBase; -//# sourceMappingURL=OTLPGRPCExporterNodeBase.js.map +exports.browserDetectorSync = new BrowserDetectorSync(); +//# sourceMappingURL=BrowserDetectorSync.js.map /***/ }), -/***/ 75452: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 22474: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -55836,30 +57478,32 @@ exports.OTLPGRPCExporterNodeBase = OTLPGRPCExporterNodeBase; * See the License for the specific language governing permissions and * limitations under the License. */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GrpcCompressionAlgorithm = exports.validateAndNormalizeUrl = exports.ServiceClientType = void 0; -__exportStar(__nccwpck_require__(5255), exports); -var types_1 = __nccwpck_require__(44160); -Object.defineProperty(exports, "ServiceClientType", ({ enumerable: true, get: function () { return types_1.ServiceClientType; } })); -var util_1 = __nccwpck_require__(66394); -Object.defineProperty(exports, "validateAndNormalizeUrl", ({ enumerable: true, get: function () { return util_1.validateAndNormalizeUrl; } })); -Object.defineProperty(exports, "GrpcCompressionAlgorithm", ({ enumerable: true, get: function () { return util_1.GrpcCompressionAlgorithm; } })); -//# sourceMappingURL=index.js.map +exports.envDetector = void 0; +const EnvDetectorSync_1 = __nccwpck_require__(84565); +/** + * EnvDetector can be used to detect the presence of and create a Resource + * from the OTEL_RESOURCE_ATTRIBUTES environment variable. + */ +class EnvDetector { + /** + * Returns a {@link Resource} populated with attributes from the + * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async + * function to conform to the Detector interface. + * + * @param config The resource detection config + */ + detect(config) { + return Promise.resolve(EnvDetectorSync_1.envDetectorSync.detect(config)); + } +} +exports.envDetector = new EnvDetector(); +//# sourceMappingURL=EnvDetector.js.map /***/ }), -/***/ 44160: -/***/ ((__unused_webpack_module, exports) => { +/***/ 84565: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -55879,17 +57523,131 @@ Object.defineProperty(exports, "GrpcCompressionAlgorithm", ({ enumerable: true, * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ServiceClientType = void 0; -var ServiceClientType; -(function (ServiceClientType) { - ServiceClientType[ServiceClientType["SPANS"] = 0] = "SPANS"; - ServiceClientType[ServiceClientType["METRICS"] = 1] = "METRICS"; -})(ServiceClientType = exports.ServiceClientType || (exports.ServiceClientType = {})); -//# sourceMappingURL=types.js.map +exports.envDetectorSync = void 0; +const api_1 = __nccwpck_require__(65163); +const core_1 = __nccwpck_require__(89736); +const semantic_conventions_1 = __nccwpck_require__(67275); +const Resource_1 = __nccwpck_require__(72723); +/** + * EnvDetectorSync can be used to detect the presence of and create a Resource + * from the OTEL_RESOURCE_ATTRIBUTES environment variable. + */ +class EnvDetectorSync { + constructor() { + // Type, attribute keys, and attribute values should not exceed 256 characters. + this._MAX_LENGTH = 255; + // OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of attributes. + this._COMMA_SEPARATOR = ','; + // OTEL_RESOURCE_ATTRIBUTES contains key value pair separated by '='. + this._LABEL_KEY_VALUE_SPLITTER = '='; + this._ERROR_MESSAGE_INVALID_CHARS = 'should be a ASCII string with a length greater than 0 and not exceed ' + + this._MAX_LENGTH + + ' characters.'; + this._ERROR_MESSAGE_INVALID_VALUE = 'should be a ASCII string with a length not exceed ' + + this._MAX_LENGTH + + ' characters.'; + } + /** + * Returns a {@link Resource} populated with attributes from the + * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async + * function to conform to the Detector interface. + * + * @param config The resource detection config + */ + detect(_config) { + const attributes = {}; + const env = (0, core_1.getEnv)(); + const rawAttributes = env.OTEL_RESOURCE_ATTRIBUTES; + const serviceName = env.OTEL_SERVICE_NAME; + if (rawAttributes) { + try { + const parsedAttributes = this._parseResourceAttributes(rawAttributes); + Object.assign(attributes, parsedAttributes); + } + catch (e) { + api_1.diag.debug(`EnvDetector failed: ${e.message}`); + } + } + if (serviceName) { + attributes[semantic_conventions_1.SEMRESATTRS_SERVICE_NAME] = serviceName; + } + return new Resource_1.Resource(attributes); + } + /** + * Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment + * variable. + * + * OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes describing + * the source in more detail, e.g. “key1=val1,key2=val2”. Domain names and + * paths are accepted as attribute keys. Values may be quoted or unquoted in + * general. If a value contains whitespace, =, or " characters, it must + * always be quoted. + * + * @param rawEnvAttributes The resource attributes as a comma-separated list + * of key/value pairs. + * @returns The sanitized resource attributes. + */ + _parseResourceAttributes(rawEnvAttributes) { + if (!rawEnvAttributes) + return {}; + const attributes = {}; + const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR, -1); + for (const rawAttribute of rawAttributes) { + const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER, -1); + if (keyValuePair.length !== 2) { + continue; + } + let [key, value] = keyValuePair; + // Leading and trailing whitespaces are trimmed. + key = key.trim(); + value = value.trim().split(/^"|"$/).join(''); + if (!this._isValidAndNotEmpty(key)) { + throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`); + } + if (!this._isValid(value)) { + throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`); + } + attributes[key] = decodeURIComponent(value); + } + return attributes; + } + /** + * Determines whether the given String is a valid printable ASCII string with + * a length not exceed _MAX_LENGTH characters. + * + * @param str The String to be validated. + * @returns Whether the String is valid. + */ + _isValid(name) { + return name.length <= this._MAX_LENGTH && this._isBaggageOctetString(name); + } + // https://www.w3.org/TR/baggage/#definition + _isBaggageOctetString(str) { + for (let i = 0; i < str.length; i++) { + const ch = str.charCodeAt(i); + if (ch < 0x21 || ch === 0x2c || ch === 0x3b || ch === 0x5c || ch > 0x7e) { + return false; + } + } + return true; + } + /** + * Determines whether the given String is a valid printable ASCII string with + * a length greater than 0 and not exceed _MAX_LENGTH characters. + * + * @param str The String to be validated. + * @returns Whether the String is valid and not empty. + */ + _isValidAndNotEmpty(str) { + return str.length > 0 && this._isValid(str); + } +} +exports.envDetectorSync = new EnvDetectorSync(); +//# sourceMappingURL=EnvDetectorSync.js.map /***/ }), -/***/ 66394: +/***/ 24918: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -55910,124 +57668,34 @@ var ServiceClientType; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.configureCompression = exports.GrpcCompressionAlgorithm = exports.validateAndNormalizeUrl = exports.send = exports.onInit = void 0; -const grpc = __nccwpck_require__(7025); -const protoLoader = __nccwpck_require__(98171); -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(80664); -const path = __nccwpck_require__(71017); -const url_1 = __nccwpck_require__(57310); -const types_1 = __nccwpck_require__(44160); -const otlp_exporter_base_1 = __nccwpck_require__(11363); -function onInit(collector, config) { - collector.grpcQueue = []; - const credentials = config.credentials || grpc.credentials.createInsecure(); - const includeDirs = [__nccwpck_require__.ab + "protos"]; - protoLoader - .load(collector.getServiceProtoPath(), { - keepCase: false, - longs: String, - enums: String, - defaults: true, - oneofs: true, - includeDirs, - }) - .then(packageDefinition => { - const packageObject = grpc.loadPackageDefinition(packageDefinition); - const options = { 'grpc.default_compression_algorithm': collector.compression }; - if (collector.getServiceClientType() === types_1.ServiceClientType.SPANS) { - collector.serviceClient = - new packageObject.opentelemetry.proto.collector.trace.v1.TraceService(collector.url, credentials, options); - } - else { - collector.serviceClient = - new packageObject.opentelemetry.proto.collector.metrics.v1.MetricsService(collector.url, credentials, options); - } - if (collector.grpcQueue.length > 0) { - const queue = collector.grpcQueue.splice(0); - queue.forEach((item) => { - collector.send(item.objects, item.onSuccess, item.onError); - }); - } - }) - .catch(err => { - (0, core_1.globalErrorHandler)(err); - }); -} -exports.onInit = onInit; -function send(collector, objects, onSuccess, onError) { - if (collector.serviceClient) { - const serviceRequest = collector.convert(objects); - collector.serviceClient.export(serviceRequest, collector.metadata || new grpc.Metadata(), (err) => { - if (err) { - api_1.diag.error('Service request', serviceRequest); - onError(err); - } - else { - api_1.diag.debug('Objects sent'); - onSuccess(); - } - }); - } - else { - collector.grpcQueue.push({ - objects, - onSuccess, - onError, - }); - } -} -exports.send = send; -function validateAndNormalizeUrl(url) { - var _a; - const hasProtocol = url.match(/^([\w]{1,8}):\/\//); - if (!hasProtocol) { - url = `https://${url}`; - } - const target = new url_1.URL(url); - if (target.pathname && target.pathname !== '/') { - api_1.diag.warn('URL path should not be set when using grpc, the path part of the URL will be ignored.'); - } - if (target.protocol !== '' && !((_a = target.protocol) === null || _a === void 0 ? void 0 : _a.match(/(http|grpc)s?/))) { - api_1.diag.warn('URL protocol should be http(s):// or grpc(s)://. Using grpc://.'); - } - return target.host; -} -exports.validateAndNormalizeUrl = validateAndNormalizeUrl; -function toGrpcCompression(compression) { - if (compression === otlp_exporter_base_1.CompressionAlgorithm.NONE) - return GrpcCompressionAlgorithm.NONE; - else if (compression === otlp_exporter_base_1.CompressionAlgorithm.GZIP) - return GrpcCompressionAlgorithm.GZIP; - return GrpcCompressionAlgorithm.NONE; -} -/** - * These values are defined by grpc client - */ -var GrpcCompressionAlgorithm; -(function (GrpcCompressionAlgorithm) { - GrpcCompressionAlgorithm[GrpcCompressionAlgorithm["NONE"] = 0] = "NONE"; - GrpcCompressionAlgorithm[GrpcCompressionAlgorithm["GZIP"] = 2] = "GZIP"; -})(GrpcCompressionAlgorithm = exports.GrpcCompressionAlgorithm || (exports.GrpcCompressionAlgorithm = {})); -function configureCompression(compression) { - if (compression) { - return toGrpcCompression(compression); - } - else { - const definedCompression = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION || (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION; - return definedCompression === 'gzip' ? GrpcCompressionAlgorithm.GZIP : GrpcCompressionAlgorithm.NONE; - } -} -exports.configureCompression = configureCompression; -//# sourceMappingURL=util.js.map +exports.envDetectorSync = exports.browserDetectorSync = exports.envDetector = exports.browserDetector = exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0; +var platform_1 = __nccwpck_require__(3098); +Object.defineProperty(exports, "hostDetector", ({ enumerable: true, get: function () { return platform_1.hostDetector; } })); +Object.defineProperty(exports, "hostDetectorSync", ({ enumerable: true, get: function () { return platform_1.hostDetectorSync; } })); +Object.defineProperty(exports, "osDetector", ({ enumerable: true, get: function () { return platform_1.osDetector; } })); +Object.defineProperty(exports, "osDetectorSync", ({ enumerable: true, get: function () { return platform_1.osDetectorSync; } })); +Object.defineProperty(exports, "processDetector", ({ enumerable: true, get: function () { return platform_1.processDetector; } })); +Object.defineProperty(exports, "processDetectorSync", ({ enumerable: true, get: function () { return platform_1.processDetectorSync; } })); +Object.defineProperty(exports, "serviceInstanceIdDetectorSync", ({ enumerable: true, get: function () { return platform_1.serviceInstanceIdDetectorSync; } })); +var BrowserDetector_1 = __nccwpck_require__(15969); +Object.defineProperty(exports, "browserDetector", ({ enumerable: true, get: function () { return BrowserDetector_1.browserDetector; } })); +var EnvDetector_1 = __nccwpck_require__(22474); +Object.defineProperty(exports, "envDetector", ({ enumerable: true, get: function () { return EnvDetector_1.envDetector; } })); +var BrowserDetectorSync_1 = __nccwpck_require__(33010); +Object.defineProperty(exports, "browserDetectorSync", ({ enumerable: true, get: function () { return BrowserDetectorSync_1.browserDetectorSync; } })); +var EnvDetectorSync_1 = __nccwpck_require__(84565); +Object.defineProperty(exports, "envDetectorSync", ({ enumerable: true, get: function () { return EnvDetectorSync_1.envDetectorSync; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 13119: -/***/ ((__unused_webpack_module, exports) => { +/***/ 3098: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0; /* * Copyright The OpenTelemetry Authors * @@ -56043,19 +57711,20 @@ exports.configureCompression = configureCompression; * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExportResultCode = void 0; -var ExportResultCode; -(function (ExportResultCode) { - ExportResultCode[ExportResultCode["SUCCESS"] = 0] = "SUCCESS"; - ExportResultCode[ExportResultCode["FAILED"] = 1] = "FAILED"; -})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {})); -//# sourceMappingURL=ExportResult.js.map +var node_1 = __nccwpck_require__(29920); +Object.defineProperty(exports, "hostDetector", ({ enumerable: true, get: function () { return node_1.hostDetector; } })); +Object.defineProperty(exports, "hostDetectorSync", ({ enumerable: true, get: function () { return node_1.hostDetectorSync; } })); +Object.defineProperty(exports, "osDetector", ({ enumerable: true, get: function () { return node_1.osDetector; } })); +Object.defineProperty(exports, "osDetectorSync", ({ enumerable: true, get: function () { return node_1.osDetectorSync; } })); +Object.defineProperty(exports, "processDetector", ({ enumerable: true, get: function () { return node_1.processDetector; } })); +Object.defineProperty(exports, "processDetectorSync", ({ enumerable: true, get: function () { return node_1.processDetectorSync; } })); +Object.defineProperty(exports, "serviceInstanceIdDetectorSync", ({ enumerable: true, get: function () { return node_1.serviceInstanceIdDetectorSync; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 82039: -/***/ ((__unused_webpack_module, exports) => { +/***/ 59251: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -56075,23 +57744,23 @@ var ExportResultCode; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0; -exports.BAGGAGE_KEY_PAIR_SEPARATOR = '='; -exports.BAGGAGE_PROPERTIES_SEPARATOR = ';'; -exports.BAGGAGE_ITEMS_SEPARATOR = ','; -// Name of the http header used to propagate the baggage -exports.BAGGAGE_HEADER = 'baggage'; -// Maximum number of name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180; -// Maximum number of bytes per a single name-value pair allowed by w3c spec -exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096; -// Maximum total length of all name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192; -//# sourceMappingURL=constants.js.map +exports.hostDetector = void 0; +const HostDetectorSync_1 = __nccwpck_require__(13172); +/** + * HostDetector detects the resources related to the host current process is + * running on. Currently only non-cloud-based attributes are included. + */ +class HostDetector { + detect(_config) { + return Promise.resolve(HostDetectorSync_1.hostDetectorSync.detect(_config)); + } +} +exports.hostDetector = new HostDetector(); +//# sourceMappingURL=HostDetector.js.map /***/ }), -/***/ 90353: +/***/ 13172: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -56112,73 +57781,44 @@ exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CBaggagePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(54772); -const constants_1 = __nccwpck_require__(82039); -const utils_1 = __nccwpck_require__(59022); +exports.hostDetectorSync = void 0; +const semantic_conventions_1 = __nccwpck_require__(67275); +const Resource_1 = __nccwpck_require__(72723); +const os_1 = __nccwpck_require__(22037); +const utils_1 = __nccwpck_require__(88227); +const getMachineId_1 = __nccwpck_require__(11804); /** - * Propagates {@link Baggage} through Context format propagation. - * - * Based on the Baggage specification: - * https://w3c.github.io/baggage/ + * HostDetectorSync detects the resources related to the host current process is + * running on. Currently only non-cloud-based attributes are included. */ -class W3CBaggagePropagator { - inject(context, carrier, setter) { - const baggage = api_1.propagation.getBaggage(context); - if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context)) - return; - const keyPairs = (0, utils_1.getKeyPairs)(baggage) - .filter((pair) => { - return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS; - }) - .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS); - const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs); - if (headerValue.length > 0) { - setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue); - } +class HostDetectorSync { + detect(_config) { + const attributes = { + [semantic_conventions_1.SemanticResourceAttributes.HOST_NAME]: (0, os_1.hostname)(), + [semantic_conventions_1.SemanticResourceAttributes.HOST_ARCH]: (0, utils_1.normalizeArch)((0, os_1.arch)()), + }; + return new Resource_1.Resource(attributes, this._getAsyncAttributes()); } - extract(context, carrier, getter) { - const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER); - const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue; - if (!baggageString) - return context; - const baggage = {}; - if (baggageString.length === 0) { - return context; - } - const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR); - pairs.forEach(entry => { - const keyPair = (0, utils_1.parsePairKeyValue)(entry); - if (keyPair) { - const baggageEntry = { value: keyPair.value }; - if (keyPair.metadata) { - baggageEntry.metadata = keyPair.metadata; - } - baggage[keyPair.key] = baggageEntry; + _getAsyncAttributes() { + return (0, getMachineId_1.getMachineId)().then(machineId => { + const attributes = {}; + if (machineId) { + attributes[semantic_conventions_1.SemanticResourceAttributes.HOST_ID] = machineId; } + return attributes; }); - if (Object.entries(baggage).length === 0) { - return context; - } - return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage)); - } - fields() { - return [constants_1.BAGGAGE_HEADER]; } } -exports.W3CBaggagePropagator = W3CBaggagePropagator; -//# sourceMappingURL=W3CBaggagePropagator.js.map +exports.hostDetectorSync = new HostDetectorSync(); +//# sourceMappingURL=HostDetectorSync.js.map /***/ }), -/***/ 59022: +/***/ 58102: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0; /* * Copyright The OpenTelemetry Authors * @@ -56194,71 +57834,24 @@ exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPair * See the License for the specific language governing permissions and * limitations under the License. */ -const api_1 = __nccwpck_require__(65163); -const constants_1 = __nccwpck_require__(82039); -function serializeKeyPairs(keyPairs) { - return keyPairs.reduce((hValue, current) => { - const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`; - return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value; - }, ''); -} -exports.serializeKeyPairs = serializeKeyPairs; -function getKeyPairs(baggage) { - return baggage.getAllEntries().map(([key, value]) => { - let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`; - // include opaque metadata if provided - // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation - if (value.metadata !== undefined) { - entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString(); - } - return entry; - }); -} -exports.getKeyPairs = getKeyPairs; -function parsePairKeyValue(entry) { - const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR); - if (valueProps.length <= 0) - return; - const keyPairPart = valueProps.shift(); - if (!keyPairPart) - return; - const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR); - if (keyPair.length !== 2) - return; - const key = decodeURIComponent(keyPair[0].trim()); - const value = decodeURIComponent(keyPair[1].trim()); - let metadata; - if (valueProps.length > 0) { - metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR)); - } - return { key, value, metadata }; -} -exports.parsePairKeyValue = parsePairKeyValue; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.osDetector = void 0; +const OSDetectorSync_1 = __nccwpck_require__(53136); /** - * Parse a string serialized in the baggage HTTP Format (without metadata): - * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md + * OSDetector detects the resources related to the operating system (OS) on + * which the process represented by this resource is running. */ -function parseKeyPairsIntoRecord(value) { - if (typeof value !== 'string' || value.length === 0) - return {}; - return value - .split(constants_1.BAGGAGE_ITEMS_SEPARATOR) - .map(entry => { - return parsePairKeyValue(entry); - }) - .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0) - .reduce((headers, keyPair) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - headers[keyPair.key] = keyPair.value; - return headers; - }, {}); +class OSDetector { + detect(_config) { + return Promise.resolve(OSDetectorSync_1.osDetectorSync.detect(_config)); + } } -exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord; -//# sourceMappingURL=utils.js.map +exports.osDetector = new OSDetector(); +//# sourceMappingURL=OSDetector.js.map /***/ }), -/***/ 16793: +/***/ 53136: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -56279,81 +57872,30 @@ exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0; -const api_1 = __nccwpck_require__(65163); -function sanitizeAttributes(attributes) { - const out = {}; - if (typeof attributes !== 'object' || attributes == null) { - return out; - } - for (const [key, val] of Object.entries(attributes)) { - if (!isAttributeKey(key)) { - api_1.diag.warn(`Invalid attribute key: ${key}`); - continue; - } - if (!isAttributeValue(val)) { - api_1.diag.warn(`Invalid attribute value set for key: ${key}`); - continue; - } - if (Array.isArray(val)) { - out[key] = val.slice(); - } - else { - out[key] = val; - } - } - return out; -} -exports.sanitizeAttributes = sanitizeAttributes; -function isAttributeKey(key) { - return typeof key === 'string' && key.length > 0; -} -exports.isAttributeKey = isAttributeKey; -function isAttributeValue(val) { - if (val == null) { - return true; - } - if (Array.isArray(val)) { - return isHomogeneousAttributeValueArray(val); - } - return isValidPrimitiveAttributeValue(val); -} -exports.isAttributeValue = isAttributeValue; -function isHomogeneousAttributeValueArray(arr) { - let type; - for (const element of arr) { - // null/undefined elements are allowed - if (element == null) - continue; - if (!type) { - if (isValidPrimitiveAttributeValue(element)) { - type = typeof element; - continue; - } - // encountered an invalid primitive - return false; - } - if (typeof element === type) { - continue; - } - return false; - } - return true; -} -function isValidPrimitiveAttributeValue(val) { - switch (typeof val) { - case 'number': - case 'boolean': - case 'string': - return true; +exports.osDetectorSync = void 0; +const semantic_conventions_1 = __nccwpck_require__(67275); +const Resource_1 = __nccwpck_require__(72723); +const os_1 = __nccwpck_require__(22037); +const utils_1 = __nccwpck_require__(88227); +/** + * OSDetectorSync detects the resources related to the operating system (OS) on + * which the process represented by this resource is running. + */ +class OSDetectorSync { + detect(_config) { + const attributes = { + [semantic_conventions_1.SemanticResourceAttributes.OS_TYPE]: (0, utils_1.normalizeType)((0, os_1.platform)()), + [semantic_conventions_1.SemanticResourceAttributes.OS_VERSION]: (0, os_1.release)(), + }; + return new Resource_1.Resource(attributes); } - return false; } -//# sourceMappingURL=attributes.js.map +exports.osDetectorSync = new OSDetectorSync(); +//# sourceMappingURL=OSDetectorSync.js.map /***/ }), -/***/ 44257: +/***/ 62471: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -56374,34 +57916,23 @@ function isValidPrimitiveAttributeValue(val) { * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.globalErrorHandler = exports.setGlobalErrorHandler = void 0; -const logging_error_handler_1 = __nccwpck_require__(63055); -/** The global error handler delegate */ -let delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)(); -/** - * Set the global error handler - * @param {ErrorHandler} handler - */ -function setGlobalErrorHandler(handler) { - delegateHandler = handler; -} -exports.setGlobalErrorHandler = setGlobalErrorHandler; +exports.processDetector = void 0; +const ProcessDetectorSync_1 = __nccwpck_require__(68786); /** - * Return the global error handler - * @param {Exception} ex + * ProcessDetector will be used to detect the resources related current process running + * and being instrumented from the NodeJS Process module. */ -function globalErrorHandler(ex) { - try { - delegateHandler(ex); +class ProcessDetector { + detect(config) { + return Promise.resolve(ProcessDetectorSync_1.processDetectorSync.detect(config)); } - catch (_a) { } // eslint-disable-line no-empty } -exports.globalErrorHandler = globalErrorHandler; -//# sourceMappingURL=global-error-handler.js.map +exports.processDetector = new ProcessDetector(); +//# sourceMappingURL=ProcessDetector.js.map /***/ }), -/***/ 63055: +/***/ 68786: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -56422,56 +57953,49 @@ exports.globalErrorHandler = globalErrorHandler; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.loggingErrorHandler = void 0; +exports.processDetectorSync = void 0; const api_1 = __nccwpck_require__(65163); +const semantic_conventions_1 = __nccwpck_require__(67275); +const Resource_1 = __nccwpck_require__(72723); +const os = __nccwpck_require__(22037); /** - * Returns a function that logs an error using the provided logger, or a - * console logger if one was not provided. - */ -function loggingErrorHandler() { - return (ex) => { - api_1.diag.error(stringifyException(ex)); - }; -} -exports.loggingErrorHandler = loggingErrorHandler; -/** - * Converts an exception into a string representation - * @param {Exception} ex - */ -function stringifyException(ex) { - if (typeof ex === 'string') { - return ex; - } - else { - return JSON.stringify(flattenException(ex)); - } -} -/** - * Flattens an exception into key-value pairs by traversing the prototype chain - * and coercing values to strings. Duplicate properties will not be overwritten; - * the first insert wins. + * ProcessDetectorSync will be used to detect the resources related current process running + * and being instrumented from the NodeJS Process module. */ -function flattenException(ex) { - const result = {}; - let current = ex; - while (current !== null) { - Object.getOwnPropertyNames(current).forEach(propertyName => { - if (result[propertyName]) - return; - const value = current[propertyName]; - if (value) { - result[propertyName] = String(value); - } - }); - current = Object.getPrototypeOf(current); +class ProcessDetectorSync { + detect(_config) { + const attributes = { + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_PID]: process.pid, + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title, + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath, + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [ + process.argv[0], + ...process.execArgv, + ...process.argv.slice(1), + ], + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: process.versions.node, + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs', + [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js', + }; + if (process.argv.length > 1) { + attributes[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1]; + } + try { + const userInfo = os.userInfo(); + attributes[semantic_conventions_1.SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username; + } + catch (e) { + api_1.diag.debug(`error obtaining process owner: ${e}`); + } + return new Resource_1.Resource(attributes); } - return result; } -//# sourceMappingURL=logging-error-handler.js.map +exports.processDetectorSync = new ProcessDetectorSync(); +//# sourceMappingURL=ProcessDetectorSync.js.map /***/ }), -/***/ 45163: +/***/ 47750: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -56492,164 +58016,31 @@ function flattenException(ex) { * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0; -const platform_1 = __nccwpck_require__(36526); -const NANOSECOND_DIGITS = 9; -const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS); -/** - * Converts a number to HrTime, HrTime = [number, number]. - * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. - * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. - * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. - * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds: - * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. - * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: - * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000. - * This is represented in HrTime format as [1609504210, 150000000]. - * @param epochMillis - */ -function numberToHrtime(epochMillis) { - const epochSeconds = epochMillis / 1000; - // Decimals only. - const seconds = Math.trunc(epochSeconds); - // Round sub-nanosecond accuracy to nanosecond. - const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) * - SECOND_TO_NANOSECONDS; - return [seconds, nanos]; -} -function getTimeOrigin() { - let timeOrigin = platform_1.otperformance.timeOrigin; - if (typeof timeOrigin !== 'number') { - const perf = platform_1.otperformance; - timeOrigin = perf.timing && perf.timing.fetchStart; - } - return timeOrigin; -} -/** - * Returns an hrtime calculated via performance component. - * @param performanceNow - */ -function hrTime(performanceNow) { - const timeOrigin = numberToHrtime(getTimeOrigin()); - const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now()); - let seconds = timeOrigin[0] + now[0]; - let nanos = timeOrigin[1] + now[1]; - // Nanoseconds - if (nanos > SECOND_TO_NANOSECONDS) { - nanos -= SECOND_TO_NANOSECONDS; - seconds += 1; - } - return [seconds, nanos]; -} -exports.hrTime = hrTime; -/** - * - * Converts a TimeInput to an HrTime, defaults to _hrtime(). - * @param time - */ -function timeInputToHrTime(time) { - // process.hrtime - if (isTimeInputHrTime(time)) { - return time; - } - else if (typeof time === 'number') { - // Must be a performance.now() if it's smaller than process start time. - if (time < getTimeOrigin()) { - return hrTime(time); - } - else { - // epoch milliseconds or performance.timeOrigin - return numberToHrtime(time); - } - } - else if (time instanceof Date) { - return numberToHrtime(time.getTime()); - } - else { - throw TypeError('Invalid input type'); - } -} -exports.timeInputToHrTime = timeInputToHrTime; +exports.serviceInstanceIdDetectorSync = void 0; +const semantic_conventions_1 = __nccwpck_require__(67275); +const Resource_1 = __nccwpck_require__(72723); +const crypto_1 = __nccwpck_require__(6113); /** - * Returns a duration of two hrTime. - * @param startTime - * @param endTime + * ServiceInstanceIdDetectorSync detects the resources related to the service instance ID. */ -function hrTimeDuration(startTime, endTime) { - let seconds = endTime[0] - startTime[0]; - let nanos = endTime[1] - startTime[1]; - // overflow - if (nanos < 0) { - seconds -= 1; - // negate - nanos += SECOND_TO_NANOSECONDS; +class ServiceInstanceIdDetectorSync { + detect(_config) { + const attributes = { + [semantic_conventions_1.SEMRESATTRS_SERVICE_INSTANCE_ID]: (0, crypto_1.randomUUID)(), + }; + return new Resource_1.Resource(attributes); } - return [seconds, nanos]; -} -exports.hrTimeDuration = hrTimeDuration; -/** - * Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z" - * @param time - */ -function hrTimeToTimeStamp(time) { - const precision = NANOSECOND_DIGITS; - const tmp = `${'0'.repeat(precision)}${time[1]}Z`; - const nanoString = tmp.substr(tmp.length - precision - 1); - const date = new Date(time[0] * 1000).toISOString(); - return date.replace('000Z', nanoString); -} -exports.hrTimeToTimeStamp = hrTimeToTimeStamp; -/** - * Convert hrTime to nanoseconds. - * @param time - */ -function hrTimeToNanoseconds(time) { - return time[0] * SECOND_TO_NANOSECONDS + time[1]; -} -exports.hrTimeToNanoseconds = hrTimeToNanoseconds; -/** - * Convert hrTime to milliseconds. - * @param time - */ -function hrTimeToMilliseconds(time) { - return Math.round(time[0] * 1e3 + time[1] / 1e6); -} -exports.hrTimeToMilliseconds = hrTimeToMilliseconds; -/** - * Convert hrTime to microseconds. - * @param time - */ -function hrTimeToMicroseconds(time) { - return Math.round(time[0] * 1e6 + time[1] / 1e3); -} -exports.hrTimeToMicroseconds = hrTimeToMicroseconds; -/** - * check if time is HrTime - * @param value - */ -function isTimeInputHrTime(value) { - return (Array.isArray(value) && - value.length === 2 && - typeof value[0] === 'number' && - typeof value[1] === 'number'); } -exports.isTimeInputHrTime = isTimeInputHrTime; /** - * check if input value is a correct types.TimeInput - * @param value + * @experimental */ -function isTimeInput(value) { - return (isTimeInputHrTime(value) || - typeof value === 'number' || - value instanceof Date); -} -exports.isTimeInput = isTimeInput; -//# sourceMappingURL=time.js.map +exports.serviceInstanceIdDetectorSync = new ServiceInstanceIdDetectorSync(); +//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map /***/ }), -/***/ 21708: -/***/ ((__unused_webpack_module, exports) => { +/***/ 29920: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -56669,12 +58060,27 @@ exports.isTimeInput = isTimeInput; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map +exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0; +var HostDetector_1 = __nccwpck_require__(59251); +Object.defineProperty(exports, "hostDetector", ({ enumerable: true, get: function () { return HostDetector_1.hostDetector; } })); +var HostDetectorSync_1 = __nccwpck_require__(13172); +Object.defineProperty(exports, "hostDetectorSync", ({ enumerable: true, get: function () { return HostDetectorSync_1.hostDetectorSync; } })); +var OSDetector_1 = __nccwpck_require__(58102); +Object.defineProperty(exports, "osDetector", ({ enumerable: true, get: function () { return OSDetector_1.osDetector; } })); +var OSDetectorSync_1 = __nccwpck_require__(53136); +Object.defineProperty(exports, "osDetectorSync", ({ enumerable: true, get: function () { return OSDetectorSync_1.osDetectorSync; } })); +var ProcessDetector_1 = __nccwpck_require__(62471); +Object.defineProperty(exports, "processDetector", ({ enumerable: true, get: function () { return ProcessDetector_1.processDetector; } })); +var ProcessDetectorSync_1 = __nccwpck_require__(68786); +Object.defineProperty(exports, "processDetectorSync", ({ enumerable: true, get: function () { return ProcessDetectorSync_1.processDetectorSync; } })); +var ServiceInstanceIdDetectorSync_1 = __nccwpck_require__(47750); +Object.defineProperty(exports, "serviceInstanceIdDetectorSync", ({ enumerable: true, get: function () { return ServiceInstanceIdDetectorSync_1.serviceInstanceIdDetectorSync; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 80664: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 70055: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -56693,53 +58099,20 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); * See the License for the specific language governing permissions and * limitations under the License. */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.baggageUtils = void 0; -__exportStar(__nccwpck_require__(90353), exports); -__exportStar(__nccwpck_require__(16793), exports); -__exportStar(__nccwpck_require__(44257), exports); -__exportStar(__nccwpck_require__(63055), exports); -__exportStar(__nccwpck_require__(45163), exports); -__exportStar(__nccwpck_require__(21708), exports); -__exportStar(__nccwpck_require__(13119), exports); -__exportStar(__nccwpck_require__(97801), exports); -exports.baggageUtils = __nccwpck_require__(59022); -__exportStar(__nccwpck_require__(36526), exports); -__exportStar(__nccwpck_require__(32127), exports); -__exportStar(__nccwpck_require__(85886), exports); -__exportStar(__nccwpck_require__(11919), exports); -__exportStar(__nccwpck_require__(22033), exports); -__exportStar(__nccwpck_require__(91765), exports); -__exportStar(__nccwpck_require__(53416), exports); -__exportStar(__nccwpck_require__(23917), exports); -__exportStar(__nccwpck_require__(40599), exports); -__exportStar(__nccwpck_require__(54772), exports); -__exportStar(__nccwpck_require__(68735), exports); -__exportStar(__nccwpck_require__(74926), exports); -__exportStar(__nccwpck_require__(70008), exports); -__exportStar(__nccwpck_require__(87549), exports); -__exportStar(__nccwpck_require__(24583), exports); -__exportStar(__nccwpck_require__(36258), exports); -__exportStar(__nccwpck_require__(91649), exports); -__exportStar(__nccwpck_require__(97801), exports); -//# sourceMappingURL=index.js.map +exports.execAsync = void 0; +const child_process = __nccwpck_require__(32081); +const util = __nccwpck_require__(73837); +exports.execAsync = util.promisify(child_process.exec); +//# sourceMappingURL=execAsync.js.map /***/ }), -/***/ 96740: -/***/ ((__unused_webpack_module, exports) => { +/***/ 82605: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +var __webpack_unused_export__; /* * Copyright The OpenTelemetry Authors @@ -56756,55 +58129,39 @@ __exportStar(__nccwpck_require__(97801), exports); * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateValue = exports.validateKey = void 0; -const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; -const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; -const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; -const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); -const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; -/** - * Key is opaque string up to 256 characters printable. It MUST begin with a - * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, - * underscores _, dashes -, asterisks *, and forward slashes /. - * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the - * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. - * see https://www.w3.org/TR/trace-context/#key - */ -function validateKey(key) { - return VALID_KEY_REGEX.test(key); -} -exports.validateKey = validateKey; -/** - * Value is opaque string up to 256 characters printable ASCII RFC0020 - * characters (i.e., the range 0x20 to 0x7E) except comma , and =. - */ -function validateValue(value) { - return (VALID_VALUE_BASE_REGEX.test(value) && - !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); +__webpack_unused_export__ = ({ value: true }); +exports.$ = void 0; +const fs_1 = __nccwpck_require__(57147); +const execAsync_1 = __nccwpck_require__(70055); +const api_1 = __nccwpck_require__(65163); +async function getMachineId() { + try { + const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' }); + return result.trim(); + } + catch (e) { + api_1.diag.debug(`error reading machine id: ${e}`); + } + try { + const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid'); + return result.stdout.trim(); + } + catch (e) { + api_1.diag.debug(`error reading machine id: ${e}`); + } + return ''; } -exports.validateValue = validateValue; -//# sourceMappingURL=validators.js.map +exports.$ = getMachineId; +//# sourceMappingURL=getMachineId-bsd.js.map /***/ }), -/***/ 36526: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 32685: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +var __webpack_unused_export__; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); /* * Copyright The OpenTelemetry Authors * @@ -56820,16 +58177,42 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); * See the License for the specific language governing permissions and * limitations under the License. */ -__exportStar(__nccwpck_require__(22608), exports); -//# sourceMappingURL=index.js.map +__webpack_unused_export__ = ({ value: true }); +exports.$ = void 0; +const execAsync_1 = __nccwpck_require__(70055); +const api_1 = __nccwpck_require__(65163); +async function getMachineId() { + try { + const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"'); + const idLine = result.stdout + .split('\n') + .find(line => line.includes('IOPlatformUUID')); + if (!idLine) { + return ''; + } + const parts = idLine.split('" = "'); + if (parts.length === 2) { + return parts[1].slice(0, -1); + } + } + catch (e) { + api_1.diag.debug(`error reading machine id: ${e}`); + } + return ''; +} +exports.$ = getMachineId; +//# sourceMappingURL=getMachineId-darwin.js.map /***/ }), -/***/ 6489: -/***/ ((__unused_webpack_module, exports) => { +/***/ 8319: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +var __webpack_unused_export__; +__webpack_unused_export__ = ({ value: true }); +exports.$ = void 0; /* * Copyright The OpenTelemetry Authors * @@ -56845,53 +58228,31 @@ __exportStar(__nccwpck_require__(22608), exports); * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RandomIdGenerator = void 0; -const SPAN_ID_BYTES = 8; -const TRACE_ID_BYTES = 16; -class RandomIdGenerator { - constructor() { - /** - * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex - * characters corresponding to 128 bits. - */ - this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); - /** - * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex - * characters corresponding to 64 bits. - */ - this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); - } -} -exports.RandomIdGenerator = RandomIdGenerator; -const SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); -function getIdGenerator(bytes) { - return function generateId() { - for (let i = 0; i < bytes / 4; i++) { - // unsigned right shift drops decimal part of the number - // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE - SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4); +const fs_1 = __nccwpck_require__(57147); +const api_1 = __nccwpck_require__(65163); +async function getMachineId() { + const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id']; + for (const path of paths) { + try { + const result = await fs_1.promises.readFile(path, { encoding: 'utf8' }); + return result.trim(); } - // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated - for (let i = 0; i < bytes; i++) { - if (SHARED_BUFFER[i] > 0) { - break; - } - else if (i === bytes - 1) { - SHARED_BUFFER[bytes - 1] = 1; - } + catch (e) { + api_1.diag.debug(`error reading machine id: ${e}`); } - return SHARED_BUFFER.toString('hex', 0, bytes); - }; + } + return ''; } -//# sourceMappingURL=RandomIdGenerator.js.map +exports.$ = getMachineId; +//# sourceMappingURL=getMachineId-linux.js.map /***/ }), -/***/ 45627: +/***/ 56083: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +var __webpack_unused_export__; /* * Copyright The OpenTelemetry Authors @@ -56908,28 +58269,23 @@ function getIdGenerator(bytes) { * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEnv = void 0; -const os = __nccwpck_require__(22037); -const environment_1 = __nccwpck_require__(74926); -/** - * Gets the environment variables - */ -function getEnv() { - const processEnv = (0, environment_1.parseEnvironment)(process.env); - return Object.assign({ - HOSTNAME: os.hostname(), - }, environment_1.DEFAULT_ENVIRONMENT, processEnv); +__webpack_unused_export__ = ({ value: true }); +exports.$ = void 0; +const api_1 = __nccwpck_require__(65163); +async function getMachineId() { + api_1.diag.debug('could not read machine-id: unsupported platform'); + return ''; } -exports.getEnv = getEnv; -//# sourceMappingURL=environment.js.map +exports.$ = getMachineId; +//# sourceMappingURL=getMachineId-unsupported.js.map /***/ }), -/***/ 26683: -/***/ ((__unused_webpack_module, exports) => { +/***/ 29937: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +var __webpack_unused_export__; /* * Copyright The OpenTelemetry Authors @@ -56946,22 +58302,41 @@ exports.getEnv = getEnv; * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._globalThis = void 0; -/** only globals that common to node and browsers are allowed */ -// eslint-disable-next-line node/no-unsupported-features/es-builtins -exports._globalThis = typeof globalThis === 'object' ? globalThis : global; -//# sourceMappingURL=globalThis.js.map +__webpack_unused_export__ = ({ value: true }); +exports.$ = void 0; +const process = __nccwpck_require__(77282); +const execAsync_1 = __nccwpck_require__(70055); +const api_1 = __nccwpck_require__(65163); +async function getMachineId() { + const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid'; + let command = '%windir%\\System32\\REG.exe'; + if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) { + command = '%windir%\\sysnative\\cmd.exe /c ' + command; + } + try { + const result = await (0, execAsync_1.execAsync)(`${command} ${args}`); + const parts = result.stdout.split('REG_SZ'); + if (parts.length === 2) { + return parts[1].trim(); + } + } + catch (e) { + api_1.diag.debug(`error reading machine id: ${e}`); + } + return ''; +} +exports.$ = getMachineId; +//# sourceMappingURL=getMachineId-win.js.map /***/ }), -/***/ 87577: -/***/ ((__unused_webpack_module, exports) => { +/***/ 11804: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hexToBase64 = void 0; +exports.getMachineId = void 0; /* * Copyright The OpenTelemetry Authors * @@ -56977,26 +58352,36 @@ exports.hexToBase64 = void 0; * See the License for the specific language governing permissions and * limitations under the License. */ -function hexToBase64(hexStr) { - const hexStrLen = hexStr.length; - let hexAsciiCharsStr = ''; - for (let i = 0; i < hexStrLen; i += 2) { - const hexPair = hexStr.substring(i, i + 2); - const hexVal = parseInt(hexPair, 16); - hexAsciiCharsStr += String.fromCharCode(hexVal); - } - return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64'); +const process = __nccwpck_require__(77282); +let getMachineId; +exports.getMachineId = getMachineId; +switch (process.platform) { + case 'darwin': + (exports.getMachineId = getMachineId = (__nccwpck_require__(32685)/* .getMachineId */ .$)); + break; + case 'linux': + (exports.getMachineId = getMachineId = (__nccwpck_require__(8319)/* .getMachineId */ .$)); + break; + case 'freebsd': + (exports.getMachineId = getMachineId = (__nccwpck_require__(82605)/* .getMachineId */ .$)); + break; + case 'win32': + (exports.getMachineId = getMachineId = (__nccwpck_require__(29937)/* .getMachineId */ .$)); + break; + default: + (exports.getMachineId = getMachineId = (__nccwpck_require__(56083)/* .getMachineId */ .$)); } -exports.hexToBase64 = hexToBase64; -//# sourceMappingURL=hex-to-base64.js.map +//# sourceMappingURL=getMachineId.js.map /***/ }), -/***/ 22608: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 88227: +/***/ ((__unused_webpack_module, exports) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.normalizeType = exports.normalizeArch = void 0; /* * Copyright The OpenTelemetry Authors * @@ -57012,29 +58397,39 @@ exports.hexToBase64 = hexToBase64; * See the License for the specific language governing permissions and * limitations under the License. */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +const normalizeArch = (nodeArchString) => { + // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec: + // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md + switch (nodeArchString) { + case 'arm': + return 'arm32'; + case 'ppc': + return 'ppc32'; + case 'x64': + return 'amd64'; + default: + return nodeArchString; + } +}; +exports.normalizeArch = normalizeArch; +const normalizeType = (nodePlatform) => { + // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec: + // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md + switch (nodePlatform) { + case 'sunos': + return 'solaris'; + case 'win32': + return 'windows'; + default: + return nodePlatform; + } }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(45627), exports); -__exportStar(__nccwpck_require__(26683), exports); -__exportStar(__nccwpck_require__(87577), exports); -__exportStar(__nccwpck_require__(6489), exports); -__exportStar(__nccwpck_require__(54980), exports); -__exportStar(__nccwpck_require__(61306), exports); -__exportStar(__nccwpck_require__(41870), exports); -//# sourceMappingURL=index.js.map +exports.normalizeType = normalizeType; +//# sourceMappingURL=utils.js.map /***/ }), -/***/ 54980: +/***/ 3871: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57055,14 +58450,31 @@ __exportStar(__nccwpck_require__(41870), exports); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.otperformance = void 0; -const perf_hooks_1 = __nccwpck_require__(4074); -exports.otperformance = perf_hooks_1.performance; -//# sourceMappingURL=performance.js.map +exports.detectResources = exports.detectResourcesSync = exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = exports.envDetectorSync = exports.envDetector = exports.browserDetectorSync = exports.browserDetector = exports.defaultServiceName = exports.Resource = void 0; +var Resource_1 = __nccwpck_require__(72723); +Object.defineProperty(exports, "Resource", ({ enumerable: true, get: function () { return Resource_1.Resource; } })); +var platform_1 = __nccwpck_require__(7784); +Object.defineProperty(exports, "defaultServiceName", ({ enumerable: true, get: function () { return platform_1.defaultServiceName; } })); +var detectors_1 = __nccwpck_require__(24918); +Object.defineProperty(exports, "browserDetector", ({ enumerable: true, get: function () { return detectors_1.browserDetector; } })); +Object.defineProperty(exports, "browserDetectorSync", ({ enumerable: true, get: function () { return detectors_1.browserDetectorSync; } })); +Object.defineProperty(exports, "envDetector", ({ enumerable: true, get: function () { return detectors_1.envDetector; } })); +Object.defineProperty(exports, "envDetectorSync", ({ enumerable: true, get: function () { return detectors_1.envDetectorSync; } })); +Object.defineProperty(exports, "hostDetector", ({ enumerable: true, get: function () { return detectors_1.hostDetector; } })); +Object.defineProperty(exports, "hostDetectorSync", ({ enumerable: true, get: function () { return detectors_1.hostDetectorSync; } })); +Object.defineProperty(exports, "osDetector", ({ enumerable: true, get: function () { return detectors_1.osDetector; } })); +Object.defineProperty(exports, "osDetectorSync", ({ enumerable: true, get: function () { return detectors_1.osDetectorSync; } })); +Object.defineProperty(exports, "processDetector", ({ enumerable: true, get: function () { return detectors_1.processDetector; } })); +Object.defineProperty(exports, "processDetectorSync", ({ enumerable: true, get: function () { return detectors_1.processDetectorSync; } })); +Object.defineProperty(exports, "serviceInstanceIdDetectorSync", ({ enumerable: true, get: function () { return detectors_1.serviceInstanceIdDetectorSync; } })); +var detect_resources_1 = __nccwpck_require__(990); +Object.defineProperty(exports, "detectResourcesSync", ({ enumerable: true, get: function () { return detect_resources_1.detectResourcesSync; } })); +Object.defineProperty(exports, "detectResources", ({ enumerable: true, get: function () { return detect_resources_1.detectResources; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 61306: +/***/ 7784: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57083,27 +58495,18 @@ exports.otperformance = perf_hooks_1.performance; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SDK_INFO = void 0; -const version_1 = __nccwpck_require__(97801); -const semantic_conventions_1 = __nccwpck_require__(67655); -/** Constants describing the SDK in use */ -exports.SDK_INFO = { - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node', - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS, - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION, -}; -//# sourceMappingURL=sdk-info.js.map +exports.defaultServiceName = void 0; +var node_1 = __nccwpck_require__(90342); +Object.defineProperty(exports, "defaultServiceName", ({ enumerable: true, get: function () { return node_1.defaultServiceName; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 41870: +/***/ 85671: /***/ ((__unused_webpack_module, exports) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unrefTimer = void 0; /* * Copyright The OpenTelemetry Authors * @@ -57119,19 +58522,23 @@ exports.unrefTimer = void 0; * See the License for the specific language governing permissions and * limitations under the License. */ -function unrefTimer(timer) { - timer.unref(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultServiceName = void 0; +function defaultServiceName() { + return `unknown_service:${process.argv0}`; } -exports.unrefTimer = unrefTimer; -//# sourceMappingURL=timer-util.js.map +exports.defaultServiceName = defaultServiceName; +//# sourceMappingURL=default-service-name.js.map /***/ }), -/***/ 32127: +/***/ 90342: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultServiceName = void 0; /* * Copyright The OpenTelemetry Authors * @@ -57147,74 +58554,13 @@ exports.unrefTimer = unrefTimer; * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CompositePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -/** Combines multiple propagators into a single propagator. */ -class CompositePropagator { - /** - * Construct a composite propagator from a list of propagators. - * - * @param [config] Configuration object for composite propagator - */ - constructor(config = {}) { - var _a; - this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : []; - this._fields = Array.from(new Set(this._propagators - // older propagators may not have fields function, null check to be sure - .map(p => (typeof p.fields === 'function' ? p.fields() : [])) - .reduce((x, y) => x.concat(y), []))); - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same carrier key, the propagator later in the list - * will "win". - * - * @param context Context to inject - * @param carrier Carrier into which context will be injected - */ - inject(context, carrier, setter) { - for (const propagator of this._propagators) { - try { - propagator.inject(context, carrier, setter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - } - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same context key, the propagator later in the list - * will "win". - * - * @param context Context to add values to - * @param carrier Carrier from which to extract context - */ - extract(context, carrier, getter) { - return this._propagators.reduce((ctx, propagator) => { - try { - return propagator.extract(ctx, carrier, getter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - return ctx; - }, context); - } - fields() { - // return a new array so our fields cannot be modified - return this._fields.slice(); - } -} -exports.CompositePropagator = CompositePropagator; -//# sourceMappingURL=composite.js.map +var default_service_name_1 = __nccwpck_require__(85671); +Object.defineProperty(exports, "defaultServiceName", ({ enumerable: true, get: function () { return default_service_name_1.defaultServiceName; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 11919: +/***/ 44298: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -57235,11 +58581,16 @@ exports.CompositePropagator = CompositePropagator; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=IdGenerator.js.map +exports.isPromiseLike = void 0; +const isPromiseLike = (val) => { + return (val !== null && typeof val === 'object' && typeof val.then === 'function'); +}; +exports.isPromiseLike = isPromiseLike; +//# sourceMappingURL=utils.js.map /***/ }), -/***/ 68735: +/***/ 42671: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57257,99 +58608,72 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceState = void 0; -const validators_1 = __nccwpck_require__(96740); -const MAX_TRACE_STATE_ITEMS = 32; -const MAX_TRACE_STATE_LEN = 512; -const LIST_MEMBERS_SEPARATOR = ','; -const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; -/** - * TraceState must be a class and not a simple object type because of the spec - * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). - * - * Here is the list of allowed mutations: - * - New key-value pair should be added into the beginning of the list - * - The value of any key can be updated. Modified keys MUST be moved to the - * beginning of the list. - */ -class TraceState { - constructor(rawTraceState) { - this._internalState = new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - set(key, value) { - // TODO: Benchmark the different approaches(map vs list) and - // use the faster one. - const traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); - } - traceState._internalState.set(key, value); - return traceState; - } - unset(key) { - const traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - } - get(key) { - return this._internalState.get(key); - } - serialize() { - return this._keys() - .reduce((agg, key) => { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); - return agg; - }, []) - .join(LIST_MEMBERS_SEPARATOR); - } - _parse(rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN) - return; - this._internalState = rawTraceState - .split(LIST_MEMBERS_SEPARATOR) - .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning - .reduce((agg, part) => { - const listMember = part.trim(); // Optional Whitespace (OWS) handling - const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); - if (i !== -1) { - const key = listMember.slice(0, i); - const value = listMember.slice(i + 1, part.length); - if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) { - agg.set(key, value); - } - else { - // TODO: Consider to add warning log - } - } - return agg; - }, new Map()); - // Because of the reverse() requirement, trunc must be done after map is created - if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { - this._internalState = new Map(Array.from(this._internalState.entries()) - .reverse() // Use reverse same as original tracestate parse chain - .slice(0, MAX_TRACE_STATE_ITEMS)); - } - } - _keys() { - return Array.from(this._internalState.keys()).reverse(); - } - _clone() { - const traceState = new TraceState(); - traceState._internalState = new Map(this._internalState); - return traceState; + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isValidName = exports.isDescriptorCompatibleWith = exports.createInstrumentDescriptorWithView = exports.createInstrumentDescriptor = exports.InstrumentType = void 0; +const api_1 = __nccwpck_require__(65163); +const utils_1 = __nccwpck_require__(89158); +/** + * Supported types of metric instruments. + */ +var InstrumentType; +(function (InstrumentType) { + InstrumentType["COUNTER"] = "COUNTER"; + InstrumentType["GAUGE"] = "GAUGE"; + InstrumentType["HISTOGRAM"] = "HISTOGRAM"; + InstrumentType["UP_DOWN_COUNTER"] = "UP_DOWN_COUNTER"; + InstrumentType["OBSERVABLE_COUNTER"] = "OBSERVABLE_COUNTER"; + InstrumentType["OBSERVABLE_GAUGE"] = "OBSERVABLE_GAUGE"; + InstrumentType["OBSERVABLE_UP_DOWN_COUNTER"] = "OBSERVABLE_UP_DOWN_COUNTER"; +})(InstrumentType = exports.InstrumentType || (exports.InstrumentType = {})); +function createInstrumentDescriptor(name, type, options) { + var _a, _b, _c, _d; + if (!isValidName(name)) { + api_1.diag.warn(`Invalid metric name: "${name}". The metric name should be a ASCII string with a length no greater than 255 characters.`); } + return { + name, + type, + description: (_a = options === null || options === void 0 ? void 0 : options.description) !== null && _a !== void 0 ? _a : '', + unit: (_b = options === null || options === void 0 ? void 0 : options.unit) !== null && _b !== void 0 ? _b : '', + valueType: (_c = options === null || options === void 0 ? void 0 : options.valueType) !== null && _c !== void 0 ? _c : api_1.ValueType.DOUBLE, + advice: (_d = options === null || options === void 0 ? void 0 : options.advice) !== null && _d !== void 0 ? _d : {}, + }; } -exports.TraceState = TraceState; -//# sourceMappingURL=TraceState.js.map +exports.createInstrumentDescriptor = createInstrumentDescriptor; +function createInstrumentDescriptorWithView(view, instrument) { + var _a, _b; + return { + name: (_a = view.name) !== null && _a !== void 0 ? _a : instrument.name, + description: (_b = view.description) !== null && _b !== void 0 ? _b : instrument.description, + type: instrument.type, + unit: instrument.unit, + valueType: instrument.valueType, + advice: instrument.advice, + }; +} +exports.createInstrumentDescriptorWithView = createInstrumentDescriptorWithView; +function isDescriptorCompatibleWith(descriptor, otherDescriptor) { + // Names are case-insensitive strings. + return ((0, utils_1.equalsCaseInsensitive)(descriptor.name, otherDescriptor.name) && + descriptor.unit === otherDescriptor.unit && + descriptor.type === otherDescriptor.type && + descriptor.valueType === otherDescriptor.valueType); +} +exports.isDescriptorCompatibleWith = isDescriptorCompatibleWith; +// ASCII string with a length no greater than 255 characters. +// NB: the first character counted separately from the rest. +const NAME_REGEXP = /^[a-z][a-z0-9_.\-/]{0,254}$/i; +function isValidName(name) { + return name.match(NAME_REGEXP) != null; +} +exports.isValidName = isValidName; +//# sourceMappingURL=InstrumentDescriptor.js.map /***/ }), -/***/ 85886: +/***/ 20667: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57370,97 +58694,126 @@ exports.TraceState = TraceState; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0; +exports.isObservableInstrument = exports.ObservableUpDownCounterInstrument = exports.ObservableGaugeInstrument = exports.ObservableCounterInstrument = exports.ObservableInstrument = exports.HistogramInstrument = exports.GaugeInstrument = exports.CounterInstrument = exports.UpDownCounterInstrument = exports.SyncInstrument = void 0; const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(54772); -const TraceState_1 = __nccwpck_require__(68735); -exports.TRACE_PARENT_HEADER = 'traceparent'; -exports.TRACE_STATE_HEADER = 'tracestate'; -const VERSION = '00'; -const VERSION_PART = '(?!ff)[\\da-f]{2}'; -const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}'; -const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}'; -const FLAGS_PART = '[\\da-f]{2}'; -const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`); +const core_1 = __nccwpck_require__(89736); +class SyncInstrument { + constructor(_writableMetricStorage, _descriptor) { + this._writableMetricStorage = _writableMetricStorage; + this._descriptor = _descriptor; + } + _record(value, attributes = {}, context = api_1.context.active()) { + if (typeof value !== 'number') { + api_1.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`); + return; + } + if (this._descriptor.valueType === api_1.ValueType.INT && + !Number.isInteger(value)) { + api_1.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`); + value = Math.trunc(value); + // ignore non-finite values. + if (!Number.isInteger(value)) { + return; + } + } + this._writableMetricStorage.record(value, attributes, context, (0, core_1.millisToHrTime)(Date.now())); + } +} +exports.SyncInstrument = SyncInstrument; /** - * Parses information from the [traceparent] span tag and converts it into {@link SpanContext} - * @param traceParent - A meta property that comes from server. - * It should be dynamically generated server side to have the server's request trace Id, - * a parent span Id that was set on the server's request span, - * and the trace flags to indicate the server's sampling decision - * (01 = sampled, 00 = not sampled). - * for example: '{version}-{traceId}-{spanId}-{sampleDecision}' - * For more information see {@link https://www.w3.org/TR/trace-context/} + * The class implements {@link UpDownCounter} interface. */ -function parseTraceParent(traceParent) { - const match = TRACE_PARENT_REGEX.exec(traceParent); - if (!match) - return null; - // According to the specification the implementation should be compatible - // with future versions. If there are more parts, we only reject it if it's using version 00 - // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent - if (match[1] === '00' && match[5]) - return null; - return { - traceId: match[2], - spanId: match[3], - traceFlags: parseInt(match[4], 16), - }; +class UpDownCounterInstrument extends SyncInstrument { + /** + * Increment value of counter by the input. Inputs may be negative. + */ + add(value, attributes, ctx) { + this._record(value, attributes, ctx); + } } -exports.parseTraceParent = parseTraceParent; +exports.UpDownCounterInstrument = UpDownCounterInstrument; /** - * Propagates {@link SpanContext} through Trace Context format propagation. - * - * Based on the Trace Context specification: - * https://www.w3.org/TR/trace-context/ + * The class implements {@link Counter} interface. */ -class W3CTraceContextPropagator { - inject(context, carrier, setter) { - const spanContext = api_1.trace.getSpanContext(context); - if (!spanContext || - (0, suppress_tracing_1.isTracingSuppressed)(context) || - !(0, api_1.isSpanContextValid)(spanContext)) +class CounterInstrument extends SyncInstrument { + /** + * Increment value of counter by the input. Inputs may not be negative. + */ + add(value, attributes, ctx) { + if (value < 0) { + api_1.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${value}`); return; - const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`; - setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent); - if (spanContext.traceState) { - setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize()); } + this._record(value, attributes, ctx); } - extract(context, carrier, getter) { - const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER); - if (!traceParentHeader) - return context; - const traceParent = Array.isArray(traceParentHeader) - ? traceParentHeader[0] - : traceParentHeader; - if (typeof traceParent !== 'string') - return context; - const spanContext = parseTraceParent(traceParent); - if (!spanContext) - return context; - spanContext.isRemote = true; - const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER); - if (traceStateHeader) { - // If more than one `tracestate` header is found, we merge them into a - // single header. - const state = Array.isArray(traceStateHeader) - ? traceStateHeader.join(',') - : traceStateHeader; - spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined); +} +exports.CounterInstrument = CounterInstrument; +/** + * The class implements {@link Gauge} interface. + */ +class GaugeInstrument extends SyncInstrument { + /** + * Records a measurement. + */ + record(value, attributes, ctx) { + this._record(value, attributes, ctx); + } +} +exports.GaugeInstrument = GaugeInstrument; +/** + * The class implements {@link Histogram} interface. + */ +class HistogramInstrument extends SyncInstrument { + /** + * Records a measurement. Value of the measurement must not be negative. + */ + record(value, attributes, ctx) { + if (value < 0) { + api_1.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${value}`); + return; } - return api_1.trace.setSpanContext(context, spanContext); + this._record(value, attributes, ctx); } - fields() { - return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER]; +} +exports.HistogramInstrument = HistogramInstrument; +class ObservableInstrument { + constructor(descriptor, metricStorages, _observableRegistry) { + this._observableRegistry = _observableRegistry; + this._descriptor = descriptor; + this._metricStorages = metricStorages; + } + /** + * @see {Observable.addCallback} + */ + addCallback(callback) { + this._observableRegistry.addCallback(callback, this); + } + /** + * @see {Observable.removeCallback} + */ + removeCallback(callback) { + this._observableRegistry.removeCallback(callback, this); } } -exports.W3CTraceContextPropagator = W3CTraceContextPropagator; -//# sourceMappingURL=W3CTraceContextPropagator.js.map +exports.ObservableInstrument = ObservableInstrument; +class ObservableCounterInstrument extends ObservableInstrument { +} +exports.ObservableCounterInstrument = ObservableCounterInstrument; +class ObservableGaugeInstrument extends ObservableInstrument { +} +exports.ObservableGaugeInstrument = ObservableGaugeInstrument; +class ObservableUpDownCounterInstrument extends ObservableInstrument { +} +exports.ObservableUpDownCounterInstrument = ObservableUpDownCounterInstrument; +function isObservableInstrument(it) { + return it instanceof ObservableInstrument; +} +exports.isObservableInstrument = isObservableInstrument; +//# sourceMappingURL=Instruments.js.map /***/ }), -/***/ 22033: +/***/ 45894: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57481,30 +58834,92 @@ exports.W3CTraceContextPropagator = W3CTraceContextPropagator; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0; -const api_1 = __nccwpck_require__(65163); -const RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA'); -var RPCType; -(function (RPCType) { - RPCType["HTTP"] = "http"; -})(RPCType = exports.RPCType || (exports.RPCType = {})); -function setRPCMetadata(context, meta) { - return context.setValue(RPC_METADATA_KEY, meta); -} -exports.setRPCMetadata = setRPCMetadata; -function deleteRPCMetadata(context) { - return context.deleteValue(RPC_METADATA_KEY); -} -exports.deleteRPCMetadata = deleteRPCMetadata; -function getRPCMetadata(context) { - return context.getValue(RPC_METADATA_KEY); +exports.Meter = void 0; +const InstrumentDescriptor_1 = __nccwpck_require__(42671); +const Instruments_1 = __nccwpck_require__(20667); +/** + * This class implements the {@link IMeter} interface. + */ +class Meter { + constructor(_meterSharedState) { + this._meterSharedState = _meterSharedState; + } + /** + * Create a {@link Gauge} instrument. + * @experimental + */ + createGauge(name, options) { + const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.GAUGE, options); + const storage = this._meterSharedState.registerMetricStorage(descriptor); + return new Instruments_1.GaugeInstrument(storage, descriptor); + } + /** + * Create a {@link Histogram} instrument. + */ + createHistogram(name, options) { + const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.HISTOGRAM, options); + const storage = this._meterSharedState.registerMetricStorage(descriptor); + return new Instruments_1.HistogramInstrument(storage, descriptor); + } + /** + * Create a {@link Counter} instrument. + */ + createCounter(name, options) { + const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.COUNTER, options); + const storage = this._meterSharedState.registerMetricStorage(descriptor); + return new Instruments_1.CounterInstrument(storage, descriptor); + } + /** + * Create a {@link UpDownCounter} instrument. + */ + createUpDownCounter(name, options) { + const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER, options); + const storage = this._meterSharedState.registerMetricStorage(descriptor); + return new Instruments_1.UpDownCounterInstrument(storage, descriptor); + } + /** + * Create a {@link ObservableGauge} instrument. + */ + createObservableGauge(name, options) { + const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE, options); + const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor); + return new Instruments_1.ObservableGaugeInstrument(descriptor, storages, this._meterSharedState.observableRegistry); + } + /** + * Create a {@link ObservableCounter} instrument. + */ + createObservableCounter(name, options) { + const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.OBSERVABLE_COUNTER, options); + const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor); + return new Instruments_1.ObservableCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry); + } + /** + * Create a {@link ObservableUpDownCounter} instrument. + */ + createObservableUpDownCounter(name, options) { + const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER, options); + const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor); + return new Instruments_1.ObservableUpDownCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry); + } + /** + * @see {@link Meter.addBatchObservableCallback} + */ + addBatchObservableCallback(callback, observables) { + this._meterSharedState.observableRegistry.addBatchCallback(callback, observables); + } + /** + * @see {@link Meter.removeBatchObservableCallback} + */ + removeBatchObservableCallback(callback, observables) { + this._meterSharedState.observableRegistry.removeBatchCallback(callback, observables); + } } -exports.getRPCMetadata = getRPCMetadata; -//# sourceMappingURL=rpc-metadata.js.map +exports.Meter = Meter; +//# sourceMappingURL=Meter.js.map /***/ }), -/***/ 91765: +/***/ 60310: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57525,25 +58940,101 @@ exports.getRPCMetadata = getRPCMetadata; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOffSampler = void 0; +exports.MeterProvider = void 0; const api_1 = __nccwpck_require__(65163); -/** Sampler that samples no traces. */ -class AlwaysOffSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.NOT_RECORD, - }; +const resources_1 = __nccwpck_require__(3871); +const MeterProviderSharedState_1 = __nccwpck_require__(30898); +const MetricCollector_1 = __nccwpck_require__(20142); +/** + * This class implements the {@link MeterProvider} interface. + */ +class MeterProvider { + constructor(options) { + var _a; + this._shutdown = false; + const resource = resources_1.Resource.default().merge((_a = options === null || options === void 0 ? void 0 : options.resource) !== null && _a !== void 0 ? _a : resources_1.Resource.empty()); + this._sharedState = new MeterProviderSharedState_1.MeterProviderSharedState(resource); + if ((options === null || options === void 0 ? void 0 : options.views) != null && options.views.length > 0) { + for (const view of options.views) { + this._sharedState.viewRegistry.addView(view); + } + } + if ((options === null || options === void 0 ? void 0 : options.readers) != null && options.readers.length > 0) { + for (const metricReader of options.readers) { + this.addMetricReader(metricReader); + } + } } - toString() { - return 'AlwaysOffSampler'; + /** + * Get a meter with the configuration of the MeterProvider. + */ + getMeter(name, version = '', options = {}) { + // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#meter-creation + if (this._shutdown) { + api_1.diag.warn('A shutdown MeterProvider cannot provide a Meter'); + return (0, api_1.createNoopMeter)(); + } + return this._sharedState.getMeterSharedState({ + name, + version, + schemaUrl: options.schemaUrl, + }).meter; + } + /** + * Register a {@link MetricReader} to the meter provider. After the + * registration, the MetricReader can start metrics collection. + * + *

NOTE: {@link MetricReader} instances MUST be added before creating any instruments. + * A {@link MetricReader} instance registered later may receive no or incomplete metric data. + * + * @param metricReader the metric reader to be registered. + * + * @deprecated This method will be removed in SDK 2.0. Please use + * {@link MeterProviderOptions.readers} via the {@link MeterProvider} constructor instead + */ + addMetricReader(metricReader) { + const collector = new MetricCollector_1.MetricCollector(this._sharedState, metricReader); + metricReader.setMetricProducer(collector); + this._sharedState.metricCollectors.push(collector); + } + /** + * Flush all buffered data and shut down the MeterProvider and all registered + * MetricReaders. + * + * Returns a promise which is resolved when all flushes are complete. + */ + async shutdown(options) { + if (this._shutdown) { + api_1.diag.warn('shutdown may only be called once per MeterProvider'); + return; + } + this._shutdown = true; + await Promise.all(this._sharedState.metricCollectors.map(collector => { + return collector.shutdown(options); + })); + } + /** + * Notifies all registered MetricReaders to flush any buffered data. + * + * Returns a promise which is resolved when all flushes are complete. + */ + async forceFlush(options) { + // do not flush after shutdown + if (this._shutdown) { + api_1.diag.warn('invalid attempt to force flush after MeterProvider shutdown'); + return; + } + await Promise.all(this._sharedState.metricCollectors.map(collector => { + return collector.forceFlush(options); + })); } } -exports.AlwaysOffSampler = AlwaysOffSampler; -//# sourceMappingURL=AlwaysOffSampler.js.map +exports.MeterProvider = MeterProvider; +//# sourceMappingURL=MeterProvider.js.map /***/ }), -/***/ 53416: +/***/ 80183: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57564,25 +59055,86 @@ exports.AlwaysOffSampler = AlwaysOffSampler; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOnSampler = void 0; +exports.BatchObservableResultImpl = exports.ObservableResultImpl = void 0; const api_1 = __nccwpck_require__(65163); -/** Sampler that samples all traces. */ -class AlwaysOnSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.RECORD_AND_SAMPLED, - }; +const HashMap_1 = __nccwpck_require__(99909); +const Instruments_1 = __nccwpck_require__(20667); +/** + * The class implements {@link ObservableResult} interface. + */ +class ObservableResultImpl { + constructor(_instrumentName, _valueType) { + this._instrumentName = _instrumentName; + this._valueType = _valueType; + /** + * @internal + */ + this._buffer = new HashMap_1.AttributeHashMap(); } - toString() { - return 'AlwaysOnSampler'; + /** + * Observe a measurement of the value associated with the given attributes. + */ + observe(value, attributes = {}) { + if (typeof value !== 'number') { + api_1.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${value}`); + return; + } + if (this._valueType === api_1.ValueType.INT && !Number.isInteger(value)) { + api_1.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`); + value = Math.trunc(value); + // ignore non-finite values. + if (!Number.isInteger(value)) { + return; + } + } + this._buffer.set(attributes, value); } } -exports.AlwaysOnSampler = AlwaysOnSampler; -//# sourceMappingURL=AlwaysOnSampler.js.map +exports.ObservableResultImpl = ObservableResultImpl; +/** + * The class implements {@link BatchObservableCallback} interface. + */ +class BatchObservableResultImpl { + constructor() { + /** + * @internal + */ + this._buffer = new Map(); + } + /** + * Observe a measurement of the value associated with the given attributes. + */ + observe(metric, value, attributes = {}) { + if (!(0, Instruments_1.isObservableInstrument)(metric)) { + return; + } + let map = this._buffer.get(metric); + if (map == null) { + map = new HashMap_1.AttributeHashMap(); + this._buffer.set(metric, map); + } + if (typeof value !== 'number') { + api_1.diag.warn(`non-number value provided to metric ${metric._descriptor.name}: ${value}`); + return; + } + if (metric._descriptor.valueType === api_1.ValueType.INT && + !Number.isInteger(value)) { + api_1.diag.warn(`INT value type cannot accept a floating-point value for ${metric._descriptor.name}, ignoring the fractional digits.`); + value = Math.trunc(value); + // ignore non-finite values. + if (!Number.isInteger(value)) { + return; + } + } + map.set(attributes, value); + } +} +exports.BatchObservableResultImpl = BatchObservableResultImpl; +//# sourceMappingURL=ObservableResult.js.map /***/ }), -/***/ 23917: +/***/ 4905: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57603,58 +59155,32 @@ exports.AlwaysOnSampler = AlwaysOnSampler; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ParentBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -const global_error_handler_1 = __nccwpck_require__(44257); -const AlwaysOffSampler_1 = __nccwpck_require__(91765); -const AlwaysOnSampler_1 = __nccwpck_require__(53416); -/** - * A composite sampler that either respects the parent span's sampling decision - * or delegates to `delegateSampler` for root spans. - */ -class ParentBasedSampler { - constructor(config) { - var _a, _b, _c, _d; - this._root = config.root; - if (!this._root) { - (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured')); - this._root = new AlwaysOnSampler_1.AlwaysOnSampler(); - } - this._remoteParentSampled = - (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._remoteParentNotSampled = - (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler(); - this._localParentSampled = - (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._localParentNotSampled = - (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler(); +exports.DropAggregator = void 0; +const types_1 = __nccwpck_require__(66430); +/** Basic aggregator for None which keeps no recorded value. */ +class DropAggregator { + constructor() { + this.kind = types_1.AggregatorKind.DROP; } - shouldSample(context, traceId, spanName, spanKind, attributes, links) { - const parentContext = api_1.trace.getSpanContext(context); - if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) { - return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.isRemote) { - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); + createAccumulation() { + return undefined; } - toString() { - return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`; + merge(_previous, _delta) { + return undefined; + } + diff(_previous, _current) { + return undefined; + } + toMetricData(_descriptor, _aggregationTemporality, _accumulationByAttributes, _endTime) { + return undefined; } } -exports.ParentBasedSampler = ParentBasedSampler; -//# sourceMappingURL=ParentBasedSampler.js.map +exports.DropAggregator = DropAggregator; +//# sourceMappingURL=Drop.js.map /***/ }), -/***/ 40599: +/***/ 39405: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57675,46 +59201,459 @@ exports.ParentBasedSampler = ParentBasedSampler; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceIdRatioBasedSampler = void 0; +exports.ExponentialHistogramAggregator = exports.ExponentialHistogramAccumulation = void 0; +const types_1 = __nccwpck_require__(66430); +const MetricData_1 = __nccwpck_require__(51729); const api_1 = __nccwpck_require__(65163); -/** Sampler that samples a given fraction of traces based of trace id deterministically. */ -class TraceIdRatioBasedSampler { - constructor(_ratio = 0) { - this._ratio = _ratio; - this._ratio = this._normalize(_ratio); - this._upperBound = Math.floor(this._ratio * 0xffffffff); +const InstrumentDescriptor_1 = __nccwpck_require__(42671); +const Buckets_1 = __nccwpck_require__(57202); +const getMapping_1 = __nccwpck_require__(21861); +const util_1 = __nccwpck_require__(4589); +// HighLow is a utility class used for computing a common scale for +// two exponential histogram accumulations +class HighLow { + constructor(low, high) { + this.low = low; + this.high = high; + } + static combine(h1, h2) { + return new HighLow(Math.min(h1.low, h2.low), Math.max(h1.high, h2.high)); + } +} +const MAX_SCALE = 20; +const DEFAULT_MAX_SIZE = 160; +const MIN_MAX_SIZE = 2; +class ExponentialHistogramAccumulation { + constructor(startTime = startTime, _maxSize = DEFAULT_MAX_SIZE, _recordMinMax = true, _sum = 0, _count = 0, _zeroCount = 0, _min = Number.POSITIVE_INFINITY, _max = Number.NEGATIVE_INFINITY, _positive = new Buckets_1.Buckets(), _negative = new Buckets_1.Buckets(), _mapping = (0, getMapping_1.getMapping)(MAX_SCALE)) { + this.startTime = startTime; + this._maxSize = _maxSize; + this._recordMinMax = _recordMinMax; + this._sum = _sum; + this._count = _count; + this._zeroCount = _zeroCount; + this._min = _min; + this._max = _max; + this._positive = _positive; + this._negative = _negative; + this._mapping = _mapping; + if (this._maxSize < MIN_MAX_SIZE) { + api_1.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, \ + changing to the minimum size of: ${MIN_MAX_SIZE}`); + this._maxSize = MIN_MAX_SIZE; + } + } + /** + * record updates a histogram with a single count + * @param {Number} value + */ + record(value) { + this.updateByIncrement(value, 1); } - shouldSample(context, traceId) { + /** + * Sets the start time for this accumulation + * @param {HrTime} startTime + */ + setStartTime(startTime) { + this.startTime = startTime; + } + /** + * Returns the datapoint representation of this accumulation + * @param {HrTime} startTime + */ + toPointValue() { return { - decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound - ? api_1.SamplingDecision.RECORD_AND_SAMPLED - : api_1.SamplingDecision.NOT_RECORD, + hasMinMax: this._recordMinMax, + min: this.min, + max: this.max, + sum: this.sum, + positive: { + offset: this.positive.offset, + bucketCounts: this.positive.counts(), + }, + negative: { + offset: this.negative.offset, + bucketCounts: this.negative.counts(), + }, + count: this.count, + scale: this.scale, + zeroCount: this.zeroCount, }; } - toString() { - return `TraceIdRatioBased{${this._ratio}}`; + /** + * @returns {Number} The sum of values recorded by this accumulation + */ + get sum() { + return this._sum; } - _normalize(ratio) { - if (typeof ratio !== 'number' || isNaN(ratio)) + /** + * @returns {Number} The minimum value recorded by this accumulation + */ + get min() { + return this._min; + } + /** + * @returns {Number} The maximum value recorded by this accumulation + */ + get max() { + return this._max; + } + /** + * @returns {Number} The count of values recorded by this accumulation + */ + get count() { + return this._count; + } + /** + * @returns {Number} The number of 0 values recorded by this accumulation + */ + get zeroCount() { + return this._zeroCount; + } + /** + * @returns {Number} The scale used by this accumulation + */ + get scale() { + if (this._count === this._zeroCount) { + // all zeros! scale doesn't matter, use zero return 0; - return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; + } + return this._mapping.scale; } - _accumulate(traceId) { - let accumulation = 0; - for (let i = 0; i < traceId.length / 8; i++) { - const pos = i * 8; - const part = parseInt(traceId.slice(pos, pos + 8), 16); - accumulation = (accumulation ^ part) >>> 0; + /** + * positive holds the positive values + * @returns {Buckets} + */ + get positive() { + return this._positive; + } + /** + * negative holds the negative values by their absolute value + * @returns {Buckets} + */ + get negative() { + return this._negative; + } + /** + * updateByIncr supports updating a histogram with a non-negative + * increment. + * @param value + * @param increment + */ + updateByIncrement(value, increment) { + // NaN does not fall into any bucket, is not zero and should not be counted, + // NaN is never greater than max nor less than min, therefore return as there's nothing for us to do. + if (Number.isNaN(value)) { + return; } - return accumulation; + if (value > this._max) { + this._max = value; + } + if (value < this._min) { + this._min = value; + } + this._count += increment; + if (value === 0) { + this._zeroCount += increment; + return; + } + this._sum += value * increment; + if (value > 0) { + this._updateBuckets(this._positive, value, increment); + } + else { + this._updateBuckets(this._negative, -value, increment); + } + } + /** + * merge combines data from previous value into self + * @param {ExponentialHistogramAccumulation} previous + */ + merge(previous) { + if (this._count === 0) { + this._min = previous.min; + this._max = previous.max; + } + else if (previous.count !== 0) { + if (previous.min < this.min) { + this._min = previous.min; + } + if (previous.max > this.max) { + this._max = previous.max; + } + } + this.startTime = previous.startTime; + this._sum += previous.sum; + this._count += previous.count; + this._zeroCount += previous.zeroCount; + const minScale = this._minScale(previous); + this._downscale(this.scale - minScale); + this._mergeBuckets(this.positive, previous, previous.positive, minScale); + this._mergeBuckets(this.negative, previous, previous.negative, minScale); + } + /** + * diff subtracts other from self + * @param {ExponentialHistogramAccumulation} other + */ + diff(other) { + this._min = Infinity; + this._max = -Infinity; + this._sum -= other.sum; + this._count -= other.count; + this._zeroCount -= other.zeroCount; + const minScale = this._minScale(other); + this._downscale(this.scale - minScale); + this._diffBuckets(this.positive, other, other.positive, minScale); + this._diffBuckets(this.negative, other, other.negative, minScale); + } + /** + * clone returns a deep copy of self + * @returns {ExponentialHistogramAccumulation} + */ + clone() { + return new ExponentialHistogramAccumulation(this.startTime, this._maxSize, this._recordMinMax, this._sum, this._count, this._zeroCount, this._min, this._max, this.positive.clone(), this.negative.clone(), this._mapping); + } + /** + * _updateBuckets maps the incoming value to a bucket index for the current + * scale. If the bucket index is outside of the range of the backing array, + * it will rescale the backing array and update the mapping for the new scale. + */ + _updateBuckets(buckets, value, increment) { + let index = this._mapping.mapToIndex(value); + // rescale the mapping if needed + let rescalingNeeded = false; + let high = 0; + let low = 0; + if (buckets.length === 0) { + buckets.indexStart = index; + buckets.indexEnd = buckets.indexStart; + buckets.indexBase = buckets.indexStart; + } + else if (index < buckets.indexStart && + buckets.indexEnd - index >= this._maxSize) { + rescalingNeeded = true; + low = index; + high = buckets.indexEnd; + } + else if (index > buckets.indexEnd && + index - buckets.indexStart >= this._maxSize) { + rescalingNeeded = true; + low = buckets.indexStart; + high = index; + } + // rescale and compute index at new scale + if (rescalingNeeded) { + const change = this._changeScale(high, low); + this._downscale(change); + index = this._mapping.mapToIndex(value); + } + this._incrementIndexBy(buckets, index, increment); + } + /** + * _incrementIndexBy increments the count of the bucket specified by `index`. + * If the index is outside of the range [buckets.indexStart, buckets.indexEnd] + * the boundaries of the backing array will be adjusted and more buckets will + * be added if needed. + */ + _incrementIndexBy(buckets, index, increment) { + if (increment === 0) { + // nothing to do for a zero increment, can happen during a merge operation + return; + } + if (buckets.length === 0) { + buckets.indexStart = buckets.indexEnd = buckets.indexBase = index; + } + if (index < buckets.indexStart) { + const span = buckets.indexEnd - index; + if (span >= buckets.backing.length) { + this._grow(buckets, span + 1); + } + buckets.indexStart = index; + } + else if (index > buckets.indexEnd) { + const span = index - buckets.indexStart; + if (span >= buckets.backing.length) { + this._grow(buckets, span + 1); + } + buckets.indexEnd = index; + } + let bucketIndex = index - buckets.indexBase; + if (bucketIndex < 0) { + bucketIndex += buckets.backing.length; + } + buckets.incrementBucket(bucketIndex, increment); + } + /** + * grow resizes the backing array by doubling in size up to maxSize. + * This extends the array with a bunch of zeros and copies the + * existing counts to the same position. + */ + _grow(buckets, needed) { + const size = buckets.backing.length; + const bias = buckets.indexBase - buckets.indexStart; + const oldPositiveLimit = size - bias; + let newSize = (0, util_1.nextGreaterSquare)(needed); + if (newSize > this._maxSize) { + newSize = this._maxSize; + } + const newPositiveLimit = newSize - bias; + buckets.backing.growTo(newSize, oldPositiveLimit, newPositiveLimit); + } + /** + * _changeScale computes how much downscaling is needed by shifting the + * high and low values until they are separated by no more than size. + */ + _changeScale(high, low) { + let change = 0; + while (high - low >= this._maxSize) { + high >>= 1; + low >>= 1; + change++; + } + return change; + } + /** + * _downscale subtracts `change` from the current mapping scale. + */ + _downscale(change) { + if (change === 0) { + return; + } + if (change < 0) { + // Note: this should be impossible. If we get here it's because + // there is a bug in the implementation. + throw new Error(`impossible change of scale: ${this.scale}`); + } + const newScale = this._mapping.scale - change; + this._positive.downscale(change); + this._negative.downscale(change); + this._mapping = (0, getMapping_1.getMapping)(newScale); + } + /** + * _minScale is used by diff and merge to compute an ideal combined scale + */ + _minScale(other) { + const minScale = Math.min(this.scale, other.scale); + const highLowPos = HighLow.combine(this._highLowAtScale(this.positive, this.scale, minScale), this._highLowAtScale(other.positive, other.scale, minScale)); + const highLowNeg = HighLow.combine(this._highLowAtScale(this.negative, this.scale, minScale), this._highLowAtScale(other.negative, other.scale, minScale)); + return Math.min(minScale - this._changeScale(highLowPos.high, highLowPos.low), minScale - this._changeScale(highLowNeg.high, highLowNeg.low)); + } + /** + * _highLowAtScale is used by diff and merge to compute an ideal combined scale. + */ + _highLowAtScale(buckets, currentScale, newScale) { + if (buckets.length === 0) { + return new HighLow(0, -1); + } + const shift = currentScale - newScale; + return new HighLow(buckets.indexStart >> shift, buckets.indexEnd >> shift); + } + /** + * _mergeBuckets translates index values from another histogram and + * adds the values into the corresponding buckets of this histogram. + */ + _mergeBuckets(ours, other, theirs, scale) { + const theirOffset = theirs.offset; + const theirChange = other.scale - scale; + for (let i = 0; i < theirs.length; i++) { + this._incrementIndexBy(ours, (theirOffset + i) >> theirChange, theirs.at(i)); + } + } + /** + * _diffBuckets translates index values from another histogram and + * subtracts the values in the corresponding buckets of this histogram. + */ + _diffBuckets(ours, other, theirs, scale) { + const theirOffset = theirs.offset; + const theirChange = other.scale - scale; + for (let i = 0; i < theirs.length; i++) { + const ourIndex = (theirOffset + i) >> theirChange; + let bucketIndex = ourIndex - ours.indexBase; + if (bucketIndex < 0) { + bucketIndex += ours.backing.length; + } + ours.decrementBucket(bucketIndex, theirs.at(i)); + } + ours.trim(); } } -exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; -//# sourceMappingURL=TraceIdRatioBasedSampler.js.map +exports.ExponentialHistogramAccumulation = ExponentialHistogramAccumulation; +/** + * Aggregator for ExponentialHistogramAccumulations + */ +class ExponentialHistogramAggregator { + /** + * @param _maxSize Maximum number of buckets for each of the positive + * and negative ranges, exclusive of the zero-bucket. + * @param _recordMinMax If set to true, min and max will be recorded. + * Otherwise, min and max will not be recorded. + */ + constructor(_maxSize, _recordMinMax) { + this._maxSize = _maxSize; + this._recordMinMax = _recordMinMax; + this.kind = types_1.AggregatorKind.EXPONENTIAL_HISTOGRAM; + } + createAccumulation(startTime) { + return new ExponentialHistogramAccumulation(startTime, this._maxSize, this._recordMinMax); + } + /** + * Return the result of the merge of two exponential histogram accumulations. + */ + merge(previous, delta) { + const result = delta.clone(); + result.merge(previous); + return result; + } + /** + * Returns a new DELTA aggregation by comparing two cumulative measurements. + */ + diff(previous, current) { + const result = current.clone(); + result.diff(previous); + return result; + } + toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) { + return { + descriptor, + aggregationTemporality, + dataPointType: MetricData_1.DataPointType.EXPONENTIAL_HISTOGRAM, + dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => { + const pointValue = accumulation.toPointValue(); + // determine if instrument allows negative values. + const allowsNegativeValues = descriptor.type === InstrumentDescriptor_1.InstrumentType.GAUGE || + descriptor.type === InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER || + descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE || + descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER; + return { + attributes, + startTime: accumulation.startTime, + endTime, + value: { + min: pointValue.hasMinMax ? pointValue.min : undefined, + max: pointValue.hasMinMax ? pointValue.max : undefined, + sum: !allowsNegativeValues ? pointValue.sum : undefined, + positive: { + offset: pointValue.positive.offset, + bucketCounts: pointValue.positive.bucketCounts, + }, + negative: { + offset: pointValue.negative.offset, + bucketCounts: pointValue.negative.bucketCounts, + }, + count: pointValue.count, + scale: pointValue.scale, + zeroCount: pointValue.zeroCount, + }, + }; + }), + }; + } +} +exports.ExponentialHistogramAggregator = ExponentialHistogramAggregator; +//# sourceMappingURL=ExponentialHistogram.js.map /***/ }), -/***/ 54772: +/***/ 85389: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57735,26 +59674,175 @@ exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0; -const api_1 = __nccwpck_require__(65163); -const SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING'); -function suppressTracing(context) { - return context.setValue(SUPPRESS_TRACING_KEY, true); +exports.HistogramAggregator = exports.HistogramAccumulation = void 0; +const types_1 = __nccwpck_require__(66430); +const MetricData_1 = __nccwpck_require__(51729); +const InstrumentDescriptor_1 = __nccwpck_require__(42671); +const utils_1 = __nccwpck_require__(89158); +function createNewEmptyCheckpoint(boundaries) { + const counts = boundaries.map(() => 0); + counts.push(0); + return { + buckets: { + boundaries, + counts, + }, + sum: 0, + count: 0, + hasMinMax: false, + min: Infinity, + max: -Infinity, + }; } -exports.suppressTracing = suppressTracing; -function unsuppressTracing(context) { - return context.deleteValue(SUPPRESS_TRACING_KEY); +class HistogramAccumulation { + constructor(startTime, _boundaries, _recordMinMax = true, _current = createNewEmptyCheckpoint(_boundaries)) { + this.startTime = startTime; + this._boundaries = _boundaries; + this._recordMinMax = _recordMinMax; + this._current = _current; + } + record(value) { + // NaN does not fall into any bucket, is not zero and should not be counted, + // NaN is never greater than max nor less than min, therefore return as there's nothing for us to do. + if (Number.isNaN(value)) { + return; + } + this._current.count += 1; + this._current.sum += value; + if (this._recordMinMax) { + this._current.min = Math.min(value, this._current.min); + this._current.max = Math.max(value, this._current.max); + this._current.hasMinMax = true; + } + const idx = (0, utils_1.binarySearchLB)(this._boundaries, value); + this._current.buckets.counts[idx + 1] += 1; + } + setStartTime(startTime) { + this.startTime = startTime; + } + toPointValue() { + return this._current; + } } -exports.unsuppressTracing = unsuppressTracing; -function isTracingSuppressed(context) { - return context.getValue(SUPPRESS_TRACING_KEY) === true; +exports.HistogramAccumulation = HistogramAccumulation; +/** + * Basic aggregator which observes events and counts them in pre-defined buckets + * and provides the total sum and count of all observations. + */ +class HistogramAggregator { + /** + * @param _boundaries sorted upper bounds of recorded values. + * @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded. + */ + constructor(_boundaries, _recordMinMax) { + this._boundaries = _boundaries; + this._recordMinMax = _recordMinMax; + this.kind = types_1.AggregatorKind.HISTOGRAM; + } + createAccumulation(startTime) { + return new HistogramAccumulation(startTime, this._boundaries, this._recordMinMax); + } + /** + * Return the result of the merge of two histogram accumulations. As long as one Aggregator + * instance produces all Accumulations with constant boundaries we don't need to worry about + * merging accumulations with different boundaries. + */ + merge(previous, delta) { + const previousValue = previous.toPointValue(); + const deltaValue = delta.toPointValue(); + const previousCounts = previousValue.buckets.counts; + const deltaCounts = deltaValue.buckets.counts; + const mergedCounts = new Array(previousCounts.length); + for (let idx = 0; idx < previousCounts.length; idx++) { + mergedCounts[idx] = previousCounts[idx] + deltaCounts[idx]; + } + let min = Infinity; + let max = -Infinity; + if (this._recordMinMax) { + if (previousValue.hasMinMax && deltaValue.hasMinMax) { + min = Math.min(previousValue.min, deltaValue.min); + max = Math.max(previousValue.max, deltaValue.max); + } + else if (previousValue.hasMinMax) { + min = previousValue.min; + max = previousValue.max; + } + else if (deltaValue.hasMinMax) { + min = deltaValue.min; + max = deltaValue.max; + } + } + return new HistogramAccumulation(previous.startTime, previousValue.buckets.boundaries, this._recordMinMax, { + buckets: { + boundaries: previousValue.buckets.boundaries, + counts: mergedCounts, + }, + count: previousValue.count + deltaValue.count, + sum: previousValue.sum + deltaValue.sum, + hasMinMax: this._recordMinMax && + (previousValue.hasMinMax || deltaValue.hasMinMax), + min: min, + max: max, + }); + } + /** + * Returns a new DELTA aggregation by comparing two cumulative measurements. + */ + diff(previous, current) { + const previousValue = previous.toPointValue(); + const currentValue = current.toPointValue(); + const previousCounts = previousValue.buckets.counts; + const currentCounts = currentValue.buckets.counts; + const diffedCounts = new Array(previousCounts.length); + for (let idx = 0; idx < previousCounts.length; idx++) { + diffedCounts[idx] = currentCounts[idx] - previousCounts[idx]; + } + return new HistogramAccumulation(current.startTime, previousValue.buckets.boundaries, this._recordMinMax, { + buckets: { + boundaries: previousValue.buckets.boundaries, + counts: diffedCounts, + }, + count: currentValue.count - previousValue.count, + sum: currentValue.sum - previousValue.sum, + hasMinMax: false, + min: Infinity, + max: -Infinity, + }); + } + toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) { + return { + descriptor, + aggregationTemporality, + dataPointType: MetricData_1.DataPointType.HISTOGRAM, + dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => { + const pointValue = accumulation.toPointValue(); + // determine if instrument allows negative values. + const allowsNegativeValues = descriptor.type === InstrumentDescriptor_1.InstrumentType.GAUGE || + descriptor.type === InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER || + descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE || + descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER; + return { + attributes, + startTime: accumulation.startTime, + endTime, + value: { + min: pointValue.hasMinMax ? pointValue.min : undefined, + max: pointValue.hasMinMax ? pointValue.max : undefined, + sum: !allowsNegativeValues ? pointValue.sum : undefined, + buckets: pointValue.buckets, + count: pointValue.count, + }, + }; + }), + }; + } } -exports.isTracingSuppressed = isTracingSuppressed; -//# sourceMappingURL=suppress-tracing.js.map +exports.HistogramAggregator = HistogramAggregator; +//# sourceMappingURL=Histogram.js.map /***/ }), -/***/ 91649: +/***/ 75209: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57775,44 +59863,85 @@ exports.isTracingSuppressed = isTracingSuppressed; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BindOnceFuture = void 0; -const promise_1 = __nccwpck_require__(33005); -/** - * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked. - */ -class BindOnceFuture { - constructor(_callback, _that) { - this._callback = _callback; - this._that = _that; - this._isCalled = false; - this._deferred = new promise_1.Deferred(); +exports.LastValueAggregator = exports.LastValueAccumulation = void 0; +const types_1 = __nccwpck_require__(66430); +const core_1 = __nccwpck_require__(89736); +const MetricData_1 = __nccwpck_require__(51729); +class LastValueAccumulation { + constructor(startTime, _current = 0, sampleTime = [0, 0]) { + this.startTime = startTime; + this._current = _current; + this.sampleTime = sampleTime; } - get isCalled() { - return this._isCalled; + record(value) { + this._current = value; + this.sampleTime = (0, core_1.millisToHrTime)(Date.now()); + } + setStartTime(startTime) { + this.startTime = startTime; + } + toPointValue() { + return this._current; + } +} +exports.LastValueAccumulation = LastValueAccumulation; +/** Basic aggregator which calculates a LastValue from individual measurements. */ +class LastValueAggregator { + constructor() { + this.kind = types_1.AggregatorKind.LAST_VALUE; + } + createAccumulation(startTime) { + return new LastValueAccumulation(startTime); } - get promise() { - return this._deferred.promise; + /** + * Returns the result of the merge of the given accumulations. + * + * Return the newly captured (delta) accumulation for LastValueAggregator. + */ + merge(previous, delta) { + // nanoseconds may lose precisions. + const latestAccumulation = (0, core_1.hrTimeToMicroseconds)(delta.sampleTime) >= + (0, core_1.hrTimeToMicroseconds)(previous.sampleTime) + ? delta + : previous; + return new LastValueAccumulation(previous.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime); } - call(...args) { - if (!this._isCalled) { - this._isCalled = true; - try { - Promise.resolve(this._callback.call(this._that, ...args)) - .then(val => this._deferred.resolve(val), err => this._deferred.reject(err)); - } - catch (err) { - this._deferred.reject(err); - } - } - return this._deferred.promise; + /** + * Returns a new DELTA aggregation by comparing two cumulative measurements. + * + * A delta aggregation is not meaningful to LastValueAggregator, just return + * the newly captured (delta) accumulation for LastValueAggregator. + */ + diff(previous, current) { + // nanoseconds may lose precisions. + const latestAccumulation = (0, core_1.hrTimeToMicroseconds)(current.sampleTime) >= + (0, core_1.hrTimeToMicroseconds)(previous.sampleTime) + ? current + : previous; + return new LastValueAccumulation(current.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime); + } + toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) { + return { + descriptor, + aggregationTemporality, + dataPointType: MetricData_1.DataPointType.GAUGE, + dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => { + return { + attributes, + startTime: accumulation.startTime, + endTime, + value: accumulation.toPointValue(), + }; + }), + }; } } -exports.BindOnceFuture = BindOnceFuture; -//# sourceMappingURL=callback.js.map +exports.LastValueAggregator = LastValueAggregator; +//# sourceMappingURL=LastValue.js.map /***/ }), -/***/ 74926: +/***/ 95394: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -57833,183 +59962,95 @@ exports.BindOnceFuture = BindOnceFuture; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0; -const api_1 = __nccwpck_require__(65163); -const sampling_1 = __nccwpck_require__(87549); -const DEFAULT_LIST_SEPARATOR = ','; -/** - * Environment interface to define all names - */ -const ENVIRONMENT_NUMBERS_KEYS = [ - 'OTEL_BSP_EXPORT_TIMEOUT', - 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE', - 'OTEL_BSP_MAX_QUEUE_SIZE', - 'OTEL_BSP_SCHEDULE_DELAY', - 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_EVENT_COUNT_LIMIT', - 'OTEL_SPAN_LINK_COUNT_LIMIT', - 'OTEL_EXPORTER_JAEGER_AGENT_PORT', -]; -function isEnvVarANumber(key) { - return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1); -} -const ENVIRONMENT_LISTS_KEYS = [ - 'OTEL_NO_PATCH_MODULES', - 'OTEL_PROPAGATORS', -]; -function isEnvVarAList(key) { - return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1; -} -exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity; -exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128; -/** - * Default environment variables - */ -exports.DEFAULT_ENVIRONMENT = { - CONTAINER_NAME: '', - ECS_CONTAINER_METADATA_URI_V4: '', - ECS_CONTAINER_METADATA_URI: '', - HOSTNAME: '', - KUBERNETES_SERVICE_HOST: '', - NAMESPACE: '', - OTEL_BSP_EXPORT_TIMEOUT: 30000, - OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512, - OTEL_BSP_MAX_QUEUE_SIZE: 2048, - OTEL_BSP_SCHEDULE_DELAY: 5000, - OTEL_EXPORTER_JAEGER_AGENT_HOST: '', - OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832, - OTEL_EXPORTER_JAEGER_ENDPOINT: '', - OTEL_EXPORTER_JAEGER_PASSWORD: '', - OTEL_EXPORTER_JAEGER_USER: '', - OTEL_EXPORTER_OTLP_ENDPOINT: '', - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '', - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '', - OTEL_EXPORTER_OTLP_HEADERS: '', - OTEL_EXPORTER_OTLP_TRACES_HEADERS: '', - OTEL_EXPORTER_OTLP_METRICS_HEADERS: '', - OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans', - OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO, - OTEL_NO_PATCH_MODULES: [], - OTEL_PROPAGATORS: ['tracecontext', 'baggage'], - OTEL_RESOURCE_ATTRIBUTES: '', - OTEL_SERVICE_NAME: '', - OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_EVENT_COUNT_LIMIT: 128, - OTEL_SPAN_LINK_COUNT_LIMIT: 128, - OTEL_TRACES_EXPORTER: 'none', - OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn, - OTEL_TRACES_SAMPLER_ARG: '', - OTEL_EXPORTER_OTLP_COMPRESSION: '', - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '', - OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '' -}; -/** - * Parses a variable as number with number validation - * @param name - * @param environment - * @param values - * @param min - * @param max - */ -function parseNumber(name, environment, values, min = -Infinity, max = Infinity) { - if (typeof values[name] !== 'undefined') { - const value = Number(values[name]); - if (!isNaN(value)) { - if (value < min) { - environment[name] = min; - } - else if (value > max) { - environment[name] = max; - } - else { - environment[name] = value; - } +exports.SumAggregator = exports.SumAccumulation = void 0; +const types_1 = __nccwpck_require__(66430); +const MetricData_1 = __nccwpck_require__(51729); +class SumAccumulation { + constructor(startTime, monotonic, _current = 0, reset = false) { + this.startTime = startTime; + this.monotonic = monotonic; + this._current = _current; + this.reset = reset; + } + record(value) { + if (this.monotonic && value < 0) { + return; } + this._current += value; } -} -/** - * Parses list-like strings from input into output. - * @param name - * @param environment - * @param values - * @param separator - */ -function parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) { - const givenValue = input[name]; - if (typeof givenValue === 'string') { - output[name] = givenValue.split(separator).map(v => v.trim()); + setStartTime(startTime) { + this.startTime = startTime; + } + toPointValue() { + return this._current; } } -// The support string -> DiagLogLevel mappings -const logLevelMap = { - ALL: api_1.DiagLogLevel.ALL, - VERBOSE: api_1.DiagLogLevel.VERBOSE, - DEBUG: api_1.DiagLogLevel.DEBUG, - INFO: api_1.DiagLogLevel.INFO, - WARN: api_1.DiagLogLevel.WARN, - ERROR: api_1.DiagLogLevel.ERROR, - NONE: api_1.DiagLogLevel.NONE, -}; -/** - * Environmentally sets log level if valid log level string is provided - * @param key - * @param environment - * @param values - */ -function setLogLevelFromEnv(key, environment, values) { - const value = values[key]; - if (typeof value === 'string') { - const theLevel = logLevelMap[value.toUpperCase()]; - if (theLevel != null) { - environment[key] = theLevel; +exports.SumAccumulation = SumAccumulation; +/** Basic aggregator which calculates a Sum from individual measurements. */ +class SumAggregator { + constructor(monotonic) { + this.monotonic = monotonic; + this.kind = types_1.AggregatorKind.SUM; + } + createAccumulation(startTime) { + return new SumAccumulation(startTime, this.monotonic); + } + /** + * Returns the result of the merge of the given accumulations. + */ + merge(previous, delta) { + const prevPv = previous.toPointValue(); + const deltaPv = delta.toPointValue(); + if (delta.reset) { + return new SumAccumulation(delta.startTime, this.monotonic, deltaPv, delta.reset); } + return new SumAccumulation(previous.startTime, this.monotonic, prevPv + deltaPv); } -} -/** - * Parses environment values - * @param values - */ -function parseEnvironment(values) { - const environment = {}; - for (const env in exports.DEFAULT_ENVIRONMENT) { - const key = env; - switch (key) { - case 'OTEL_LOG_LEVEL': - setLogLevelFromEnv(key, environment, values); - break; - default: - if (isEnvVarANumber(key)) { - parseNumber(key, environment, values); - } - else if (isEnvVarAList(key)) { - parseStringList(key, environment, values); - } - else { - const value = values[key]; - if (typeof value !== 'undefined' && value !== null) { - environment[key] = String(value); - } - } + /** + * Returns a new DELTA aggregation by comparing two cumulative measurements. + */ + diff(previous, current) { + const prevPv = previous.toPointValue(); + const currPv = current.toPointValue(); + /** + * If the SumAggregator is a monotonic one and the previous point value is + * greater than the current one, a reset is deemed to be happened. + * Return the current point value to prevent the value from been reset. + */ + if (this.monotonic && prevPv > currPv) { + return new SumAccumulation(current.startTime, this.monotonic, currPv, true); } + return new SumAccumulation(current.startTime, this.monotonic, currPv - prevPv); + } + toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) { + return { + descriptor, + aggregationTemporality, + dataPointType: MetricData_1.DataPointType.SUM, + dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => { + return { + attributes, + startTime: accumulation.startTime, + endTime, + value: accumulation.toPointValue(), + }; + }), + isMonotonic: this.monotonic, + }; } - return environment; } -exports.parseEnvironment = parseEnvironment; -//# sourceMappingURL=environment.js.map +exports.SumAggregator = SumAggregator; +//# sourceMappingURL=Sum.js.map /***/ }), -/***/ 99615: +/***/ 57202: /***/ ((__unused_webpack_module, exports) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Buckets = void 0; /* * Copyright The OpenTelemetry Authors * @@ -58025,167 +60066,270 @@ exports.parseEnvironment = parseEnvironment; * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPlainObject = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * based on lodash in order to support esm builds without esModuleInterop. - * lodash is using MIT License. - **/ -const objectTag = '[object Object]'; -const nullTag = '[object Null]'; -const undefinedTag = '[object Undefined]'; -const funcProto = Function.prototype; -const funcToString = funcProto.toString; -const objectCtorString = funcToString.call(Object); -const getPrototype = overArg(Object.getPrototypeOf, Object); -const objectProto = Object.prototype; -const hasOwnProperty = objectProto.hasOwnProperty; -const symToStringTag = Symbol ? Symbol.toStringTag : undefined; -const nativeObjectToString = objectProto.toString; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function (arg) { - return func(transform(arg)); - }; -} -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) !== objectTag) { - return false; +class Buckets { + /** + * The term index refers to the number of the exponential histogram bucket + * used to determine its boundaries. The lower boundary of a bucket is + * determined by base ** index and the upper boundary of a bucket is + * determined by base ** (index + 1). index values are signed to account + * for values less than or equal to 1. + * + * indexBase is the index of the 0th position in the + * backing array, i.e., backing[0] is the count + * in the bucket with index `indexBase`. + * + * indexStart is the smallest index value represented + * in the backing array. + * + * indexEnd is the largest index value represented in + * the backing array. + */ + constructor(backing = new BucketsBacking(), indexBase = 0, indexStart = 0, indexEnd = 0) { + this.backing = backing; + this.indexBase = indexBase; + this.indexStart = indexStart; + this.indexEnd = indexEnd; } - const proto = getPrototype(value); - if (proto === null) { - return true; + /** + * Offset is the bucket index of the smallest entry in the counts array + * @returns {number} + */ + get offset() { + return this.indexStart; } - const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) === objectCtorString; -} -exports.isPlainObject = isPlainObject; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; + /** + * Buckets is a view into the backing array. + * @returns {number} + */ + get length() { + if (this.backing.length === 0) { + return 0; + } + if (this.indexEnd === this.indexStart && this.at(0) === 0) { + return 0; + } + return this.indexEnd - this.indexStart + 1; } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; - let unmasked = false; - try { - value[symToStringTag] = undefined; - unmasked = true; + /** + * An array of counts, where count[i] carries the count + * of the bucket at index (offset+i). count[i] is the count of + * values greater than base^(offset+i) and less than or equal to + * base^(offset+i+1). + * @returns {number} The logical counts based on the backing array + */ + counts() { + return Array.from({ length: this.length }, (_, i) => this.at(i)); } - catch (e) { - // silence + /** + * At returns the count of the bucket at a position in the logical + * array of counts. + * @param position + * @returns {number} + */ + at(position) { + const bias = this.indexBase - this.indexStart; + if (position < bias) { + position += this.backing.length; + } + position -= bias; + return this.backing.countAt(position); } - const result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; + /** + * incrementBucket increments the backing array index by `increment` + * @param bucketIndex + * @param increment + */ + incrementBucket(bucketIndex, increment) { + this.backing.increment(bucketIndex, increment); + } + /** + * decrementBucket decrements the backing array index by `decrement` + * if decrement is greater than the current value, it's set to 0. + * @param bucketIndex + * @param decrement + */ + decrementBucket(bucketIndex, decrement) { + this.backing.decrement(bucketIndex, decrement); + } + /** + * trim removes leading and / or trailing zero buckets (which can occur + * after diffing two histos) and rotates the backing array so that the + * smallest non-zero index is in the 0th position of the backing array + */ + trim() { + for (let i = 0; i < this.length; i++) { + if (this.at(i) !== 0) { + this.indexStart += i; + break; + } + else if (i === this.length - 1) { + //the entire array is zeroed out + this.indexStart = this.indexEnd = this.indexBase = 0; + return; + } + } + for (let i = this.length - 1; i >= 0; i--) { + if (this.at(i) !== 0) { + this.indexEnd -= this.length - i - 1; + break; + } + } + this._rotate(); + } + /** + * downscale first rotates, then collapses 2**`by`-to-1 buckets. + * @param by + */ + downscale(by) { + this._rotate(); + const size = 1 + this.indexEnd - this.indexStart; + const each = 1 << by; + let inpos = 0; + let outpos = 0; + for (let pos = this.indexStart; pos <= this.indexEnd;) { + let mod = pos % each; + if (mod < 0) { + mod += each; + } + for (let i = mod; i < each && inpos < size; i++) { + this._relocateBucket(outpos, inpos); + inpos++; + pos++; + } + outpos++; + } + this.indexStart >>= by; + this.indexEnd >>= by; + this.indexBase = this.indexStart; + } + /** + * Clone returns a deep copy of Buckets + * @returns {Buckets} + */ + clone() { + return new Buckets(this.backing.clone(), this.indexBase, this.indexStart, this.indexEnd); + } + /** + * _rotate shifts the backing array contents so that indexStart == + * indexBase to simplify the downscale logic. + */ + _rotate() { + const bias = this.indexBase - this.indexStart; + if (bias === 0) { + return; + } + else if (bias > 0) { + this.backing.reverse(0, this.backing.length); + this.backing.reverse(0, bias); + this.backing.reverse(bias, this.backing.length); } else { - delete value[symToStringTag]; + // negative bias, this can happen when diffing two histograms + this.backing.reverse(0, this.backing.length); + this.backing.reverse(0, this.backing.length + bias); } + this.indexBase = this.indexStart; + } + /** + * _relocateBucket adds the count in counts[src] to counts[dest] and + * resets count[src] to zero. + */ + _relocateBucket(dest, src) { + if (dest === src) { + return; + } + this.incrementBucket(dest, this.backing.emptyBucket(src)); } - return result; } +exports.Buckets = Buckets; /** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * BucketsBacking holds the raw buckets and some utility methods to + * manage them. */ -function objectToString(value) { - return nativeObjectToString.call(value); +class BucketsBacking { + constructor(_counts = [0]) { + this._counts = _counts; + } + /** + * length returns the physical size of the backing array, which + * is >= buckets.length() + */ + get length() { + return this._counts.length; + } + /** + * countAt returns the count in a specific bucket + */ + countAt(pos) { + return this._counts[pos]; + } + /** + * growTo grows a backing array and copies old entries + * into their correct new positions. + */ + growTo(newSize, oldPositiveLimit, newPositiveLimit) { + const tmp = new Array(newSize).fill(0); + tmp.splice(newPositiveLimit, this._counts.length - oldPositiveLimit, ...this._counts.slice(oldPositiveLimit)); + tmp.splice(0, oldPositiveLimit, ...this._counts.slice(0, oldPositiveLimit)); + this._counts = tmp; + } + /** + * reverse the items in the backing array in the range [from, limit). + */ + reverse(from, limit) { + const num = Math.floor((from + limit) / 2) - from; + for (let i = 0; i < num; i++) { + const tmp = this._counts[from + i]; + this._counts[from + i] = this._counts[limit - i - 1]; + this._counts[limit - i - 1] = tmp; + } + } + /** + * emptyBucket empties the count from a bucket, for + * moving into another. + */ + emptyBucket(src) { + const tmp = this._counts[src]; + this._counts[src] = 0; + return tmp; + } + /** + * increments a bucket by `increment` + */ + increment(bucketIndex, increment) { + this._counts[bucketIndex] += increment; + } + /** + * decrements a bucket by `decrement` + */ + decrement(bucketIndex, decrement) { + if (this._counts[bucketIndex] >= decrement) { + this._counts[bucketIndex] -= decrement; + } + else { + // this should not happen, but we're being defensive against + // negative counts. + this._counts[bucketIndex] = 0; + } + } + /** + * clone returns a deep copy of BucketsBacking + */ + clone() { + return new BucketsBacking([...this._counts]); + } } -//# sourceMappingURL=lodash.merge.js.map +//# sourceMappingURL=Buckets.js.map /***/ }), -/***/ 70008: +/***/ 6074: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExponentMapping = void 0; /* * Copyright The OpenTelemetry Authors * @@ -58199,159 +60343,89 @@ function objectToString(value) { * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.merge = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -const lodash_merge_1 = __nccwpck_require__(99615); -const MAX_LEVEL = 20; -/** - * Merges objects together - * @param args - objects / values to be merged - */ -function merge(...args) { - let result = args.shift(); - const objects = new WeakMap(); - while (args.length > 0) { - result = mergeTwoObjects(result, args.shift(), 0, objects); - } - return result; -} -exports.merge = merge; -function takeValue(value) { - if (isArray(value)) { - return value.slice(); - } - return value; -} -/** - * Merges two objects - * @param one - first object - * @param two - second object - * @param level - current deep level - * @param objects - objects holder that has been already referenced - to prevent - * cyclic dependency - */ -function mergeTwoObjects(one, two, level = 0, objects) { - let result; - if (level > MAX_LEVEL) { - return undefined; - } - level++; - if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) { - result = takeValue(two); - } - else if (isArray(one)) { - result = one.slice(); - if (isArray(two)) { - for (let i = 0, j = two.length; i < j; i++) { - result.push(takeValue(two[i])); - } - } - else if (isObject(two)) { - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - result[key] = takeValue(two[key]); - } - } - } - else if (isObject(one)) { - if (isObject(two)) { - if (!shouldMerge(one, two)) { - return two; - } - result = Object.assign({}, one); - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - const twoValue = two[key]; - if (isPrimitive(twoValue)) { - if (typeof twoValue === 'undefined') { - delete result[key]; - } - else { - // result[key] = takeValue(twoValue); - result[key] = twoValue; - } - } - else { - const obj1 = result[key]; - const obj2 = twoValue; - if (wasObjectReferenced(one, key, objects) || - wasObjectReferenced(two, key, objects)) { - delete result[key]; - } - else { - if (isObject(obj1) && isObject(obj2)) { - const arr1 = objects.get(obj1) || []; - const arr2 = objects.get(obj2) || []; - arr1.push({ obj: one, key }); - arr2.push({ obj: two, key }); - objects.set(obj1, arr1); - objects.set(obj2, arr2); - } - result[key] = mergeTwoObjects(result[key], twoValue, level, objects); - } - } - } + * limitations under the License. + */ +const ieee754 = __nccwpck_require__(64708); +const util = __nccwpck_require__(4589); +const types_1 = __nccwpck_require__(33133); +/** + * ExponentMapping implements exponential mapping functions for + * scales <=0. For scales > 0 LogarithmMapping should be used. + */ +class ExponentMapping { + constructor(scale) { + this._shift = -scale; + } + /** + * Maps positive floating point values to indexes corresponding to scale + * @param value + * @returns {number} index for provided value at the current scale + */ + mapToIndex(value) { + if (value < ieee754.MIN_VALUE) { + return this._minNormalLowerBoundaryIndex(); } - else { - result = two; + const exp = ieee754.getNormalBase2(value); + // In case the value is an exact power of two, compute a + // correction of -1. Note, we are using a custom _rightShift + // to accommodate a 52-bit argument, which the native bitwise + // operators do not support + const correction = this._rightShift(ieee754.getSignificand(value) - 1, ieee754.SIGNIFICAND_WIDTH); + return (exp + correction) >> this._shift; + } + /** + * Returns the lower bucket boundary for the given index for scale + * + * @param index + * @returns {number} + */ + lowerBoundary(index) { + const minIndex = this._minNormalLowerBoundaryIndex(); + if (index < minIndex) { + throw new types_1.MappingError(`underflow: ${index} is < minimum lower boundary: ${minIndex}`); } + const maxIndex = this._maxNormalLowerBoundaryIndex(); + if (index > maxIndex) { + throw new types_1.MappingError(`overflow: ${index} is > maximum lower boundary: ${maxIndex}`); + } + return util.ldexp(1, index << this._shift); } - return result; -} -/** - * Function to check if object has been already reference - * @param obj - * @param key - * @param objects - */ -function wasObjectReferenced(obj, key, objects) { - const arr = objects.get(obj[key]) || []; - for (let i = 0, j = arr.length; i < j; i++) { - const info = arr[i]; - if (info.key === key && info.obj === obj) { - return true; + /** + * The scale used by this mapping + * @returns {number} + */ + get scale() { + if (this._shift === 0) { + return 0; } + return -this._shift; } - return false; -} -function isArray(value) { - return Array.isArray(value); -} -function isFunction(value) { - return typeof value === 'function'; -} -function isObject(value) { - return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object'; -} -function isPrimitive(value) { - return typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean' || - typeof value === 'undefined' || - value instanceof Date || - value instanceof RegExp || - value === null; -} -function shouldMerge(one, two) { - if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) { - return false; + _minNormalLowerBoundaryIndex() { + let index = ieee754.MIN_NORMAL_EXPONENT >> this._shift; + if (this._shift < 2) { + index--; + } + return index; + } + _maxNormalLowerBoundaryIndex() { + return ieee754.MAX_NORMAL_EXPONENT >> this._shift; + } + _rightShift(value, shift) { + return Math.floor(value * Math.pow(2, -shift)); } - return true; } -//# sourceMappingURL=merge.js.map +exports.ExponentMapping = ExponentMapping; +//# sourceMappingURL=ExponentMapping.js.map /***/ }), -/***/ 33005: -/***/ ((__unused_webpack_module, exports) => { +/***/ 59147: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LogarithmMapping = void 0; /* * Copyright The OpenTelemetry Authors * @@ -58367,35 +60441,93 @@ function shouldMerge(one, two) { * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Deferred = void 0; -class Deferred { - constructor() { - this._promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - }); +const ieee754 = __nccwpck_require__(64708); +const util = __nccwpck_require__(4589); +const types_1 = __nccwpck_require__(33133); +/** + * LogarithmMapping implements exponential mapping functions for scale > 0. + * For scales <= 0 the exponent mapping should be used. + */ +class LogarithmMapping { + constructor(scale) { + this._scale = scale; + this._scaleFactor = util.ldexp(Math.LOG2E, scale); + this._inverseFactor = util.ldexp(Math.LN2, -scale); } - get promise() { - return this._promise; + /** + * Maps positive floating point values to indexes corresponding to scale + * @param value + * @returns {number} index for provided value at the current scale + */ + mapToIndex(value) { + if (value <= ieee754.MIN_VALUE) { + return this._minNormalLowerBoundaryIndex() - 1; + } + // exact power of two special case + if (ieee754.getSignificand(value) === 0) { + const exp = ieee754.getNormalBase2(value); + return (exp << this._scale) - 1; + } + // non-power of two cases. use Math.floor to round the scaled logarithm + const index = Math.floor(Math.log(value) * this._scaleFactor); + const maxIndex = this._maxNormalLowerBoundaryIndex(); + if (index >= maxIndex) { + return maxIndex; + } + return index; } - resolve(val) { - this._resolve(val); + /** + * Returns the lower bucket boundary for the given index for scale + * + * @param index + * @returns {number} + */ + lowerBoundary(index) { + const maxIndex = this._maxNormalLowerBoundaryIndex(); + if (index >= maxIndex) { + if (index === maxIndex) { + return 2 * Math.exp((index - (1 << this._scale)) / this._scaleFactor); + } + throw new types_1.MappingError(`overflow: ${index} is > maximum lower boundary: ${maxIndex}`); + } + const minIndex = this._minNormalLowerBoundaryIndex(); + if (index <= minIndex) { + if (index === minIndex) { + return ieee754.MIN_VALUE; + } + else if (index === minIndex - 1) { + return Math.exp((index + (1 << this._scale)) / this._scaleFactor) / 2; + } + throw new types_1.MappingError(`overflow: ${index} is < minimum lower boundary: ${minIndex}`); + } + return Math.exp(index * this._inverseFactor); } - reject(err) { - this._reject(err); + /** + * The scale used by this mapping + * @returns {number} + */ + get scale() { + return this._scale; + } + _minNormalLowerBoundaryIndex() { + return ieee754.MIN_NORMAL_EXPONENT << this._scale; + } + _maxNormalLowerBoundaryIndex() { + return ((ieee754.MAX_NORMAL_EXPONENT + 1) << this._scale) - 1; } } -exports.Deferred = Deferred; -//# sourceMappingURL=promise.js.map +exports.LogarithmMapping = LogarithmMapping; +//# sourceMappingURL=LogarithmMapping.js.map /***/ }), -/***/ 87549: -/***/ ((__unused_webpack_module, exports) => { +/***/ 21861: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getMapping = void 0; /* * Copyright The OpenTelemetry Authors * @@ -58411,28 +60543,41 @@ exports.Deferred = Deferred; * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TracesSamplerValues = void 0; -var TracesSamplerValues; -(function (TracesSamplerValues) { - TracesSamplerValues["AlwaysOff"] = "always_off"; - TracesSamplerValues["AlwaysOn"] = "always_on"; - TracesSamplerValues["ParentBasedAlwaysOff"] = "parentbased_always_off"; - TracesSamplerValues["ParentBasedAlwaysOn"] = "parentbased_always_on"; - TracesSamplerValues["ParentBasedTraceIdRatio"] = "parentbased_traceidratio"; - TracesSamplerValues["TraceIdRatio"] = "traceidratio"; -})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {})); -//# sourceMappingURL=sampling.js.map +const ExponentMapping_1 = __nccwpck_require__(6074); +const LogarithmMapping_1 = __nccwpck_require__(59147); +const types_1 = __nccwpck_require__(33133); +const MIN_SCALE = -10; +const MAX_SCALE = 20; +const PREBUILT_MAPPINGS = Array.from({ length: 31 }, (_, i) => { + if (i > 10) { + return new LogarithmMapping_1.LogarithmMapping(i - 10); + } + return new ExponentMapping_1.ExponentMapping(i - 10); +}); +/** + * getMapping returns an appropriate mapping for the given scale. For scales -10 + * to 0 the underlying type will be ExponentMapping. For scales 1 to 20 the + * underlying type will be LogarithmMapping. + * @param scale a number in the range [-10, 20] + * @returns {Mapping} + */ +function getMapping(scale) { + if (scale > MAX_SCALE || scale < MIN_SCALE) { + throw new types_1.MappingError(`expected scale >= ${MIN_SCALE} && <= ${MAX_SCALE}, got: ${scale}`); + } + // mappings are offset by 10. scale -10 is at position 0 and scale 20 is at 30 + return PREBUILT_MAPPINGS[scale + 10]; +} +exports.getMapping = getMapping; +//# sourceMappingURL=getMapping.js.map /***/ }), -/***/ 24583: +/***/ 64708: /***/ ((__unused_webpack_module, exports) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isUrlIgnored = exports.urlMatches = void 0; /* * Copyright The OpenTelemetry Authors * @@ -58448,41 +60593,94 @@ exports.isUrlIgnored = exports.urlMatches = void 0; * See the License for the specific language governing permissions and * limitations under the License. */ -function urlMatches(url, urlToMatch) { - if (typeof urlToMatch === 'string') { - return url === urlToMatch; - } - else { - return !!url.match(urlToMatch); - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSignificand = exports.getNormalBase2 = exports.MIN_VALUE = exports.MAX_NORMAL_EXPONENT = exports.MIN_NORMAL_EXPONENT = exports.SIGNIFICAND_WIDTH = void 0; +/** + * The functions and constants in this file allow us to interact + * with the internal representation of an IEEE 64-bit floating point + * number. We need to work with all 64-bits, thus, care needs to be + * taken when working with Javascript's bitwise operators (<<, >>, &, + * |, etc) as they truncate operands to 32-bits. In order to work around + * this we work with the 64-bits as two 32-bit halves, perform bitwise + * operations on them independently, and combine the results (if needed). + */ +exports.SIGNIFICAND_WIDTH = 52; +/** + * EXPONENT_MASK is set to 1 for the hi 32-bits of an IEEE 754 + * floating point exponent: 0x7ff00000. + */ +const EXPONENT_MASK = 0x7ff00000; +/** + * SIGNIFICAND_MASK is the mask for the significand portion of the hi 32-bits + * of an IEEE 754 double-precision floating-point value: 0xfffff + */ +const SIGNIFICAND_MASK = 0xfffff; +/** + * EXPONENT_BIAS is the exponent bias specified for encoding + * the IEEE 754 double-precision floating point exponent: 1023 + */ +const EXPONENT_BIAS = 1023; +/** + * MIN_NORMAL_EXPONENT is the minimum exponent of a normalized + * floating point: -1022. + */ +exports.MIN_NORMAL_EXPONENT = -EXPONENT_BIAS + 1; +/** + * MAX_NORMAL_EXPONENT is the maximum exponent of a normalized + * floating point: 1023. + */ +exports.MAX_NORMAL_EXPONENT = EXPONENT_BIAS; +/** + * MIN_VALUE is the smallest normal number + */ +exports.MIN_VALUE = Math.pow(2, -1022); +/** + * getNormalBase2 extracts the normalized base-2 fractional exponent. + * This returns k for the equation f x 2**k where f is + * in the range [1, 2). Note that this function is not called for + * subnormal numbers. + * @param {number} value - the value to determine normalized base-2 fractional + * exponent for + * @returns {number} the normalized base-2 exponent + */ +function getNormalBase2(value) { + const dv = new DataView(new ArrayBuffer(8)); + dv.setFloat64(0, value); + // access the raw 64-bit float as 32-bit uints + const hiBits = dv.getUint32(0); + const expBits = (hiBits & EXPONENT_MASK) >> 20; + return expBits - EXPONENT_BIAS; } -exports.urlMatches = urlMatches; +exports.getNormalBase2 = getNormalBase2; /** - * Check if {@param url} should be ignored when comparing against {@param ignoredUrls} - * @param url - * @param ignoredUrls + * GetSignificand returns the 52 bit (unsigned) significand as a signed value. + * @param {number} value - the floating point number to extract the significand from + * @returns {number} The 52-bit significand */ -function isUrlIgnored(url, ignoredUrls) { - if (!ignoredUrls) { - return false; - } - for (const ignoreUrl of ignoredUrls) { - if (urlMatches(url, ignoreUrl)) { - return true; - } - } - return false; +function getSignificand(value) { + const dv = new DataView(new ArrayBuffer(8)); + dv.setFloat64(0, value); + // access the raw 64-bit float as two 32-bit uints + const hiBits = dv.getUint32(0); + const loBits = dv.getUint32(4); + // extract the significand bits from the hi bits and left shift 32 places note: + // we can't use the native << operator as it will truncate the result to 32-bits + const significandHiBits = (hiBits & SIGNIFICAND_MASK) * Math.pow(2, 32); + // combine the hi and lo bits and return + return significandHiBits + loBits; } -exports.isUrlIgnored = isUrlIgnored; -//# sourceMappingURL=url.js.map +exports.getSignificand = getSignificand; +//# sourceMappingURL=ieee754.js.map /***/ }), -/***/ 36258: +/***/ 33133: /***/ ((__unused_webpack_module, exports) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MappingError = void 0; /* * Copyright The OpenTelemetry Authors * @@ -58498,24 +60696,14 @@ exports.isUrlIgnored = isUrlIgnored; * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isWrapped = void 0; -/** - * Checks if certain function has been already wrapped - * @param func - */ -function isWrapped(func) { - return (typeof func === 'function' && - typeof func.__original === 'function' && - typeof func.__unwrap === 'function' && - func.__wrapped === true); +class MappingError extends Error { } -exports.isWrapped = isWrapped; -//# sourceMappingURL=wrap.js.map +exports.MappingError = MappingError; +//# sourceMappingURL=types.js.map /***/ }), -/***/ 97801: +/***/ 4589: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -58536,14 +60724,56 @@ exports.isWrapped = isWrapped; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VERSION = void 0; -// this is autogenerated file, see scripts/version-update.js -exports.VERSION = '1.2.0'; -//# sourceMappingURL=version.js.map +exports.nextGreaterSquare = exports.ldexp = void 0; +/** + * Note: other languages provide this as a built in function. This is + * a naive, but functionally correct implementation. This is used sparingly, + * when creating a new mapping in a running application. + * + * ldexp returns frac × 2**exp. With the following special cases: + * ldexp(±0, exp) = ±0 + * ldexp(±Inf, exp) = ±Inf + * ldexp(NaN, exp) = NaN + * @param frac + * @param exp + * @returns {number} + */ +function ldexp(frac, exp) { + if (frac === 0 || + frac === Number.POSITIVE_INFINITY || + frac === Number.NEGATIVE_INFINITY || + Number.isNaN(frac)) { + return frac; + } + return frac * Math.pow(2, exp); +} +exports.ldexp = ldexp; +/** + * Computes the next power of two that is greater than or equal to v. + * This implementation more efficient than, but functionally equivalent + * to Math.pow(2, Math.ceil(Math.log(x)/Math.log(2))). + * @param v + * @returns {number} + */ +function nextGreaterSquare(v) { + // The following expression computes the least power-of-two + // that is >= v. There are a number of tricky ways to + // do this, see https://stackoverflow.com/questions/466204/rounding-up-to-next-power-of-2 + v--; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + v++; + return v; +} +exports.nextGreaterSquare = nextGreaterSquare; +//# sourceMappingURL=util.js.map /***/ }), -/***/ 67655: +/***/ 85922: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -58574,13 +60804,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(30564), exports); -__exportStar(__nccwpck_require__(25844), exports); +__exportStar(__nccwpck_require__(4905), exports); +__exportStar(__nccwpck_require__(85389), exports); +__exportStar(__nccwpck_require__(39405), exports); +__exportStar(__nccwpck_require__(75209), exports); +__exportStar(__nccwpck_require__(95394), exports); //# sourceMappingURL=index.js.map /***/ }), -/***/ 63613: +/***/ 66430: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -58601,521 +60834,554 @@ __exportStar(__nccwpck_require__(25844), exports); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticResourceAttributes = { - /** - * Name of the cloud provider. - */ - CLOUD_PROVIDER: 'cloud.provider', - /** - * The cloud account ID the resource is assigned to. - */ - CLOUD_ACCOUNT_ID: 'cloud.account.id', - /** - * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations). - */ - CLOUD_REGION: 'cloud.region', - /** - * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. - * - * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. - */ - CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone', - /** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - */ - CLOUD_PLATFORM: 'cloud.platform', - /** - * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - */ - AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn', - /** - * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - */ - AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn', - /** - * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - */ - AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype', - /** - * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). - */ - AWS_ECS_TASK_ARN: 'aws.ecs.task.arn', - /** - * The task definition family this task definition is a member of. - */ - AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family', - /** - * The revision for this task definition. - */ - AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision', - /** - * The ARN of an EKS cluster. - */ - AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn', - /** - * The name(s) of the AWS log group(s) an application is writing to. - * - * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. - */ - AWS_LOG_GROUP_NAMES: 'aws.log.group.names', - /** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * - * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - */ - AWS_LOG_GROUP_ARNS: 'aws.log.group.arns', - /** - * The name(s) of the AWS log stream(s) an application is writing to. - */ - AWS_LOG_STREAM_NAMES: 'aws.log.stream.names', - /** - * The ARN(s) of the AWS log stream(s). - * - * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. - */ - AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns', - /** - * Container name. - */ - CONTAINER_NAME: 'container.name', - /** - * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. - */ - CONTAINER_ID: 'container.id', - /** - * The container runtime managing this container. - */ - CONTAINER_RUNTIME: 'container.runtime', - /** - * Name of the image the container was built on. - */ - CONTAINER_IMAGE_NAME: 'container.image.name', - /** - * Container image tag. - */ - CONTAINER_IMAGE_TAG: 'container.image.tag', - /** - * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). - */ - DEPLOYMENT_ENVIRONMENT: 'deployment.environment', - /** - * A unique identifier representing the device. - * - * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. - */ - DEVICE_ID: 'device.id', - /** - * The model identifier for the device. - * - * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. - */ - DEVICE_MODEL_IDENTIFIER: 'device.model.identifier', - /** - * The marketing name for the device model. - * - * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. - */ - DEVICE_MODEL_NAME: 'device.model.name', - /** - * The name of the single function that this runtime instance executes. - * - * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes). - */ - FAAS_NAME: 'faas.name', - /** - * The unique ID of the single function that this runtime instance executes. - * - * Note: Depending on the cloud provider, use: - - * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - Take care not to use the "invoked ARN" directly but replace any - [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple - different aliases. - * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) - * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id). - - On some providers, it may not be possible to determine the full ID at startup, - which is why this field cannot be made required. For example, on AWS the account ID - part of the ARN is not available without calling another AWS API - which may be deemed too slow for a short-running lambda function. - As an alternative, consider setting `faas.id` as a span attribute instead. - */ - FAAS_ID: 'faas.id', - /** - * The immutable version of the function being executed. - * - * Note: Depending on the cloud provider and platform, use: - - * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - (an integer represented as a decimal string). - * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) - (i.e., the function name plus the revision suffix). - * **Google Cloud Functions:** The value of the - [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - * **Azure Functions:** Not applicable. Do not set this attribute. - */ - FAAS_VERSION: 'faas.version', - /** - * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. - * - * Note: * **AWS Lambda:** Use the (full) log stream name. - */ - FAAS_INSTANCE: 'faas.instance', - /** - * The amount of memory available to the serverless function in MiB. - * - * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. - */ - FAAS_MAX_MEMORY: 'faas.max_memory', - /** - * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. - */ - HOST_ID: 'host.id', - /** - * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. - */ - HOST_NAME: 'host.name', - /** - * Type of host. For Cloud, this must be the machine type. - */ - HOST_TYPE: 'host.type', - /** - * The CPU architecture the host system is running on. - */ - HOST_ARCH: 'host.arch', - /** - * Name of the VM image or OS install the host was instantiated from. - */ - HOST_IMAGE_NAME: 'host.image.name', - /** - * VM image ID. For Cloud, this value is from the provider. - */ - HOST_IMAGE_ID: 'host.image.id', - /** - * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes). - */ - HOST_IMAGE_VERSION: 'host.image.version', - /** - * The name of the cluster. - */ - K8S_CLUSTER_NAME: 'k8s.cluster.name', - /** - * The name of the Node. - */ - K8S_NODE_NAME: 'k8s.node.name', - /** - * The UID of the Node. - */ - K8S_NODE_UID: 'k8s.node.uid', - /** - * The name of the namespace that the pod is running in. - */ - K8S_NAMESPACE_NAME: 'k8s.namespace.name', - /** - * The UID of the Pod. - */ - K8S_POD_UID: 'k8s.pod.uid', - /** - * The name of the Pod. - */ - K8S_POD_NAME: 'k8s.pod.name', - /** - * The name of the Container in a Pod template. - */ - K8S_CONTAINER_NAME: 'k8s.container.name', - /** - * The UID of the ReplicaSet. - */ - K8S_REPLICASET_UID: 'k8s.replicaset.uid', - /** - * The name of the ReplicaSet. - */ - K8S_REPLICASET_NAME: 'k8s.replicaset.name', - /** - * The UID of the Deployment. - */ - K8S_DEPLOYMENT_UID: 'k8s.deployment.uid', - /** - * The name of the Deployment. - */ - K8S_DEPLOYMENT_NAME: 'k8s.deployment.name', - /** - * The UID of the StatefulSet. - */ - K8S_STATEFULSET_UID: 'k8s.statefulset.uid', - /** - * The name of the StatefulSet. - */ - K8S_STATEFULSET_NAME: 'k8s.statefulset.name', - /** - * The UID of the DaemonSet. - */ - K8S_DAEMONSET_UID: 'k8s.daemonset.uid', - /** - * The name of the DaemonSet. - */ - K8S_DAEMONSET_NAME: 'k8s.daemonset.name', - /** - * The UID of the Job. - */ - K8S_JOB_UID: 'k8s.job.uid', - /** - * The name of the Job. - */ - K8S_JOB_NAME: 'k8s.job.name', - /** - * The UID of the CronJob. - */ - K8S_CRONJOB_UID: 'k8s.cronjob.uid', - /** - * The name of the CronJob. - */ - K8S_CRONJOB_NAME: 'k8s.cronjob.name', - /** - * The operating system type. - */ - OS_TYPE: 'os.type', - /** - * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. - */ - OS_DESCRIPTION: 'os.description', - /** - * Human readable operating system name. - */ - OS_NAME: 'os.name', - /** - * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes). - */ - OS_VERSION: 'os.version', - /** - * Process identifier (PID). - */ - PROCESS_PID: 'process.pid', - /** - * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_NAME: 'process.executable.name', - /** - * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_PATH: 'process.executable.path', - /** - * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. - */ - PROCESS_COMMAND: 'process.command', - /** - * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. - */ - PROCESS_COMMAND_LINE: 'process.command_line', - /** - * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. - */ - PROCESS_COMMAND_ARGS: 'process.command_args', - /** - * The username of the user that owns the process. - */ - PROCESS_OWNER: 'process.owner', - /** - * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. - */ - PROCESS_RUNTIME_NAME: 'process.runtime.name', - /** - * The version of the runtime of this process, as returned by the runtime without modification. - */ - PROCESS_RUNTIME_VERSION: 'process.runtime.version', +exports.AggregatorKind = void 0; +/** The kind of aggregator. */ +var AggregatorKind; +(function (AggregatorKind) { + AggregatorKind[AggregatorKind["DROP"] = 0] = "DROP"; + AggregatorKind[AggregatorKind["SUM"] = 1] = "SUM"; + AggregatorKind[AggregatorKind["LAST_VALUE"] = 2] = "LAST_VALUE"; + AggregatorKind[AggregatorKind["HISTOGRAM"] = 3] = "HISTOGRAM"; + AggregatorKind[AggregatorKind["EXPONENTIAL_HISTOGRAM"] = 4] = "EXPONENTIAL_HISTOGRAM"; +})(AggregatorKind = exports.AggregatorKind || (exports.AggregatorKind = {})); +//# sourceMappingURL=types.js.map + +/***/ }), + +/***/ 18747: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = exports.DEFAULT_AGGREGATION_SELECTOR = void 0; +const Aggregation_1 = __nccwpck_require__(14769); +const AggregationTemporality_1 = __nccwpck_require__(28589); +const DEFAULT_AGGREGATION_SELECTOR = _instrumentType => Aggregation_1.Aggregation.Default(); +exports.DEFAULT_AGGREGATION_SELECTOR = DEFAULT_AGGREGATION_SELECTOR; +const DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = _instrumentType => AggregationTemporality_1.AggregationTemporality.CUMULATIVE; +exports.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR; +//# sourceMappingURL=AggregationSelector.js.map + +/***/ }), + +/***/ 28589: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AggregationTemporality = void 0; +/** + * AggregationTemporality indicates the way additive quantities are expressed. + */ +var AggregationTemporality; +(function (AggregationTemporality) { + AggregationTemporality[AggregationTemporality["DELTA"] = 0] = "DELTA"; + AggregationTemporality[AggregationTemporality["CUMULATIVE"] = 1] = "CUMULATIVE"; +})(AggregationTemporality = exports.AggregationTemporality || (exports.AggregationTemporality = {})); +//# sourceMappingURL=AggregationTemporality.js.map + +/***/ }), + +/***/ 38144: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ConsoleMetricExporter = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const core_1 = __nccwpck_require__(89736); +const AggregationSelector_1 = __nccwpck_require__(18747); +/* eslint-disable no-console */ +class ConsoleMetricExporter { + constructor(options) { + var _a; + this._shutdown = false; + this._temporalitySelector = + (_a = options === null || options === void 0 ? void 0 : options.temporalitySelector) !== null && _a !== void 0 ? _a : AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR; + } + export(metrics, resultCallback) { + if (this._shutdown) { + // If the exporter is shutting down, by spec, we need to return FAILED as export result + setImmediate(resultCallback, { code: core_1.ExportResultCode.FAILED }); + return; + } + return ConsoleMetricExporter._sendMetrics(metrics, resultCallback); + } + forceFlush() { + return Promise.resolve(); + } + selectAggregationTemporality(_instrumentType) { + return this._temporalitySelector(_instrumentType); + } + shutdown() { + this._shutdown = true; + return Promise.resolve(); + } + static _sendMetrics(metrics, done) { + for (const scopeMetrics of metrics.scopeMetrics) { + for (const metric of scopeMetrics.metrics) { + console.dir({ + descriptor: metric.descriptor, + dataPointType: metric.dataPointType, + dataPoints: metric.dataPoints, + }, { depth: null }); + } + } + done({ code: core_1.ExportResultCode.SUCCESS }); + } +} +exports.ConsoleMetricExporter = ConsoleMetricExporter; +//# sourceMappingURL=ConsoleMetricExporter.js.map + +/***/ }), + +/***/ 89094: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InMemoryMetricExporter = void 0; +const core_1 = __nccwpck_require__(89736); +/** + * In-memory Metrics Exporter is a Push Metric Exporter + * which accumulates metrics data in the local memory and + * allows to inspect it (useful for e.g. unit tests). + */ +class InMemoryMetricExporter { + constructor(aggregationTemporality) { + this._shutdown = false; + this._metrics = []; + this._aggregationTemporality = aggregationTemporality; + } /** - * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. - */ - PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description', + * @inheritedDoc + */ + export(metrics, resultCallback) { + // Avoid storing metrics when exporter is shutdown + if (this._shutdown) { + setTimeout(() => resultCallback({ code: core_1.ExportResultCode.FAILED }), 0); + return; + } + this._metrics.push(metrics); + setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0); + } /** - * Logical name of the service. - * - * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. - */ - SERVICE_NAME: 'service.name', + * Returns all the collected resource metrics + * @returns ResourceMetrics[] + */ + getMetrics() { + return this._metrics; + } + forceFlush() { + return Promise.resolve(); + } + reset() { + this._metrics = []; + } + selectAggregationTemporality(_instrumentType) { + return this._aggregationTemporality; + } + shutdown() { + this._shutdown = true; + return Promise.resolve(); + } +} +exports.InMemoryMetricExporter = InMemoryMetricExporter; +//# sourceMappingURL=InMemoryMetricExporter.js.map + +/***/ }), + +/***/ 51729: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DataPointType = void 0; +/** + * The aggregated point data type. + */ +var DataPointType; +(function (DataPointType) { /** - * A namespace for `service.name`. - * - * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. - */ - SERVICE_NAMESPACE: 'service.namespace', + * A histogram data point contains a histogram statistics of collected + * values with a list of explicit bucket boundaries and statistics such + * as min, max, count, and sum of all collected values. + */ + DataPointType[DataPointType["HISTOGRAM"] = 0] = "HISTOGRAM"; /** - * The string ID of the service instance. - * - * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). - */ - SERVICE_INSTANCE_ID: 'service.instance.id', + * An exponential histogram data point contains a histogram statistics of + * collected values where bucket boundaries are automatically calculated + * using an exponential function, and statistics such as min, max, count, + * and sum of all collected values. + */ + DataPointType[DataPointType["EXPONENTIAL_HISTOGRAM"] = 1] = "EXPONENTIAL_HISTOGRAM"; /** - * The version string of the service API or implementation. - */ - SERVICE_VERSION: 'service.version', + * A gauge metric data point has only a single numeric value. + */ + DataPointType[DataPointType["GAUGE"] = 2] = "GAUGE"; /** - * The name of the telemetry SDK as defined above. - */ - TELEMETRY_SDK_NAME: 'telemetry.sdk.name', + * A sum metric data point has a single numeric value and a + * monotonicity-indicator. + */ + DataPointType[DataPointType["SUM"] = 3] = "SUM"; +})(DataPointType = exports.DataPointType || (exports.DataPointType = {})); +//# sourceMappingURL=MetricData.js.map + +/***/ }), + +/***/ 56313: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MetricReader = void 0; +const api = __nccwpck_require__(65163); +const utils_1 = __nccwpck_require__(89158); +const AggregationSelector_1 = __nccwpck_require__(18747); +/** + * A registered reader of metrics that, when linked to a {@link MetricProducer}, offers global + * control over metrics. + */ +class MetricReader { + constructor(options) { + var _a, _b, _c; + // Tracks the shutdown state. + // TODO: use BindOncePromise here once a new version of @opentelemetry/core is available. + this._shutdown = false; + this._aggregationSelector = + (_a = options === null || options === void 0 ? void 0 : options.aggregationSelector) !== null && _a !== void 0 ? _a : AggregationSelector_1.DEFAULT_AGGREGATION_SELECTOR; + this._aggregationTemporalitySelector = + (_b = options === null || options === void 0 ? void 0 : options.aggregationTemporalitySelector) !== null && _b !== void 0 ? _b : AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR; + this._metricProducers = (_c = options === null || options === void 0 ? void 0 : options.metricProducers) !== null && _c !== void 0 ? _c : []; + } + /** + * Set the {@link MetricProducer} used by this instance. **This should only be called by the + * SDK and should be considered internal.** + * + * To add additional {@link MetricProducer}s to a {@link MetricReader}, pass them to the + * constructor as {@link MetricReaderOptions.metricProducers}. + * + * @internal + * @param metricProducer + */ + setMetricProducer(metricProducer) { + if (this._sdkMetricProducer) { + throw new Error('MetricReader can not be bound to a MeterProvider again.'); + } + this._sdkMetricProducer = metricProducer; + this.onInitialized(); + } /** - * The language of the telemetry SDK. - */ - TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language', + * Select the {@link Aggregation} for the given {@link InstrumentType} for this + * reader. + */ + selectAggregation(instrumentType) { + return this._aggregationSelector(instrumentType); + } /** - * The version string of the telemetry SDK. - */ - TELEMETRY_SDK_VERSION: 'telemetry.sdk.version', + * Select the {@link AggregationTemporality} for the given + * {@link InstrumentType} for this reader. + */ + selectAggregationTemporality(instrumentType) { + return this._aggregationTemporalitySelector(instrumentType); + } /** - * The version string of the auto instrumentation agent, if used. - */ - TELEMETRY_AUTO_VERSION: 'telemetry.auto.version', + * Handle once the SDK has initialized this {@link MetricReader} + * Overriding this method is optional. + */ + onInitialized() { + // Default implementation is empty. + } /** - * The name of the web engine. - */ - WEBENGINE_NAME: 'webengine.name', + * Collect all metrics from the associated {@link MetricProducer} + */ + async collect(options) { + if (this._sdkMetricProducer === undefined) { + throw new Error('MetricReader is not bound to a MetricProducer'); + } + // Subsequent invocations to collect are not allowed. SDKs SHOULD return some failure for these calls. + if (this._shutdown) { + throw new Error('MetricReader is shutdown'); + } + const [sdkCollectionResults, ...additionalCollectionResults] = await Promise.all([ + this._sdkMetricProducer.collect({ + timeoutMillis: options === null || options === void 0 ? void 0 : options.timeoutMillis, + }), + ...this._metricProducers.map(producer => producer.collect({ + timeoutMillis: options === null || options === void 0 ? void 0 : options.timeoutMillis, + })), + ]); + // Merge the results, keeping the SDK's Resource + const errors = sdkCollectionResults.errors.concat((0, utils_1.FlatMap)(additionalCollectionResults, result => result.errors)); + const resource = sdkCollectionResults.resourceMetrics.resource; + const scopeMetrics = sdkCollectionResults.resourceMetrics.scopeMetrics.concat((0, utils_1.FlatMap)(additionalCollectionResults, result => result.resourceMetrics.scopeMetrics)); + return { + resourceMetrics: { + resource, + scopeMetrics, + }, + errors, + }; + } /** - * The version of the web engine. - */ - WEBENGINE_VERSION: 'webengine.version', + * Shuts down the metric reader, the promise will reject after the optional timeout or resolve after completion. + * + *

NOTE: this operation will continue even after the promise rejects due to a timeout. + * @param options options with timeout. + */ + async shutdown(options) { + // Do not call shutdown again if it has already been called. + if (this._shutdown) { + api.diag.error('Cannot call shutdown twice.'); + return; + } + // No timeout if timeoutMillis is undefined or null. + if ((options === null || options === void 0 ? void 0 : options.timeoutMillis) == null) { + await this.onShutdown(); + } + else { + await (0, utils_1.callWithTimeout)(this.onShutdown(), options.timeoutMillis); + } + this._shutdown = true; + } /** - * Additional description of the web engine (e.g. detailed version and edition information). - */ - WEBENGINE_DESCRIPTION: 'webengine.description', -}; -exports.CloudProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.CloudPlatformValues = { - /** Alibaba Cloud Elastic Compute Service. */ - ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs', - /** Alibaba Cloud Function Compute. */ - ALIBABA_CLOUD_FC: 'alibaba_cloud_fc', - /** AWS Elastic Compute Cloud. */ - AWS_EC2: 'aws_ec2', - /** AWS Elastic Container Service. */ - AWS_ECS: 'aws_ecs', - /** AWS Elastic Kubernetes Service. */ - AWS_EKS: 'aws_eks', - /** AWS Lambda. */ - AWS_LAMBDA: 'aws_lambda', - /** AWS Elastic Beanstalk. */ - AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk', - /** Azure Virtual Machines. */ - AZURE_VM: 'azure_vm', - /** Azure Container Instances. */ - AZURE_CONTAINER_INSTANCES: 'azure_container_instances', - /** Azure Kubernetes Service. */ - AZURE_AKS: 'azure_aks', - /** Azure Functions. */ - AZURE_FUNCTIONS: 'azure_functions', - /** Azure App Service. */ - AZURE_APP_SERVICE: 'azure_app_service', - /** Google Cloud Compute Engine (GCE). */ - GCP_COMPUTE_ENGINE: 'gcp_compute_engine', - /** Google Cloud Run. */ - GCP_CLOUD_RUN: 'gcp_cloud_run', - /** Google Cloud Kubernetes Engine (GKE). */ - GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine', - /** Google Cloud Functions (GCF). */ - GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions', - /** Google Cloud App Engine (GAE). */ - GCP_APP_ENGINE: 'gcp_app_engine', -}; -exports.AwsEcsLaunchtypeValues = { - /** ec2. */ - EC2: 'ec2', - /** fargate. */ - FARGATE: 'fargate', -}; -exports.HostArchValues = { - /** AMD64. */ - AMD64: 'amd64', - /** ARM32. */ - ARM32: 'arm32', - /** ARM64. */ - ARM64: 'arm64', - /** Itanium. */ - IA64: 'ia64', - /** 32-bit PowerPC. */ - PPC32: 'ppc32', - /** 64-bit PowerPC. */ - PPC64: 'ppc64', - /** 32-bit x86. */ - X86: 'x86', -}; -exports.OsTypeValues = { - /** Microsoft Windows. */ - WINDOWS: 'windows', - /** Linux. */ - LINUX: 'linux', - /** Apple Darwin. */ - DARWIN: 'darwin', - /** FreeBSD. */ - FREEBSD: 'freebsd', - /** NetBSD. */ - NETBSD: 'netbsd', - /** OpenBSD. */ - OPENBSD: 'openbsd', - /** DragonFly BSD. */ - DRAGONFLYBSD: 'dragonflybsd', - /** HP-UX (Hewlett Packard Unix). */ - HPUX: 'hpux', - /** AIX (Advanced Interactive eXecutive). */ - AIX: 'aix', - /** Oracle Solaris. */ - SOLARIS: 'solaris', - /** IBM z/OS. */ - Z_OS: 'z_os', -}; -exports.TelemetrySdkLanguageValues = { - /** cpp. */ - CPP: 'cpp', - /** dotnet. */ - DOTNET: 'dotnet', - /** erlang. */ - ERLANG: 'erlang', - /** go. */ - GO: 'go', - /** java. */ - JAVA: 'java', - /** nodejs. */ - NODEJS: 'nodejs', - /** php. */ - PHP: 'php', - /** python. */ - PYTHON: 'python', - /** ruby. */ - RUBY: 'ruby', - /** webjs. */ - WEBJS: 'webjs', -}; -//# sourceMappingURL=SemanticResourceAttributes.js.map + * Flushes metrics read by this reader, the promise will reject after the optional timeout or resolve after completion. + * + *

NOTE: this operation will continue even after the promise rejects due to a timeout. + * @param options options with timeout. + */ + async forceFlush(options) { + if (this._shutdown) { + api.diag.warn('Cannot forceFlush on already shutdown MetricReader.'); + return; + } + // No timeout if timeoutMillis is undefined or null. + if ((options === null || options === void 0 ? void 0 : options.timeoutMillis) == null) { + await this.onForceFlush(); + return; + } + await (0, utils_1.callWithTimeout)(this.onForceFlush(), options.timeoutMillis); + } +} +exports.MetricReader = MetricReader; +//# sourceMappingURL=MetricReader.js.map /***/ }), -/***/ 25844: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 60542: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PeriodicExportingMetricReader = void 0; +const api = __nccwpck_require__(65163); +const core_1 = __nccwpck_require__(89736); +const MetricReader_1 = __nccwpck_require__(56313); +const utils_1 = __nccwpck_require__(89158); +const api_1 = __nccwpck_require__(65163); +/** + * {@link MetricReader} which collects metrics based on a user-configurable time interval, and passes the metrics to + * the configured {@link PushMetricExporter} + */ +class PeriodicExportingMetricReader extends MetricReader_1.MetricReader { + constructor(options) { + var _a, _b, _c, _d; + super({ + aggregationSelector: (_a = options.exporter.selectAggregation) === null || _a === void 0 ? void 0 : _a.bind(options.exporter), + aggregationTemporalitySelector: (_b = options.exporter.selectAggregationTemporality) === null || _b === void 0 ? void 0 : _b.bind(options.exporter), + metricProducers: options.metricProducers, + }); + if (options.exportIntervalMillis !== undefined && + options.exportIntervalMillis <= 0) { + throw Error('exportIntervalMillis must be greater than 0'); + } + if (options.exportTimeoutMillis !== undefined && + options.exportTimeoutMillis <= 0) { + throw Error('exportTimeoutMillis must be greater than 0'); + } + if (options.exportTimeoutMillis !== undefined && + options.exportIntervalMillis !== undefined && + options.exportIntervalMillis < options.exportTimeoutMillis) { + throw Error('exportIntervalMillis must be greater than or equal to exportTimeoutMillis'); + } + this._exportInterval = (_c = options.exportIntervalMillis) !== null && _c !== void 0 ? _c : 60000; + this._exportTimeout = (_d = options.exportTimeoutMillis) !== null && _d !== void 0 ? _d : 30000; + this._exporter = options.exporter; + } + async _runOnce() { + try { + await (0, utils_1.callWithTimeout)(this._doRun(), this._exportTimeout); + } + catch (err) { + if (err instanceof utils_1.TimeoutError) { + api.diag.error('Export took longer than %s milliseconds and timed out.', this._exportTimeout); + return; + } + (0, core_1.globalErrorHandler)(err); + } + } + async _doRun() { + var _a, _b; + const { resourceMetrics, errors } = await this.collect({ + timeoutMillis: this._exportTimeout, + }); + if (errors.length > 0) { + api.diag.error('PeriodicExportingMetricReader: metrics collection errors', ...errors); + } + const doExport = async () => { + const result = await core_1.internal._export(this._exporter, resourceMetrics); + if (result.code !== core_1.ExportResultCode.SUCCESS) { + throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${result.error})`); + } + }; + // Avoid scheduling a promise to make the behavior more predictable and easier to test + if (resourceMetrics.resource.asyncAttributesPending) { + (_b = (_a = resourceMetrics.resource).waitForAsyncAttributes) === null || _b === void 0 ? void 0 : _b.call(_a).then(doExport, err => api_1.diag.debug('Error while resolving async portion of resource: ', err)); + } + else { + await doExport(); + } + } + onInitialized() { + // start running the interval as soon as this reader is initialized and keep handle for shutdown. + this._interval = setInterval(() => { + // this._runOnce never rejects. Using void operator to suppress @typescript-eslint/no-floating-promises. + void this._runOnce(); + }, this._exportInterval); + (0, core_1.unrefTimer)(this._interval); + } + async onForceFlush() { + await this._runOnce(); + await this._exporter.forceFlush(); + } + async onShutdown() { + if (this._interval) { + clearInterval(this._interval); + } + await this._exporter.shutdown(); + } +} +exports.PeriodicExportingMetricReader = PeriodicExportingMetricReader; +//# sourceMappingURL=PeriodicExportingMetricReader.js.map + +/***/ }), + +/***/ 67349: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + /* * Copyright The OpenTelemetry Authors * @@ -59131,13 +61397,43 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); * See the License for the specific language governing permissions and * limitations under the License. */ -__exportStar(__nccwpck_require__(63613), exports); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TimeoutError = exports.View = exports.Aggregation = exports.SumAggregation = exports.LastValueAggregation = exports.HistogramAggregation = exports.DropAggregation = exports.ExponentialHistogramAggregation = exports.ExplicitBucketHistogramAggregation = exports.DefaultAggregation = exports.MeterProvider = exports.InstrumentType = exports.ConsoleMetricExporter = exports.InMemoryMetricExporter = exports.PeriodicExportingMetricReader = exports.MetricReader = exports.DataPointType = exports.AggregationTemporality = void 0; +var AggregationTemporality_1 = __nccwpck_require__(28589); +Object.defineProperty(exports, "AggregationTemporality", ({ enumerable: true, get: function () { return AggregationTemporality_1.AggregationTemporality; } })); +var MetricData_1 = __nccwpck_require__(51729); +Object.defineProperty(exports, "DataPointType", ({ enumerable: true, get: function () { return MetricData_1.DataPointType; } })); +var MetricReader_1 = __nccwpck_require__(56313); +Object.defineProperty(exports, "MetricReader", ({ enumerable: true, get: function () { return MetricReader_1.MetricReader; } })); +var PeriodicExportingMetricReader_1 = __nccwpck_require__(60542); +Object.defineProperty(exports, "PeriodicExportingMetricReader", ({ enumerable: true, get: function () { return PeriodicExportingMetricReader_1.PeriodicExportingMetricReader; } })); +var InMemoryMetricExporter_1 = __nccwpck_require__(89094); +Object.defineProperty(exports, "InMemoryMetricExporter", ({ enumerable: true, get: function () { return InMemoryMetricExporter_1.InMemoryMetricExporter; } })); +var ConsoleMetricExporter_1 = __nccwpck_require__(38144); +Object.defineProperty(exports, "ConsoleMetricExporter", ({ enumerable: true, get: function () { return ConsoleMetricExporter_1.ConsoleMetricExporter; } })); +var InstrumentDescriptor_1 = __nccwpck_require__(42671); +Object.defineProperty(exports, "InstrumentType", ({ enumerable: true, get: function () { return InstrumentDescriptor_1.InstrumentType; } })); +var MeterProvider_1 = __nccwpck_require__(60310); +Object.defineProperty(exports, "MeterProvider", ({ enumerable: true, get: function () { return MeterProvider_1.MeterProvider; } })); +var Aggregation_1 = __nccwpck_require__(14769); +Object.defineProperty(exports, "DefaultAggregation", ({ enumerable: true, get: function () { return Aggregation_1.DefaultAggregation; } })); +Object.defineProperty(exports, "ExplicitBucketHistogramAggregation", ({ enumerable: true, get: function () { return Aggregation_1.ExplicitBucketHistogramAggregation; } })); +Object.defineProperty(exports, "ExponentialHistogramAggregation", ({ enumerable: true, get: function () { return Aggregation_1.ExponentialHistogramAggregation; } })); +Object.defineProperty(exports, "DropAggregation", ({ enumerable: true, get: function () { return Aggregation_1.DropAggregation; } })); +Object.defineProperty(exports, "HistogramAggregation", ({ enumerable: true, get: function () { return Aggregation_1.HistogramAggregation; } })); +Object.defineProperty(exports, "LastValueAggregation", ({ enumerable: true, get: function () { return Aggregation_1.LastValueAggregation; } })); +Object.defineProperty(exports, "SumAggregation", ({ enumerable: true, get: function () { return Aggregation_1.SumAggregation; } })); +Object.defineProperty(exports, "Aggregation", ({ enumerable: true, get: function () { return Aggregation_1.Aggregation; } })); +var View_1 = __nccwpck_require__(1265); +Object.defineProperty(exports, "View", ({ enumerable: true, get: function () { return View_1.View; } })); +var utils_1 = __nccwpck_require__(89158); +Object.defineProperty(exports, "TimeoutError", ({ enumerable: true, get: function () { return utils_1.TimeoutError; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 94487: -/***/ ((__unused_webpack_module, exports) => { +/***/ 12745: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -59157,895 +61453,52 @@ __exportStar(__nccwpck_require__(63613), exports); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticAttributes = { - /** - * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). - * - * Note: This may be different from `faas.id` if an alias is involved. - */ - AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn', - /** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - */ - DB_SYSTEM: 'db.system', - /** - * The connection string used to connect to the database. It is recommended to remove embedded credentials. - */ - DB_CONNECTION_STRING: 'db.connection_string', - /** - * Username for accessing the database. - */ - DB_USER: 'db.user', - /** - * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. - */ - DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname', - /** - * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). - * - * Note: In some SQL databases, the database name to be used is called "schema name". - */ - DB_NAME: 'db.name', - /** - * The database statement being executed. - * - * Note: The value may be sanitized to exclude sensitive information. - */ - DB_STATEMENT: 'db.statement', - /** - * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. - * - * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. - */ - DB_OPERATION: 'db.operation', - /** - * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. - * - * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). - */ - DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name', - /** - * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace', - /** - * The fetch size used for paging, i.e. how many rows will be returned at once. - */ - DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size', - /** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - */ - DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_CASSANDRA_TABLE: 'db.cassandra.table', - /** - * Whether or not the query is idempotent. - */ - DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence', - /** - * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. - */ - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count', - /** - * The ID of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id', - /** - * The data center of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc', - /** - * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_HBASE_NAMESPACE: 'db.hbase.namespace', - /** - * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. - */ - DB_REDIS_DATABASE_INDEX: 'db.redis.database_index', - /** - * The collection being accessed within the database stated in `db.name`. - */ - DB_MONGODB_COLLECTION: 'db.mongodb.collection', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_SQL_TABLE: 'db.sql.table', - /** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. - */ - EXCEPTION_TYPE: 'exception.type', - /** - * The exception message. - */ - EXCEPTION_MESSAGE: 'exception.message', - /** - * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - */ - EXCEPTION_STACKTRACE: 'exception.stacktrace', - /** - * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. - * - * Note: An exception is considered to have escaped (or left) the scope of a span, - if that span is ended while the exception is still logically "in flight". - This may be actually "in flight" in some languages (e.g. if the exception - is passed to a Context manager's `__exit__` method in Python) but will - usually be caught at the point of recording the exception in most languages. - - It is usually not possible to determine at the point where an exception is thrown - whether it will escape the scope of a span. - However, it is trivial to know that an exception - will escape, if one checks for an active exception just before ending the span, - as done in the [example above](#exception-end-example). - - It follows that an exception may still escape the scope of the span - even if the `exception.escaped` attribute was not set or set to false, - since the event might have been recorded at a time where it was not - clear whether the exception will escape. - */ - EXCEPTION_ESCAPED: 'exception.escaped', - /** - * Type of the trigger on which the function is executed. - */ - FAAS_TRIGGER: 'faas.trigger', - /** - * The execution ID of the current function execution. - */ - FAAS_EXECUTION: 'faas.execution', - /** - * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - */ - FAAS_DOCUMENT_COLLECTION: 'faas.document.collection', - /** - * Describes the type of the operation that was performed on the data. - */ - FAAS_DOCUMENT_OPERATION: 'faas.document.operation', - /** - * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_DOCUMENT_TIME: 'faas.document.time', - /** - * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. - */ - FAAS_DOCUMENT_NAME: 'faas.document.name', - /** - * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_TIME: 'faas.time', - /** - * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - */ - FAAS_CRON: 'faas.cron', - /** - * A boolean that is true if the serverless function is executed for the first time (aka cold-start). - */ - FAAS_COLDSTART: 'faas.coldstart', - /** - * The name of the invoked function. - * - * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. - */ - FAAS_INVOKED_NAME: 'faas.invoked_name', - /** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - */ - FAAS_INVOKED_PROVIDER: 'faas.invoked_provider', - /** - * The cloud region of the invoked function. - * - * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. - */ - FAAS_INVOKED_REGION: 'faas.invoked_region', - /** - * Transport protocol used. See note below. - */ - NET_TRANSPORT: 'net.transport', - /** - * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). - */ - NET_PEER_IP: 'net.peer.ip', - /** - * Remote port number. - */ - NET_PEER_PORT: 'net.peer.port', - /** - * Remote hostname or similar, see note below. - */ - NET_PEER_NAME: 'net.peer.name', - /** - * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. - */ - NET_HOST_IP: 'net.host.ip', - /** - * Like `net.peer.port` but for the host port. - */ - NET_HOST_PORT: 'net.host.port', - /** - * Local hostname or similar, see note below. - */ - NET_HOST_NAME: 'net.host.name', - /** - * The internet connection type currently being used by the host. - */ - NET_HOST_CONNECTION_TYPE: 'net.host.connection.type', - /** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - */ - NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype', - /** - * The name of the mobile carrier. - */ - NET_HOST_CARRIER_NAME: 'net.host.carrier.name', - /** - * The mobile carrier country code. - */ - NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc', - /** - * The mobile carrier network code. - */ - NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc', - /** - * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. - */ - NET_HOST_CARRIER_ICC: 'net.host.carrier.icc', - /** - * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. - */ - PEER_SERVICE: 'peer.service', - /** - * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. - */ - ENDUSER_ID: 'enduser.id', - /** - * Actual/assumed role the client is making the request under extracted from token or application security context. - */ - ENDUSER_ROLE: 'enduser.role', - /** - * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - */ - ENDUSER_SCOPE: 'enduser.scope', - /** - * Current "managed" thread ID (as opposed to OS thread ID). - */ - THREAD_ID: 'thread.id', - /** - * Current thread name. - */ - THREAD_NAME: 'thread.name', - /** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). - */ - CODE_FUNCTION: 'code.function', - /** - * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. - */ - CODE_NAMESPACE: 'code.namespace', - /** - * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). - */ - CODE_FILEPATH: 'code.filepath', - /** - * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. - */ - CODE_LINENO: 'code.lineno', - /** - * HTTP request method. - */ - HTTP_METHOD: 'http.method', - /** - * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. - * - * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`. - */ - HTTP_URL: 'http.url', - /** - * The full request target as passed in a HTTP request line or equivalent. - */ - HTTP_TARGET: 'http.target', - /** - * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note. - * - * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set. - */ - HTTP_HOST: 'http.host', - /** - * The URI scheme identifying the used protocol. - */ - HTTP_SCHEME: 'http.scheme', - /** - * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). - */ - HTTP_STATUS_CODE: 'http.status_code', - /** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - */ - HTTP_FLAVOR: 'http.flavor', - /** - * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. - */ - HTTP_USER_AGENT: 'http.user_agent', - /** - * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length', - /** - * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed', - /** - * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length', - /** - * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed', - /** - * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). - * - * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available. - */ - HTTP_SERVER_NAME: 'http.server_name', - /** - * The matched route (path template). - */ - HTTP_ROUTE: 'http.route', - /** - * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). - * - * Note: This is not necessarily the same as `net.peer.ip`, which would - identify the network-level peer, which may be a proxy. - - This attribute should be set when a source of information different - from the one used for `net.peer.ip`, is available even if that other - source just confirms the same value as `net.peer.ip`. - Rationale: For `net.peer.ip`, one typically does not know if it - comes from a proxy, reverse proxy, or the actual client. Setting - `http.client_ip` when it's the same as `net.peer.ip` means that - one is at least somewhat confident that the address is not that of - the closest proxy. - */ - HTTP_CLIENT_IP: 'http.client_ip', - /** - * The keys in the `RequestItems` object field. - */ - AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names', - /** - * The JSON-serialized value of each item in the `ConsumedCapacity` response field. - */ - AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity', - /** - * The JSON-serialized value of the `ItemCollectionMetrics` response field. - */ - AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics', - /** - * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity', - /** - * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity', - /** - * The value of the `ConsistentRead` request parameter. - */ - AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read', - /** - * The value of the `ProjectionExpression` request parameter. - */ - AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection', - /** - * The value of the `Limit` request parameter. - */ - AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit', - /** - * The value of the `AttributesToGet` request parameter. - */ - AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get', - /** - * The value of the `IndexName` request parameter. - */ - AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name', - /** - * The value of the `Select` request parameter. - */ - AWS_DYNAMODB_SELECT: 'aws.dynamodb.select', - /** - * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes', - /** - * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes', - /** - * The value of the `ExclusiveStartTableName` request parameter. - */ - AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table', - /** - * The the number of items in the `TableNames` response parameter. - */ - AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count', - /** - * The value of the `ScanIndexForward` request parameter. - */ - AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward', - /** - * The value of the `Segment` request parameter. - */ - AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment', - /** - * The value of the `TotalSegments` request parameter. - */ - AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments', - /** - * The value of the `Count` response parameter. - */ - AWS_DYNAMODB_COUNT: 'aws.dynamodb.count', - /** - * The value of the `ScannedCount` response parameter. - */ - AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count', - /** - * The JSON-serialized value of each item in the `AttributeDefinitions` request field. - */ - AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions', - /** - * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates', - /** - * A string identifying the messaging system. - */ - MESSAGING_SYSTEM: 'messaging.system', - /** - * The message destination name. This might be equal to the span name but is required nevertheless. - */ - MESSAGING_DESTINATION: 'messaging.destination', - /** - * The kind of message destination. - */ - MESSAGING_DESTINATION_KIND: 'messaging.destination_kind', - /** - * A boolean that is true if the message destination is temporary. - */ - MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination', - /** - * The name of the transport protocol. - */ - MESSAGING_PROTOCOL: 'messaging.protocol', - /** - * The version of the transport protocol. - */ - MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version', - /** - * Connection string. - */ - MESSAGING_URL: 'messaging.url', - /** - * A value used by the messaging system as an identifier for the message, represented as a string. - */ - MESSAGING_MESSAGE_ID: 'messaging.message_id', - /** - * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". - */ - MESSAGING_CONVERSATION_ID: 'messaging.conversation_id', - /** - * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. - */ - MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes', - /** - * The compressed size of the message payload in bytes. - */ - MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes', - /** - * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. - */ - MESSAGING_OPERATION: 'messaging.operation', - /** - * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. - */ - MESSAGING_CONSUMER_ID: 'messaging.consumer_id', - /** - * RabbitMQ message routing key. - */ - MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key', - /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. - * - * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. - */ - MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key', - /** - * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. - */ - MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group', - /** - * Client Id for the Consumer or Producer that is handling the message. - */ - MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id', - /** - * Partition the message is sent to. - */ - MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition', - /** - * A boolean that is true if the message is a tombstone. - */ - MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone', - /** - * A string identifying the remoting system. - */ - RPC_SYSTEM: 'rpc.system', - /** - * The full (logical) name of the service being called, including its package name, if applicable. - * - * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). - */ - RPC_SERVICE: 'rpc.service', - /** - * The name of the (logical) method being called, must be equal to the $method part in the span name. - * - * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). - */ - RPC_METHOD: 'rpc.method', - /** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - */ - RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code', - /** - * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted. - */ - RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version', - /** - * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. - */ - RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id', - /** - * `error.code` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code', - /** - * `error.message` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message', - /** - * Whether this is a received or sent message. - */ - MESSAGE_TYPE: 'message.type', - /** - * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. - * - * Note: This way we guarantee that the values will be consistent between different implementations. - */ - MESSAGE_ID: 'message.id', - /** - * Compressed size of the message in bytes. - */ - MESSAGE_COMPRESSED_SIZE: 'message.compressed_size', +exports.AsyncMetricStorage = void 0; +const MetricStorage_1 = __nccwpck_require__(33134); +const DeltaMetricProcessor_1 = __nccwpck_require__(21904); +const TemporalMetricProcessor_1 = __nccwpck_require__(22566); +const HashMap_1 = __nccwpck_require__(99909); +/** + * Internal interface. + * + * Stores and aggregates {@link MetricData} for asynchronous instruments. + */ +class AsyncMetricStorage extends MetricStorage_1.MetricStorage { + constructor(_instrumentDescriptor, aggregator, _attributesProcessor, collectorHandles) { + super(_instrumentDescriptor); + this._attributesProcessor = _attributesProcessor; + this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator); + this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles); + } + record(measurements, observationTime) { + const processed = new HashMap_1.AttributeHashMap(); + Array.from(measurements.entries()).forEach(([attributes, value]) => { + processed.set(this._attributesProcessor.process(attributes), value); + }); + this._deltaMetricStorage.batchCumulate(processed, observationTime); + } /** - * Uncompressed size of the message in bytes. - */ - MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size', -}; -exports.DbSystemValues = { - /** Some other SQL database. Fallback only. See notes. */ - OTHER_SQL: 'other_sql', - /** Microsoft SQL Server. */ - MSSQL: 'mssql', - /** MySQL. */ - MYSQL: 'mysql', - /** Oracle Database. */ - ORACLE: 'oracle', - /** IBM Db2. */ - DB2: 'db2', - /** PostgreSQL. */ - POSTGRESQL: 'postgresql', - /** Amazon Redshift. */ - REDSHIFT: 'redshift', - /** Apache Hive. */ - HIVE: 'hive', - /** Cloudscape. */ - CLOUDSCAPE: 'cloudscape', - /** HyperSQL DataBase. */ - HSQLDB: 'hsqldb', - /** Progress Database. */ - PROGRESS: 'progress', - /** SAP MaxDB. */ - MAXDB: 'maxdb', - /** SAP HANA. */ - HANADB: 'hanadb', - /** Ingres. */ - INGRES: 'ingres', - /** FirstSQL. */ - FIRSTSQL: 'firstsql', - /** EnterpriseDB. */ - EDB: 'edb', - /** InterSystems Caché. */ - CACHE: 'cache', - /** Adabas (Adaptable Database System). */ - ADABAS: 'adabas', - /** Firebird. */ - FIREBIRD: 'firebird', - /** Apache Derby. */ - DERBY: 'derby', - /** FileMaker. */ - FILEMAKER: 'filemaker', - /** Informix. */ - INFORMIX: 'informix', - /** InstantDB. */ - INSTANTDB: 'instantdb', - /** InterBase. */ - INTERBASE: 'interbase', - /** MariaDB. */ - MARIADB: 'mariadb', - /** Netezza. */ - NETEZZA: 'netezza', - /** Pervasive PSQL. */ - PERVASIVE: 'pervasive', - /** PointBase. */ - POINTBASE: 'pointbase', - /** SQLite. */ - SQLITE: 'sqlite', - /** Sybase. */ - SYBASE: 'sybase', - /** Teradata. */ - TERADATA: 'teradata', - /** Vertica. */ - VERTICA: 'vertica', - /** H2. */ - H2: 'h2', - /** ColdFusion IMQ. */ - COLDFUSION: 'coldfusion', - /** Apache Cassandra. */ - CASSANDRA: 'cassandra', - /** Apache HBase. */ - HBASE: 'hbase', - /** MongoDB. */ - MONGODB: 'mongodb', - /** Redis. */ - REDIS: 'redis', - /** Couchbase. */ - COUCHBASE: 'couchbase', - /** CouchDB. */ - COUCHDB: 'couchdb', - /** Microsoft Azure Cosmos DB. */ - COSMOSDB: 'cosmosdb', - /** Amazon DynamoDB. */ - DYNAMODB: 'dynamodb', - /** Neo4j. */ - NEO4J: 'neo4j', - /** Apache Geode. */ - GEODE: 'geode', - /** Elasticsearch. */ - ELASTICSEARCH: 'elasticsearch', - /** Memcached. */ - MEMCACHED: 'memcached', - /** CockroachDB. */ - COCKROACHDB: 'cockroachdb', -}; -exports.DbCassandraConsistencyLevelValues = { - /** all. */ - ALL: 'all', - /** each_quorum. */ - EACH_QUORUM: 'each_quorum', - /** quorum. */ - QUORUM: 'quorum', - /** local_quorum. */ - LOCAL_QUORUM: 'local_quorum', - /** one. */ - ONE: 'one', - /** two. */ - TWO: 'two', - /** three. */ - THREE: 'three', - /** local_one. */ - LOCAL_ONE: 'local_one', - /** any. */ - ANY: 'any', - /** serial. */ - SERIAL: 'serial', - /** local_serial. */ - LOCAL_SERIAL: 'local_serial', -}; -exports.FaasTriggerValues = { - /** A response to some data source operation such as a database or filesystem read/write. */ - DATASOURCE: 'datasource', - /** To provide an answer to an inbound HTTP request. */ - HTTP: 'http', - /** A function is set to be executed when messages are sent to a messaging system. */ - PUBSUB: 'pubsub', - /** A function is scheduled to be executed regularly. */ - TIMER: 'timer', - /** If none of the others apply. */ - OTHER: 'other', -}; -exports.FaasDocumentOperationValues = { - /** When a new object is created. */ - INSERT: 'insert', - /** When an object is modified. */ - EDIT: 'edit', - /** When an object is deleted. */ - DELETE: 'delete', -}; -exports.FaasInvokedProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.NetTransportValues = { - /** ip_tcp. */ - IP_TCP: 'ip_tcp', - /** ip_udp. */ - IP_UDP: 'ip_udp', - /** Another IP-based protocol. */ - IP: 'ip', - /** Unix Domain socket. See below. */ - UNIX: 'unix', - /** Named or anonymous pipe. See note below. */ - PIPE: 'pipe', - /** In-process communication. */ - INPROC: 'inproc', - /** Something else (non IP-based). */ - OTHER: 'other', -}; -exports.NetHostConnectionTypeValues = { - /** wifi. */ - WIFI: 'wifi', - /** wired. */ - WIRED: 'wired', - /** cell. */ - CELL: 'cell', - /** unavailable. */ - UNAVAILABLE: 'unavailable', - /** unknown. */ - UNKNOWN: 'unknown', -}; -exports.NetHostConnectionSubtypeValues = { - /** GPRS. */ - GPRS: 'gprs', - /** EDGE. */ - EDGE: 'edge', - /** UMTS. */ - UMTS: 'umts', - /** CDMA. */ - CDMA: 'cdma', - /** EVDO Rel. 0. */ - EVDO_0: 'evdo_0', - /** EVDO Rev. A. */ - EVDO_A: 'evdo_a', - /** CDMA2000 1XRTT. */ - CDMA2000_1XRTT: 'cdma2000_1xrtt', - /** HSDPA. */ - HSDPA: 'hsdpa', - /** HSUPA. */ - HSUPA: 'hsupa', - /** HSPA. */ - HSPA: 'hspa', - /** IDEN. */ - IDEN: 'iden', - /** EVDO Rev. B. */ - EVDO_B: 'evdo_b', - /** LTE. */ - LTE: 'lte', - /** EHRPD. */ - EHRPD: 'ehrpd', - /** HSPAP. */ - HSPAP: 'hspap', - /** GSM. */ - GSM: 'gsm', - /** TD-SCDMA. */ - TD_SCDMA: 'td_scdma', - /** IWLAN. */ - IWLAN: 'iwlan', - /** 5G NR (New Radio). */ - NR: 'nr', - /** 5G NRNSA (New Radio Non-Standalone). */ - NRNSA: 'nrnsa', - /** LTE CA. */ - LTE_CA: 'lte_ca', -}; -exports.HttpFlavorValues = { - /** HTTP 1.0. */ - HTTP_1_0: '1.0', - /** HTTP 1.1. */ - HTTP_1_1: '1.1', - /** HTTP 2. */ - HTTP_2_0: '2.0', - /** SPDY protocol. */ - SPDY: 'SPDY', - /** QUIC protocol. */ - QUIC: 'QUIC', -}; -exports.MessagingDestinationKindValues = { - /** A message sent to a queue. */ - QUEUE: 'queue', - /** A message sent to a topic. */ - TOPIC: 'topic', -}; -exports.MessagingOperationValues = { - /** receive. */ - RECEIVE: 'receive', - /** process. */ - PROCESS: 'process', -}; -exports.RpcGrpcStatusCodeValues = { - /** OK. */ - OK: 0, - /** CANCELLED. */ - CANCELLED: 1, - /** UNKNOWN. */ - UNKNOWN: 2, - /** INVALID_ARGUMENT. */ - INVALID_ARGUMENT: 3, - /** DEADLINE_EXCEEDED. */ - DEADLINE_EXCEEDED: 4, - /** NOT_FOUND. */ - NOT_FOUND: 5, - /** ALREADY_EXISTS. */ - ALREADY_EXISTS: 6, - /** PERMISSION_DENIED. */ - PERMISSION_DENIED: 7, - /** RESOURCE_EXHAUSTED. */ - RESOURCE_EXHAUSTED: 8, - /** FAILED_PRECONDITION. */ - FAILED_PRECONDITION: 9, - /** ABORTED. */ - ABORTED: 10, - /** OUT_OF_RANGE. */ - OUT_OF_RANGE: 11, - /** UNIMPLEMENTED. */ - UNIMPLEMENTED: 12, - /** INTERNAL. */ - INTERNAL: 13, - /** UNAVAILABLE. */ - UNAVAILABLE: 14, - /** DATA_LOSS. */ - DATA_LOSS: 15, - /** UNAUTHENTICATED. */ - UNAUTHENTICATED: 16, -}; -exports.MessageTypeValues = { - /** sent. */ - SENT: 'SENT', - /** received. */ - RECEIVED: 'RECEIVED', -}; -//# sourceMappingURL=SemanticAttributes.js.map + * Collects the metrics from this storage. The ObservableCallback is invoked + * during the collection. + * + * Note: This is a stateful operation and may reset any interval-related + * state for the MetricCollector. + */ + collect(collector, collectionTime) { + const accumulations = this._deltaMetricStorage.collect(); + return this._temporalMetricStorage.buildMetrics(collector, this._instrumentDescriptor, accumulations, collectionTime); + } +} +exports.AsyncMetricStorage = AsyncMetricStorage; +//# sourceMappingURL=AsyncMetricStorage.js.map /***/ }), -/***/ 30564: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 21904: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); /* * Copyright The OpenTelemetry Authors * @@ -60061,12 +61514,68 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); * See the License for the specific language governing permissions and * limitations under the License. */ -__exportStar(__nccwpck_require__(94487), exports); -//# sourceMappingURL=index.js.map +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeltaMetricProcessor = void 0; +const HashMap_1 = __nccwpck_require__(99909); +/** + * Internal interface. + * + * Allows synchronous collection of metrics. This processor should allow + * allocation of new aggregation cells for metrics and convert cumulative + * recording to delta data points. + */ +class DeltaMetricProcessor { + constructor(_aggregator) { + this._aggregator = _aggregator; + this._activeCollectionStorage = new HashMap_1.AttributeHashMap(); + // TODO: find a reasonable mean to clean the memo; + // https://github.com/open-telemetry/opentelemetry-specification/pull/2208 + this._cumulativeMemoStorage = new HashMap_1.AttributeHashMap(); + } + record(value, attributes, _context, collectionTime) { + const accumulation = this._activeCollectionStorage.getOrDefault(attributes, () => this._aggregator.createAccumulation(collectionTime)); + accumulation === null || accumulation === void 0 ? void 0 : accumulation.record(value); + } + batchCumulate(measurements, collectionTime) { + Array.from(measurements.entries()).forEach(([attributes, value, hashCode]) => { + const accumulation = this._aggregator.createAccumulation(collectionTime); + accumulation === null || accumulation === void 0 ? void 0 : accumulation.record(value); + let delta = accumulation; + // Diff with recorded cumulative memo. + if (this._cumulativeMemoStorage.has(attributes, hashCode)) { + // has() returned true, previous is present. + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const previous = this._cumulativeMemoStorage.get(attributes, hashCode); + delta = this._aggregator.diff(previous, accumulation); + } + // Merge with uncollected active delta. + if (this._activeCollectionStorage.has(attributes, hashCode)) { + // has() returned true, previous is present. + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const active = this._activeCollectionStorage.get(attributes, hashCode); + delta = this._aggregator.merge(active, delta); + } + // Save the current record and the delta record. + this._cumulativeMemoStorage.set(attributes, accumulation, hashCode); + this._activeCollectionStorage.set(attributes, delta, hashCode); + }); + } + /** + * Returns a collection of delta metrics. Start time is the when first + * time event collected. + */ + collect() { + const unreportedDelta = this._activeCollectionStorage; + this._activeCollectionStorage = new HashMap_1.AttributeHashMap(); + return unreportedDelta; + } +} +exports.DeltaMetricProcessor = DeltaMetricProcessor; +//# sourceMappingURL=DeltaMetricProcessor.js.map /***/ }), -/***/ 83496: +/***/ 99909: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60087,64 +61596,76 @@ __exportStar(__nccwpck_require__(94487), exports); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPProtoExporterNodeBase = void 0; -const api_1 = __nccwpck_require__(65163); -const otlp_exporter_base_1 = __nccwpck_require__(11363); -/** - * Collector Exporter abstract base class - */ -class OTLPProtoExporterNodeBase extends otlp_exporter_base_1.OTLPExporterNodeBase { - constructor(config = {}) { - super(config); +exports.AttributeHashMap = exports.HashMap = void 0; +const utils_1 = __nccwpck_require__(89158); +class HashMap { + constructor(_hash) { + this._hash = _hash; + this._valueMap = new Map(); + this._keyMap = new Map(); + } + get(key, hashCode) { + hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key)); + return this._valueMap.get(hashCode); + } + getOrDefault(key, defaultFactory) { + const hash = this._hash(key); + if (this._valueMap.has(hash)) { + return this._valueMap.get(hash); + } + const val = defaultFactory(); + if (!this._keyMap.has(hash)) { + this._keyMap.set(hash, key); + } + this._valueMap.set(hash, val); + return val; } - _sendPromise(objects, onSuccess, onError) { - const promise = new Promise((resolve, reject) => { - this._send(this, objects, this.compression, resolve, reject); - }) - .then(onSuccess, onError); - this._sendingPromises.push(promise); - const popPromise = () => { - const index = this._sendingPromises.indexOf(promise); - this._sendingPromises.splice(index, 1); - }; - promise.then(popPromise, popPromise); + set(key, value, hashCode) { + hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key)); + if (!this._keyMap.has(hashCode)) { + this._keyMap.set(hashCode, key); + } + this._valueMap.set(hashCode, value); } - onInit(config) { - // defer to next tick and lazy load to avoid loading protobufjs too early - // and making this impossible to be instrumented - setImmediate(() => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { onInit } = __nccwpck_require__(64690); - onInit(this, config); - }); + has(key, hashCode) { + hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key)); + return this._valueMap.has(hashCode); } - send(objects, onSuccess, onError) { - if (this._shutdownOnce.isCalled) { - api_1.diag.debug('Shutdown already started. Cannot send objects'); - return; - } - if (!this._send) { - // defer to next tick and lazy load to avoid loading protobufjs too early - // and making this impossible to be instrumented - setImmediate(() => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { send } = __nccwpck_require__(64690); - this._send = send; - this._sendPromise(objects, onSuccess, onError); - }); + *keys() { + const keyIterator = this._keyMap.entries(); + let next = keyIterator.next(); + while (next.done !== true) { + yield [next.value[1], next.value[0]]; + next = keyIterator.next(); } - else { - this._sendPromise(objects, onSuccess, onError); + } + *entries() { + const valueIterator = this._valueMap.entries(); + let next = valueIterator.next(); + while (next.done !== true) { + // next.value[0] here can not be undefined + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + yield [this._keyMap.get(next.value[0]), next.value[1], next.value[0]]; + next = valueIterator.next(); } } + get size() { + return this._valueMap.size; + } } -exports.OTLPProtoExporterNodeBase = OTLPProtoExporterNodeBase; -//# sourceMappingURL=OTLPProtoExporterNodeBase.js.map +exports.HashMap = HashMap; +class AttributeHashMap extends HashMap { + constructor() { + super(utils_1.hashAttributes); + } +} +exports.AttributeHashMap = AttributeHashMap; +//# sourceMappingURL=HashMap.js.map /***/ }), -/***/ 61216: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 30898: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60163,28 +61684,45 @@ exports.OTLPProtoExporterNodeBase = OTLPProtoExporterNodeBase; * See the License for the specific language governing permissions and * limitations under the License. */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPProtoExporterNodeBase = void 0; -var OTLPProtoExporterNodeBase_1 = __nccwpck_require__(83496); -Object.defineProperty(exports, "OTLPProtoExporterNodeBase", ({ enumerable: true, get: function () { return OTLPProtoExporterNodeBase_1.OTLPProtoExporterNodeBase; } })); -__exportStar(__nccwpck_require__(26244), exports); -__exportStar(__nccwpck_require__(64690), exports); -//# sourceMappingURL=index.js.map +exports.MeterProviderSharedState = void 0; +const utils_1 = __nccwpck_require__(89158); +const ViewRegistry_1 = __nccwpck_require__(6379); +const MeterSharedState_1 = __nccwpck_require__(14881); +/** + * An internal record for shared meter provider states. + */ +class MeterProviderSharedState { + constructor(resource) { + this.resource = resource; + this.viewRegistry = new ViewRegistry_1.ViewRegistry(); + this.metricCollectors = []; + this.meterSharedStates = new Map(); + } + getMeterSharedState(instrumentationScope) { + const id = (0, utils_1.instrumentationScopeId)(instrumentationScope); + let meterSharedState = this.meterSharedStates.get(id); + if (meterSharedState == null) { + meterSharedState = new MeterSharedState_1.MeterSharedState(this, instrumentationScope); + this.meterSharedStates.set(id, meterSharedState); + } + return meterSharedState; + } + selectAggregations(instrumentType) { + const result = []; + for (const collector of this.metricCollectors) { + result.push([collector, collector.selectAggregation(instrumentType)]); + } + return result; + } +} +exports.MeterProviderSharedState = MeterProviderSharedState; +//# sourceMappingURL=MeterProviderSharedState.js.map /***/ }), -/***/ 26244: -/***/ ((__unused_webpack_module, exports) => { +/***/ 14881: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60199,22 +61737,114 @@ __exportStar(__nccwpck_require__(64690), exports); * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ServiceClientType = void 0; -var ServiceClientType; -(function (ServiceClientType) { - ServiceClientType[ServiceClientType["SPANS"] = 0] = "SPANS"; - ServiceClientType[ServiceClientType["METRICS"] = 1] = "METRICS"; -})(ServiceClientType = exports.ServiceClientType || (exports.ServiceClientType = {})); -//# sourceMappingURL=types.js.map + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MeterSharedState = void 0; +const InstrumentDescriptor_1 = __nccwpck_require__(42671); +const Meter_1 = __nccwpck_require__(45894); +const utils_1 = __nccwpck_require__(89158); +const AsyncMetricStorage_1 = __nccwpck_require__(12745); +const MetricStorageRegistry_1 = __nccwpck_require__(72749); +const MultiWritableMetricStorage_1 = __nccwpck_require__(73250); +const ObservableRegistry_1 = __nccwpck_require__(99043); +const SyncMetricStorage_1 = __nccwpck_require__(72766); +const AttributesProcessor_1 = __nccwpck_require__(31952); +/** + * An internal record for shared meter provider states. + */ +class MeterSharedState { + constructor(_meterProviderSharedState, _instrumentationScope) { + this._meterProviderSharedState = _meterProviderSharedState; + this._instrumentationScope = _instrumentationScope; + this.metricStorageRegistry = new MetricStorageRegistry_1.MetricStorageRegistry(); + this.observableRegistry = new ObservableRegistry_1.ObservableRegistry(); + this.meter = new Meter_1.Meter(this); + } + registerMetricStorage(descriptor) { + const storages = this._registerMetricStorage(descriptor, SyncMetricStorage_1.SyncMetricStorage); + if (storages.length === 1) { + return storages[0]; + } + return new MultiWritableMetricStorage_1.MultiMetricStorage(storages); + } + registerAsyncMetricStorage(descriptor) { + const storages = this._registerMetricStorage(descriptor, AsyncMetricStorage_1.AsyncMetricStorage); + return storages; + } + /** + * @param collector opaque handle of {@link MetricCollector} which initiated the collection. + * @param collectionTime the HrTime at which the collection was initiated. + * @param options options for collection. + * @returns the list of metric data collected. + */ + async collect(collector, collectionTime, options) { + /** + * 1. Call all observable callbacks first. + * 2. Collect metric result for the collector. + */ + const errors = await this.observableRegistry.observe(collectionTime, options === null || options === void 0 ? void 0 : options.timeoutMillis); + const storages = this.metricStorageRegistry.getStorages(collector); + // prevent more allocations if there are no storages. + if (storages.length === 0) { + return null; + } + const metricDataList = storages + .map(metricStorage => { + return metricStorage.collect(collector, collectionTime); + }) + .filter(utils_1.isNotNullish); + // skip this scope if no data was collected (storage created, but no data observed) + if (metricDataList.length === 0) { + return { errors }; + } + return { + scopeMetrics: { + scope: this._instrumentationScope, + metrics: metricDataList, + }, + errors, + }; + } + _registerMetricStorage(descriptor, MetricStorageType) { + const views = this._meterProviderSharedState.viewRegistry.findViews(descriptor, this._instrumentationScope); + let storages = views.map(view => { + const viewDescriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptorWithView)(view, descriptor); + const compatibleStorage = this.metricStorageRegistry.findOrUpdateCompatibleStorage(viewDescriptor); + if (compatibleStorage != null) { + return compatibleStorage; + } + const aggregator = view.aggregation.createAggregator(viewDescriptor); + const viewStorage = new MetricStorageType(viewDescriptor, aggregator, view.attributesProcessor, this._meterProviderSharedState.metricCollectors); + this.metricStorageRegistry.register(viewStorage); + return viewStorage; + }); + // Fallback to the per-collector aggregations if no view is configured for the instrument. + if (storages.length === 0) { + const perCollectorAggregations = this._meterProviderSharedState.selectAggregations(descriptor.type); + const collectorStorages = perCollectorAggregations.map(([collector, aggregation]) => { + const compatibleStorage = this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(collector, descriptor); + if (compatibleStorage != null) { + return compatibleStorage; + } + const aggregator = aggregation.createAggregator(descriptor); + const storage = new MetricStorageType(descriptor, aggregator, AttributesProcessor_1.AttributesProcessor.Noop(), [collector]); + this.metricStorageRegistry.registerForCollector(collector, storage); + return storage; + }); + storages = storages.concat(collectorStorages); + } + return storages; + } +} +exports.MeterSharedState = MeterSharedState; +//# sourceMappingURL=MeterSharedState.js.map /***/ }), -/***/ 64690: +/***/ 20142: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60235,62 +61865,67 @@ var ServiceClientType; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.send = exports.onInit = exports.getExportRequestProto = void 0; -const path = __nccwpck_require__(71017); -const types_1 = __nccwpck_require__(26244); -const protobufjs = __nccwpck_require__(85881); -const otlp_exporter_base_1 = __nccwpck_require__(11363); -let ExportRequestProto; -function getExportRequestProto() { - return ExportRequestProto; -} -exports.getExportRequestProto = getExportRequestProto; -function onInit(collector, _config) { - const dir = __nccwpck_require__.ab + "protos1"; - const root = new protobufjs.Root(); - root.resolvePath = function (origin, target) { - return __nccwpck_require__.ab + "protos1/" + target; - }; - if (collector.getServiceClientType() === types_1.ServiceClientType.SPANS) { - const proto = root.loadSync([ - 'opentelemetry/proto/common/v1/common.proto', - 'opentelemetry/proto/resource/v1/resource.proto', - 'opentelemetry/proto/trace/v1/trace.proto', - 'opentelemetry/proto/collector/trace/v1/trace_service.proto', - ]); - ExportRequestProto = proto === null || proto === void 0 ? void 0 : proto.lookupType('ExportTraceServiceRequest'); +exports.MetricCollector = void 0; +const core_1 = __nccwpck_require__(89736); +/** + * An internal opaque interface that the MetricReader receives as + * MetricProducer. It acts as the storage key to the internal metric stream + * state for each MetricReader. + */ +class MetricCollector { + constructor(_sharedState, _metricReader) { + this._sharedState = _sharedState; + this._metricReader = _metricReader; + } + async collect(options) { + const collectionTime = (0, core_1.millisToHrTime)(Date.now()); + const scopeMetrics = []; + const errors = []; + const meterCollectionPromises = Array.from(this._sharedState.meterSharedStates.values()).map(async (meterSharedState) => { + const current = await meterSharedState.collect(this, collectionTime, options); + // only add scope metrics if available + if ((current === null || current === void 0 ? void 0 : current.scopeMetrics) != null) { + scopeMetrics.push(current.scopeMetrics); + } + // only add errors if available + if ((current === null || current === void 0 ? void 0 : current.errors) != null) { + errors.push(...current.errors); + } + }); + await Promise.all(meterCollectionPromises); + return { + resourceMetrics: { + resource: this._sharedState.resource, + scopeMetrics: scopeMetrics, + }, + errors: errors, + }; } - else { - const proto = root.loadSync([ - 'opentelemetry/proto/common/v1/common.proto', - 'opentelemetry/proto/resource/v1/resource.proto', - 'opentelemetry/proto/metrics/v1/metrics.proto', - 'opentelemetry/proto/collector/metrics/v1/metrics_service.proto', - ]); - ExportRequestProto = proto === null || proto === void 0 ? void 0 : proto.lookupType('ExportMetricsServiceRequest'); + /** + * Delegates for MetricReader.forceFlush. + */ + async forceFlush(options) { + await this._metricReader.forceFlush(options); } -} -exports.onInit = onInit; -function send(collector, objects, compression, onSuccess, onError) { - var _a, _b; - const serviceRequest = collector.convert(objects); - const message = (_a = getExportRequestProto()) === null || _a === void 0 ? void 0 : _a.create(serviceRequest); - if (message) { - const body = (_b = getExportRequestProto()) === null || _b === void 0 ? void 0 : _b.encode(message).finish(); - if (body) { - (0, otlp_exporter_base_1.sendWithHttp)(collector, Buffer.from(body), 'application/x-protobuf', onSuccess, onError); - } + /** + * Delegates for MetricReader.shutdown. + */ + async shutdown(options) { + await this._metricReader.shutdown(options); } - else { - onError(new otlp_exporter_base_1.OTLPExporterError('No proto')); + selectAggregationTemporality(instrumentType) { + return this._metricReader.selectAggregationTemporality(instrumentType); + } + selectAggregation(instrumentType) { + return this._metricReader.selectAggregation(instrumentType); } } -exports.send = send; -//# sourceMappingURL=util.js.map +exports.MetricCollector = MetricCollector; +//# sourceMappingURL=MetricCollector.js.map /***/ }), -/***/ 72723: +/***/ 33134: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60311,65 +61946,36 @@ exports.send = send; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Resource = void 0; -const semantic_conventions_1 = __nccwpck_require__(67275); -const core_1 = __nccwpck_require__(89736); -const platform_1 = __nccwpck_require__(7784); +exports.MetricStorage = void 0; +const InstrumentDescriptor_1 = __nccwpck_require__(42671); /** - * A Resource describes the entity for which a signals (metrics or trace) are - * collected. + * Internal interface. + * + * Represents a storage from which we can collect metrics. */ -class Resource { - constructor( - /** - * A dictionary of attributes with string keys and values that provide - * information about the entity as numbers, strings or booleans - * TODO: Consider to add check/validation on attributes. - */ - attributes) { - this.attributes = attributes; +class MetricStorage { + constructor(_instrumentDescriptor) { + this._instrumentDescriptor = _instrumentDescriptor; } - /** - * Returns an empty Resource - */ - static empty() { - return Resource.EMPTY; + getInstrumentDescriptor() { + return this._instrumentDescriptor; } - /** - * Returns a Resource that indentifies the SDK in use. - */ - static default() { - return new Resource({ - [semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: (0, platform_1.defaultServiceName)(), - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: core_1.SDK_INFO[semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE], - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: core_1.SDK_INFO[semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME], - [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: core_1.SDK_INFO[semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION], + updateDescription(description) { + this._instrumentDescriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(this._instrumentDescriptor.name, this._instrumentDescriptor.type, { + description: description, + valueType: this._instrumentDescriptor.valueType, + unit: this._instrumentDescriptor.unit, + advice: this._instrumentDescriptor.advice, }); } - /** - * Returns a new, merged {@link Resource} by merging the current Resource - * with the other Resource. In case of a collision, other Resource takes - * precedence. - * - * @param other the Resource that will be merged with this. - * @returns the newly merged Resource. - */ - merge(other) { - if (!other || !Object.keys(other.attributes).length) - return this; - // SpanAttributes from resource overwrite attributes from other resource. - const mergedAttributes = Object.assign({}, this.attributes, other.attributes); - return new Resource(mergedAttributes); - } } -exports.Resource = Resource; -Resource.EMPTY = new Resource({}); -//# sourceMappingURL=Resource.js.map +exports.MetricStorage = MetricStorage; +//# sourceMappingURL=MetricStorage.js.map /***/ }), -/***/ 61565: -/***/ ((__unused_webpack_module, exports) => { +/***/ 72749: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60389,12 +61995,108 @@ Resource.EMPTY = new Resource({}); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=config.js.map +exports.MetricStorageRegistry = void 0; +const InstrumentDescriptor_1 = __nccwpck_require__(42671); +const api = __nccwpck_require__(65163); +const RegistrationConflicts_1 = __nccwpck_require__(76212); +/** + * Internal class for storing {@link MetricStorage} + */ +class MetricStorageRegistry { + constructor() { + this._sharedRegistry = new Map(); + this._perCollectorRegistry = new Map(); + } + static create() { + return new MetricStorageRegistry(); + } + getStorages(collector) { + let storages = []; + for (const metricStorages of this._sharedRegistry.values()) { + storages = storages.concat(metricStorages); + } + const perCollectorStorages = this._perCollectorRegistry.get(collector); + if (perCollectorStorages != null) { + for (const metricStorages of perCollectorStorages.values()) { + storages = storages.concat(metricStorages); + } + } + return storages; + } + register(storage) { + this._registerStorage(storage, this._sharedRegistry); + } + registerForCollector(collector, storage) { + let storageMap = this._perCollectorRegistry.get(collector); + if (storageMap == null) { + storageMap = new Map(); + this._perCollectorRegistry.set(collector, storageMap); + } + this._registerStorage(storage, storageMap); + } + findOrUpdateCompatibleStorage(expectedDescriptor) { + const storages = this._sharedRegistry.get(expectedDescriptor.name); + if (storages === undefined) { + return null; + } + // If the descriptor is compatible, the type of their metric storage + // (either SyncMetricStorage or AsyncMetricStorage) must be compatible. + return this._findOrUpdateCompatibleStorage(expectedDescriptor, storages); + } + findOrUpdateCompatibleCollectorStorage(collector, expectedDescriptor) { + const storageMap = this._perCollectorRegistry.get(collector); + if (storageMap === undefined) { + return null; + } + const storages = storageMap.get(expectedDescriptor.name); + if (storages === undefined) { + return null; + } + // If the descriptor is compatible, the type of their metric storage + // (either SyncMetricStorage or AsyncMetricStorage) must be compatible. + return this._findOrUpdateCompatibleStorage(expectedDescriptor, storages); + } + _registerStorage(storage, storageMap) { + const descriptor = storage.getInstrumentDescriptor(); + const storages = storageMap.get(descriptor.name); + if (storages === undefined) { + storageMap.set(descriptor.name, [storage]); + return; + } + storages.push(storage); + } + _findOrUpdateCompatibleStorage(expectedDescriptor, existingStorages) { + let compatibleStorage = null; + for (const existingStorage of existingStorages) { + const existingDescriptor = existingStorage.getInstrumentDescriptor(); + if ((0, InstrumentDescriptor_1.isDescriptorCompatibleWith)(existingDescriptor, expectedDescriptor)) { + // Use the longer description if it does not match. + if (existingDescriptor.description !== expectedDescriptor.description) { + if (expectedDescriptor.description.length > + existingDescriptor.description.length) { + existingStorage.updateDescription(expectedDescriptor.description); + } + api.diag.warn('A view or instrument with the name ', expectedDescriptor.name, ' has already been registered, but has a different description and is incompatible with another registered view.\n', 'Details:\n', (0, RegistrationConflicts_1.getIncompatibilityDetails)(existingDescriptor, expectedDescriptor), 'The longer description will be used.\nTo resolve the conflict:', (0, RegistrationConflicts_1.getConflictResolutionRecipe)(existingDescriptor, expectedDescriptor)); + } + // Storage is fully compatible. There will never be more than one pre-existing fully compatible storage. + compatibleStorage = existingStorage; + } + else { + // The implementation SHOULD warn about duplicate instrument registration + // conflicts after applying View configuration. + api.diag.warn('A view or instrument with the name ', expectedDescriptor.name, ' has already been registered and is incompatible with another registered view.\n', 'Details:\n', (0, RegistrationConflicts_1.getIncompatibilityDetails)(existingDescriptor, expectedDescriptor), 'To resolve the conflict:\n', (0, RegistrationConflicts_1.getConflictResolutionRecipe)(existingDescriptor, expectedDescriptor)); + } + } + return compatibleStorage; + } +} +exports.MetricStorageRegistry = MetricStorageRegistry; +//# sourceMappingURL=MetricStorageRegistry.js.map /***/ }), -/***/ 15969: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 73250: +/***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -60414,49 +62116,26 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.browserDetector = void 0; -const api_1 = __nccwpck_require__(65163); -const semantic_conventions_1 = __nccwpck_require__(67275); -const __1 = __nccwpck_require__(3871); +exports.MultiMetricStorage = void 0; /** - * BrowserDetector will be used to detect the resources related to browser. + * Internal interface. */ -class BrowserDetector { - async detect(config) { - const isBrowser = typeof navigator !== 'undefined'; - if (!isBrowser) { - return __1.Resource.empty(); - } - const browserResource = { - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent - }; - return this._getResourceAttributes(browserResource, config); +class MultiMetricStorage { + constructor(_backingStorages) { + this._backingStorages = _backingStorages; } - /** - * Validates process resource attribute map from process variables - * - * @param browserResource The un-sanitized resource attributes from process as key/value pairs. - * @param config: Config - * @returns The sanitized resource attributes. - */ - _getResourceAttributes(browserResource, _config) { - if (browserResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === '') { - api_1.diag.debug('BrowserDetector failed: Unable to find required browser resources. '); - return __1.Resource.empty(); - } - else { - return new __1.Resource(Object.assign({}, browserResource)); - } + record(value, attributes, context, recordTime) { + this._backingStorages.forEach(it => { + it.record(value, attributes, context, recordTime); + }); } } -exports.browserDetector = new BrowserDetector(); -//# sourceMappingURL=BrowserDetector.js.map +exports.MultiMetricStorage = MultiMetricStorage; +//# sourceMappingURL=MultiWritableMetricStorage.js.map /***/ }), -/***/ 22474: +/***/ 99043: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60477,130 +62156,123 @@ exports.browserDetector = new BrowserDetector(); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.envDetector = void 0; +exports.ObservableRegistry = void 0; const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const semantic_conventions_1 = __nccwpck_require__(67275); -const Resource_1 = __nccwpck_require__(72723); +const Instruments_1 = __nccwpck_require__(20667); +const ObservableResult_1 = __nccwpck_require__(80183); +const utils_1 = __nccwpck_require__(89158); /** - * EnvDetector can be used to detect the presence of and create a Resource - * from the OTEL_RESOURCE_ATTRIBUTES environment variable. + * An internal interface for managing ObservableCallbacks. + * + * Every registered callback associated with a set of instruments are be evaluated + * exactly once during collection prior to reading data for that instrument. */ -class EnvDetector { +class ObservableRegistry { constructor() { - // Type, attribute keys, and attribute values should not exceed 256 characters. - this._MAX_LENGTH = 255; - // OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of attributes. - this._COMMA_SEPARATOR = ','; - // OTEL_RESOURCE_ATTRIBUTES contains key value pair separated by '='. - this._LABEL_KEY_VALUE_SPLITTER = '='; - this._ERROR_MESSAGE_INVALID_CHARS = 'should be a ASCII string with a length greater than 0 and not exceed ' + - this._MAX_LENGTH + - ' characters.'; - this._ERROR_MESSAGE_INVALID_VALUE = 'should be a ASCII string with a length not exceed ' + - this._MAX_LENGTH + - ' characters.'; + this._callbacks = []; + this._batchCallbacks = []; } - /** - * Returns a {@link Resource} populated with attributes from the - * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async - * function to conform to the Detector interface. - * - * @param config The resource detection config - */ - async detect(_config) { - const attributes = {}; - const env = (0, core_1.getEnv)(); - const rawAttributes = env.OTEL_RESOURCE_ATTRIBUTES; - const serviceName = env.OTEL_SERVICE_NAME; - if (rawAttributes) { - try { - const parsedAttributes = this._parseResourceAttributes(rawAttributes); - Object.assign(attributes, parsedAttributes); - } - catch (e) { - api_1.diag.debug(`EnvDetector failed: ${e.message}`); - } - } - if (serviceName) { - attributes[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME] = serviceName; + addCallback(callback, instrument) { + const idx = this._findCallback(callback, instrument); + if (idx >= 0) { + return; } - return new Resource_1.Resource(attributes); + this._callbacks.push({ callback, instrument }); } - /** - * Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment - * variable. - * - * OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes describing - * the source in more detail, e.g. “key1=val1,key2=val2”. Domain names and - * paths are accepted as attribute keys. Values may be quoted or unquoted in - * general. If a value contains whitespaces, =, or " characters, it must - * always be quoted. - * - * @param rawEnvAttributes The resource attributes as a comma-seperated list - * of key/value pairs. - * @returns The sanitized resource attributes. - */ - _parseResourceAttributes(rawEnvAttributes) { - if (!rawEnvAttributes) - return {}; - const attributes = {}; - const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR, -1); - for (const rawAttribute of rawAttributes) { - const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER, -1); - if (keyValuePair.length !== 2) { - continue; - } - let [key, value] = keyValuePair; - // Leading and trailing whitespaces are trimmed. - key = key.trim(); - value = value.trim().split('^"|"$').join(''); - if (!this._isValidAndNotEmpty(key)) { - throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`); - } - if (!this._isValid(value)) { - throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`); - } - attributes[key] = value; + removeCallback(callback, instrument) { + const idx = this._findCallback(callback, instrument); + if (idx < 0) { + return; } - return attributes; + this._callbacks.splice(idx, 1); } - /** - * Determines whether the given String is a valid printable ASCII string with - * a length not exceed _MAX_LENGTH characters. - * - * @param str The String to be validated. - * @returns Whether the String is valid. - */ - _isValid(name) { - return name.length <= this._MAX_LENGTH && this._isPrintableString(name); + addBatchCallback(callback, instruments) { + // Create a set of unique instruments. + const observableInstruments = new Set(instruments.filter(Instruments_1.isObservableInstrument)); + if (observableInstruments.size === 0) { + api_1.diag.error('BatchObservableCallback is not associated with valid instruments', instruments); + return; + } + const idx = this._findBatchCallback(callback, observableInstruments); + if (idx >= 0) { + return; + } + this._batchCallbacks.push({ callback, instruments: observableInstruments }); } - _isPrintableString(str) { - for (let i = 0; i < str.length; i++) { - const ch = str.charAt(i); - if (ch <= ' ' || ch >= '~') { - return false; - } + removeBatchCallback(callback, instruments) { + // Create a set of unique instruments. + const observableInstruments = new Set(instruments.filter(Instruments_1.isObservableInstrument)); + const idx = this._findBatchCallback(callback, observableInstruments); + if (idx < 0) { + return; } - return true; + this._batchCallbacks.splice(idx, 1); } /** - * Determines whether the given String is a valid printable ASCII string with - * a length greater than 0 and not exceed _MAX_LENGTH characters. - * - * @param str The String to be validated. - * @returns Whether the String is valid and not empty. + * @returns a promise of rejected reasons for invoking callbacks. */ - _isValidAndNotEmpty(str) { - return str.length > 0 && this._isValid(str); + async observe(collectionTime, timeoutMillis) { + const callbackFutures = this._observeCallbacks(collectionTime, timeoutMillis); + const batchCallbackFutures = this._observeBatchCallbacks(collectionTime, timeoutMillis); + const results = await (0, utils_1.PromiseAllSettled)([ + ...callbackFutures, + ...batchCallbackFutures, + ]); + const rejections = results + .filter(utils_1.isPromiseAllSettledRejectionResult) + .map(it => it.reason); + return rejections; + } + _observeCallbacks(observationTime, timeoutMillis) { + return this._callbacks.map(async ({ callback, instrument }) => { + const observableResult = new ObservableResult_1.ObservableResultImpl(instrument._descriptor.name, instrument._descriptor.valueType); + let callPromise = Promise.resolve(callback(observableResult)); + if (timeoutMillis != null) { + callPromise = (0, utils_1.callWithTimeout)(callPromise, timeoutMillis); + } + await callPromise; + instrument._metricStorages.forEach(metricStorage => { + metricStorage.record(observableResult._buffer, observationTime); + }); + }); + } + _observeBatchCallbacks(observationTime, timeoutMillis) { + return this._batchCallbacks.map(async ({ callback, instruments }) => { + const observableResult = new ObservableResult_1.BatchObservableResultImpl(); + let callPromise = Promise.resolve(callback(observableResult)); + if (timeoutMillis != null) { + callPromise = (0, utils_1.callWithTimeout)(callPromise, timeoutMillis); + } + await callPromise; + instruments.forEach(instrument => { + const buffer = observableResult._buffer.get(instrument); + if (buffer == null) { + return; + } + instrument._metricStorages.forEach(metricStorage => { + metricStorage.record(buffer, observationTime); + }); + }); + }); + } + _findCallback(callback, instrument) { + return this._callbacks.findIndex(record => { + return record.callback === callback && record.instrument === instrument; + }); + } + _findBatchCallback(callback, instruments) { + return this._batchCallbacks.findIndex(record => { + return (record.callback === callback && + (0, utils_1.setEquals)(record.instruments, instruments)); + }); } } -exports.envDetector = new EnvDetector(); -//# sourceMappingURL=EnvDetector.js.map +exports.ObservableRegistry = ObservableRegistry; +//# sourceMappingURL=ObservableRegistry.js.map /***/ }), -/***/ 75267: +/***/ 72766: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60621,61 +62293,44 @@ exports.envDetector = new EnvDetector(); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.processDetector = void 0; -const api_1 = __nccwpck_require__(65163); -const semantic_conventions_1 = __nccwpck_require__(67275); -const Resource_1 = __nccwpck_require__(72723); +exports.SyncMetricStorage = void 0; +const MetricStorage_1 = __nccwpck_require__(33134); +const DeltaMetricProcessor_1 = __nccwpck_require__(21904); +const TemporalMetricProcessor_1 = __nccwpck_require__(22566); /** - * ProcessDetector will be used to detect the resources related current process running - * and being instrumented from the NodeJS Process module. + * Internal interface. + * + * Stores and aggregates {@link MetricData} for synchronous instruments. */ -class ProcessDetector { - async detect(config) { - // Skip if not in Node.js environment. - if (typeof process !== 'object') { - return Resource_1.Resource.empty(); - } - const processResource = { - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_PID]: process.pid, - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title || '', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND]: process.argv[1] || '', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND_LINE]: process.argv.join(' ') || '', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: process.versions.node, - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs', - [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js', - }; - return this._getResourceAttributes(processResource, config); +class SyncMetricStorage extends MetricStorage_1.MetricStorage { + constructor(instrumentDescriptor, aggregator, _attributesProcessor, collectorHandles) { + super(instrumentDescriptor); + this._attributesProcessor = _attributesProcessor; + this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator); + this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles); + } + record(value, attributes, context, recordTime) { + attributes = this._attributesProcessor.process(attributes, context); + this._deltaMetricStorage.record(value, attributes, context, recordTime); } /** - * Validates process resource attribute map from process varaibls + * Collects the metrics from this storage. * - * @param processResource The unsantized resource attributes from process as key/value pairs. - * @param config: Config - * @returns The sanitized resource attributes. + * Note: This is a stateful operation and may reset any interval-related + * state for the MetricCollector. */ - _getResourceAttributes(processResource, _config) { - if (processResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME] === - '' || - processResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH] === - '' || - processResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND] === '' || - processResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND_LINE] === '' || - processResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === '') { - api_1.diag.debug('ProcessDetector failed: Unable to find required process resources. '); - return Resource_1.Resource.empty(); - } - else { - return new Resource_1.Resource(Object.assign({}, processResource)); - } + collect(collector, collectionTime) { + const accumulations = this._deltaMetricStorage.collect(); + return this._temporalMetricStorage.buildMetrics(collector, this._instrumentDescriptor, accumulations, collectionTime); } } -exports.processDetector = new ProcessDetector(); -//# sourceMappingURL=ProcessDetector.js.map +exports.SyncMetricStorage = SyncMetricStorage; +//# sourceMappingURL=SyncMetricStorage.js.map /***/ }), -/***/ 24918: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 22566: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60694,26 +62349,150 @@ exports.processDetector = new ProcessDetector(); * See the License for the specific language governing permissions and * limitations under the License. */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(15969), exports); -__exportStar(__nccwpck_require__(22474), exports); -__exportStar(__nccwpck_require__(75267), exports); -//# sourceMappingURL=index.js.map +exports.TemporalMetricProcessor = void 0; +const AggregationTemporality_1 = __nccwpck_require__(28589); +const HashMap_1 = __nccwpck_require__(99909); +/** + * Internal interface. + * + * Provides unique reporting for each collector. Allows synchronous collection + * of metrics and reports given temporality values. + */ +class TemporalMetricProcessor { + constructor(_aggregator, collectorHandles) { + this._aggregator = _aggregator; + this._unreportedAccumulations = new Map(); + this._reportHistory = new Map(); + collectorHandles.forEach(handle => { + this._unreportedAccumulations.set(handle, []); + }); + } + /** + * Builds the {@link MetricData} streams to report against a specific MetricCollector. + * @param collector The information of the MetricCollector. + * @param collectors The registered collectors. + * @param instrumentDescriptor The instrumentation descriptor that these metrics generated with. + * @param currentAccumulations The current accumulation of metric data from instruments. + * @param collectionTime The current collection timestamp. + * @returns The {@link MetricData} points or `null`. + */ + buildMetrics(collector, instrumentDescriptor, currentAccumulations, collectionTime) { + this._stashAccumulations(currentAccumulations); + const unreportedAccumulations = this._getMergedUnreportedAccumulations(collector); + let result = unreportedAccumulations; + let aggregationTemporality; + // Check our last report time. + if (this._reportHistory.has(collector)) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const last = this._reportHistory.get(collector); + const lastCollectionTime = last.collectionTime; + aggregationTemporality = last.aggregationTemporality; + // Use aggregation temporality + instrument to determine if we do a merge or a diff of + // previous. We have the following four scenarios: + // 1. Cumulative Aggregation (temporality) + Delta recording (sync instrument). + // Here we merge with our last record to get a cumulative aggregation. + // 2. Cumulative Aggregation + Cumulative recording (async instrument). + // Cumulative records are converted to delta recording with DeltaMetricProcessor. + // Here we merge with our last record to get a cumulative aggregation. + // 3. Delta Aggregation + Delta recording + // Calibrate the startTime of metric streams to be the reader's lastCollectionTime. + // 4. Delta Aggregation + Cumulative recording. + // Cumulative records are converted to delta recording with DeltaMetricProcessor. + // Calibrate the startTime of metric streams to be the reader's lastCollectionTime. + if (aggregationTemporality === AggregationTemporality_1.AggregationTemporality.CUMULATIVE) { + // We need to make sure the current delta recording gets merged into the previous cumulative + // for the next cumulative recording. + result = TemporalMetricProcessor.merge(last.accumulations, unreportedAccumulations, this._aggregator); + } + else { + result = TemporalMetricProcessor.calibrateStartTime(last.accumulations, unreportedAccumulations, lastCollectionTime); + } + } + else { + // Call into user code to select aggregation temporality for the instrument. + aggregationTemporality = collector.selectAggregationTemporality(instrumentDescriptor.type); + } + // Update last reported (cumulative) accumulation. + this._reportHistory.set(collector, { + accumulations: result, + collectionTime, + aggregationTemporality, + }); + const accumulationRecords = AttributesMapToAccumulationRecords(result); + // do not convert to metric data if there is nothing to convert. + if (accumulationRecords.length === 0) { + return undefined; + } + return this._aggregator.toMetricData(instrumentDescriptor, aggregationTemporality, accumulationRecords, + /* endTime */ collectionTime); + } + _stashAccumulations(currentAccumulation) { + const registeredCollectors = this._unreportedAccumulations.keys(); + for (const collector of registeredCollectors) { + let stash = this._unreportedAccumulations.get(collector); + if (stash === undefined) { + stash = []; + this._unreportedAccumulations.set(collector, stash); + } + stash.push(currentAccumulation); + } + } + _getMergedUnreportedAccumulations(collector) { + let result = new HashMap_1.AttributeHashMap(); + const unreportedList = this._unreportedAccumulations.get(collector); + this._unreportedAccumulations.set(collector, []); + if (unreportedList === undefined) { + return result; + } + for (const it of unreportedList) { + result = TemporalMetricProcessor.merge(result, it, this._aggregator); + } + return result; + } + static merge(last, current, aggregator) { + const result = last; + const iterator = current.entries(); + let next = iterator.next(); + while (next.done !== true) { + const [key, record, hash] = next.value; + if (last.has(key, hash)) { + const lastAccumulation = last.get(key, hash); + // last.has() returned true, lastAccumulation is present. + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const accumulation = aggregator.merge(lastAccumulation, record); + result.set(key, accumulation, hash); + } + else { + result.set(key, record, hash); + } + next = iterator.next(); + } + return result; + } + /** + * Calibrate the reported metric streams' startTime to lastCollectionTime. Leaves + * the new stream to be the initial observation time unchanged. + */ + static calibrateStartTime(last, current, lastCollectionTime) { + for (const [key, hash] of last.keys()) { + const currentAccumulation = current.get(key, hash); + currentAccumulation === null || currentAccumulation === void 0 ? void 0 : currentAccumulation.setStartTime(lastCollectionTime); + } + return current; + } +} +exports.TemporalMetricProcessor = TemporalMetricProcessor; +// TypeScript complains about converting 3 elements tuple to AccumulationRecord. +function AttributesMapToAccumulationRecords(map) { + return Array.from(map.entries()); +} +//# sourceMappingURL=TemporalMetricProcessor.js.map /***/ }), -/***/ 3871: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 89158: +/***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -60732,28 +62511,156 @@ __exportStar(__nccwpck_require__(75267), exports); * See the License for the specific language governing permissions and * limitations under the License. */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(72723), exports); -__exportStar(__nccwpck_require__(7784), exports); -__exportStar(__nccwpck_require__(29566), exports); -__exportStar(__nccwpck_require__(61565), exports); -__exportStar(__nccwpck_require__(24918), exports); -//# sourceMappingURL=index.js.map +exports.equalsCaseInsensitive = exports.binarySearchLB = exports.setEquals = exports.FlatMap = exports.isPromiseAllSettledRejectionResult = exports.PromiseAllSettled = exports.callWithTimeout = exports.TimeoutError = exports.instrumentationScopeId = exports.hashAttributes = exports.isNotNullish = void 0; +function isNotNullish(item) { + return item !== undefined && item !== null; +} +exports.isNotNullish = isNotNullish; +/** + * Converting the unordered attributes into unique identifier string. + * @param attributes user provided unordered MetricAttributes. + */ +function hashAttributes(attributes) { + let keys = Object.keys(attributes); + if (keys.length === 0) + return ''; + // Return a string that is stable on key orders. + keys = keys.sort(); + return JSON.stringify(keys.map(key => [key, attributes[key]])); +} +exports.hashAttributes = hashAttributes; +/** + * Converting the instrumentation scope object to a unique identifier string. + * @param instrumentationScope + */ +function instrumentationScopeId(instrumentationScope) { + var _a, _b; + return `${instrumentationScope.name}:${(_a = instrumentationScope.version) !== null && _a !== void 0 ? _a : ''}:${(_b = instrumentationScope.schemaUrl) !== null && _b !== void 0 ? _b : ''}`; +} +exports.instrumentationScopeId = instrumentationScopeId; +/** + * Error that is thrown on timeouts. + */ +class TimeoutError extends Error { + constructor(message) { + super(message); + // manually adjust prototype to retain `instanceof` functionality when targeting ES5, see: + // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work + Object.setPrototypeOf(this, TimeoutError.prototype); + } +} +exports.TimeoutError = TimeoutError; +/** + * Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise + * rejects, and resolves if the specified promise resolves. + * + *

NOTE: this operation will continue even after it throws a {@link TimeoutError}. + * + * @param promise promise to use with timeout. + * @param timeout the timeout in milliseconds until the returned promise is rejected. + */ +function callWithTimeout(promise, timeout) { + let timeoutHandle; + const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) { + timeoutHandle = setTimeout(function timeoutHandler() { + reject(new TimeoutError('Operation timed out.')); + }, timeout); + }); + return Promise.race([promise, timeoutPromise]).then(result => { + clearTimeout(timeoutHandle); + return result; + }, reason => { + clearTimeout(timeoutHandle); + throw reason; + }); +} +exports.callWithTimeout = callWithTimeout; +/** + * Node.js v12.9 lower and browser compatible `Promise.allSettled`. + */ +async function PromiseAllSettled(promises) { + return Promise.all(promises.map(async (p) => { + try { + const ret = await p; + return { + status: 'fulfilled', + value: ret, + }; + } + catch (e) { + return { + status: 'rejected', + reason: e, + }; + } + })); +} +exports.PromiseAllSettled = PromiseAllSettled; +function isPromiseAllSettledRejectionResult(it) { + return it.status === 'rejected'; +} +exports.isPromiseAllSettledRejectionResult = isPromiseAllSettledRejectionResult; +/** + * Node.js v11.0 lower and browser compatible `Array.prototype.flatMap`. + */ +function FlatMap(arr, fn) { + const result = []; + arr.forEach(it => { + result.push(...fn(it)); + }); + return result; +} +exports.FlatMap = FlatMap; +function setEquals(lhs, rhs) { + if (lhs.size !== rhs.size) { + return false; + } + for (const item of lhs) { + if (!rhs.has(item)) { + return false; + } + } + return true; +} +exports.setEquals = setEquals; +/** + * Binary search the sorted array to the find lower bound for the value. + * @param arr + * @param value + * @returns + */ +function binarySearchLB(arr, value) { + let lo = 0; + let hi = arr.length - 1; + while (hi - lo > 1) { + const mid = Math.trunc((hi + lo) / 2); + if (arr[mid] <= value) { + lo = mid; + } + else { + hi = mid - 1; + } + } + if (arr[hi] <= value) { + return hi; + } + else if (arr[lo] <= value) { + return lo; + } + return -1; +} +exports.binarySearchLB = binarySearchLB; +function equalsCaseInsensitive(lhs, rhs) { + return lhs.toLowerCase() === rhs.toLowerCase(); +} +exports.equalsCaseInsensitive = equalsCaseInsensitive; +//# sourceMappingURL=utils.js.map /***/ }), -/***/ 7784: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 14769: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60772,24 +62679,174 @@ __exportStar(__nccwpck_require__(24918), exports); * See the License for the specific language governing permissions and * limitations under the License. */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(90342), exports); -//# sourceMappingURL=index.js.map +exports.DefaultAggregation = exports.ExponentialHistogramAggregation = exports.ExplicitBucketHistogramAggregation = exports.HistogramAggregation = exports.LastValueAggregation = exports.SumAggregation = exports.DropAggregation = exports.Aggregation = void 0; +const api = __nccwpck_require__(65163); +const aggregator_1 = __nccwpck_require__(85922); +const InstrumentDescriptor_1 = __nccwpck_require__(42671); +/** + * Configures how measurements are combined into metrics for views. + * + * Aggregation provides a set of built-in aggregations via static methods. + */ +class Aggregation { + static Drop() { + return DROP_AGGREGATION; + } + static Sum() { + return SUM_AGGREGATION; + } + static LastValue() { + return LAST_VALUE_AGGREGATION; + } + static Histogram() { + return HISTOGRAM_AGGREGATION; + } + static ExponentialHistogram() { + return EXPONENTIAL_HISTOGRAM_AGGREGATION; + } + static Default() { + return DEFAULT_AGGREGATION; + } +} +exports.Aggregation = Aggregation; +/** + * The default drop aggregation. + */ +class DropAggregation extends Aggregation { + createAggregator(_instrument) { + return DropAggregation.DEFAULT_INSTANCE; + } +} +exports.DropAggregation = DropAggregation; +DropAggregation.DEFAULT_INSTANCE = new aggregator_1.DropAggregator(); +/** + * The default sum aggregation. + */ +class SumAggregation extends Aggregation { + createAggregator(instrument) { + switch (instrument.type) { + case InstrumentDescriptor_1.InstrumentType.COUNTER: + case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_COUNTER: + case InstrumentDescriptor_1.InstrumentType.HISTOGRAM: { + return SumAggregation.MONOTONIC_INSTANCE; + } + default: { + return SumAggregation.NON_MONOTONIC_INSTANCE; + } + } + } +} +exports.SumAggregation = SumAggregation; +SumAggregation.MONOTONIC_INSTANCE = new aggregator_1.SumAggregator(true); +SumAggregation.NON_MONOTONIC_INSTANCE = new aggregator_1.SumAggregator(false); +/** + * The default last value aggregation. + */ +class LastValueAggregation extends Aggregation { + createAggregator(_instrument) { + return LastValueAggregation.DEFAULT_INSTANCE; + } +} +exports.LastValueAggregation = LastValueAggregation; +LastValueAggregation.DEFAULT_INSTANCE = new aggregator_1.LastValueAggregator(); +/** + * The default histogram aggregation. + */ +class HistogramAggregation extends Aggregation { + createAggregator(_instrument) { + return HistogramAggregation.DEFAULT_INSTANCE; + } +} +exports.HistogramAggregation = HistogramAggregation; +HistogramAggregation.DEFAULT_INSTANCE = new aggregator_1.HistogramAggregator([0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000], true); +/** + * The explicit bucket histogram aggregation. + */ +class ExplicitBucketHistogramAggregation extends Aggregation { + /** + * @param boundaries the bucket boundaries of the histogram aggregation + * @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded. + */ + constructor(boundaries, _recordMinMax = true) { + super(); + this._recordMinMax = _recordMinMax; + if (boundaries == null) { + throw new Error('ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array'); + } + // Copy the boundaries array for modification. + boundaries = boundaries.concat(); + // We need to an ordered set to be able to correctly compute count for each + // boundary since we'll iterate on each in order. + boundaries = boundaries.sort((a, b) => a - b); + // Remove all Infinity from the boundaries. + const minusInfinityIndex = boundaries.lastIndexOf(-Infinity); + let infinityIndex = boundaries.indexOf(Infinity); + if (infinityIndex === -1) { + infinityIndex = undefined; + } + this._boundaries = boundaries.slice(minusInfinityIndex + 1, infinityIndex); + } + createAggregator(_instrument) { + return new aggregator_1.HistogramAggregator(this._boundaries, this._recordMinMax); + } +} +exports.ExplicitBucketHistogramAggregation = ExplicitBucketHistogramAggregation; +class ExponentialHistogramAggregation extends Aggregation { + constructor(_maxSize = 160, _recordMinMax = true) { + super(); + this._maxSize = _maxSize; + this._recordMinMax = _recordMinMax; + } + createAggregator(_instrument) { + return new aggregator_1.ExponentialHistogramAggregator(this._maxSize, this._recordMinMax); + } +} +exports.ExponentialHistogramAggregation = ExponentialHistogramAggregation; +/** + * The default aggregation. + */ +class DefaultAggregation extends Aggregation { + _resolve(instrument) { + // cast to unknown to disable complaints on the (unreachable) fallback. + switch (instrument.type) { + case InstrumentDescriptor_1.InstrumentType.COUNTER: + case InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER: + case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_COUNTER: + case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER: { + return SUM_AGGREGATION; + } + case InstrumentDescriptor_1.InstrumentType.GAUGE: + case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE: { + return LAST_VALUE_AGGREGATION; + } + case InstrumentDescriptor_1.InstrumentType.HISTOGRAM: { + if (instrument.advice.explicitBucketBoundaries) { + return new ExplicitBucketHistogramAggregation(instrument.advice.explicitBucketBoundaries); + } + return HISTOGRAM_AGGREGATION; + } + } + api.diag.warn(`Unable to recognize instrument type: ${instrument.type}`); + return DROP_AGGREGATION; + } + createAggregator(instrument) { + return this._resolve(instrument).createAggregator(instrument); + } +} +exports.DefaultAggregation = DefaultAggregation; +const DROP_AGGREGATION = new DropAggregation(); +const SUM_AGGREGATION = new SumAggregation(); +const LAST_VALUE_AGGREGATION = new LastValueAggregation(); +const HISTOGRAM_AGGREGATION = new HistogramAggregation(); +const EXPONENTIAL_HISTOGRAM_AGGREGATION = new ExponentialHistogramAggregation(); +const DEFAULT_AGGREGATION = new DefaultAggregation(); +//# sourceMappingURL=Aggregation.js.map /***/ }), -/***/ 99056: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 31952: +/***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -60809,43 +62866,48 @@ __exportStar(__nccwpck_require__(90342), exports); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hostDetector = void 0; -const semantic_conventions_1 = __nccwpck_require__(67275); -const Resource_1 = __nccwpck_require__(72723); -const os_1 = __nccwpck_require__(22037); +exports.FilteringAttributesProcessor = exports.NoopAttributesProcessor = exports.AttributesProcessor = void 0; /** - * HostDetector detects the resources related to the host current process is - * running on. Currently only non-cloud-based attributes are included. + * The {@link AttributesProcessor} is responsible for customizing which + * attribute(s) are to be reported as metrics dimension(s) and adding + * additional dimension(s) from the {@link Context}. */ -class HostDetector { - async detect(_config) { - const attributes = { - [semantic_conventions_1.SemanticResourceAttributes.HOST_NAME]: (0, os_1.hostname)(), - [semantic_conventions_1.SemanticResourceAttributes.HOST_ARCH]: this._normalizeArch((0, os_1.arch)()), - }; - return new Resource_1.Resource(attributes); +class AttributesProcessor { + static Noop() { + return NOOP; } - _normalizeArch(nodeArchString) { - // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md - switch (nodeArchString) { - case 'arm': - return 'arm32'; - case 'ppc': - return 'ppc32'; - case 'x64': - return 'amd64'; - default: - return nodeArchString; - } +} +exports.AttributesProcessor = AttributesProcessor; +class NoopAttributesProcessor extends AttributesProcessor { + process(incoming, _context) { + return incoming; } } -exports.hostDetector = new HostDetector(); -//# sourceMappingURL=HostDetector.js.map +exports.NoopAttributesProcessor = NoopAttributesProcessor; +/** + * {@link AttributesProcessor} that filters by allowed attribute names and drops any names that are not in the + * allow list. + */ +class FilteringAttributesProcessor extends AttributesProcessor { + constructor(_allowedAttributeNames) { + super(); + this._allowedAttributeNames = _allowedAttributeNames; + } + process(incoming, _context) { + const filteredAttributes = {}; + Object.keys(incoming) + .filter(attributeName => this._allowedAttributeNames.includes(attributeName)) + .forEach(attributeName => (filteredAttributes[attributeName] = incoming[attributeName])); + return filteredAttributes; + } +} +exports.FilteringAttributesProcessor = FilteringAttributesProcessor; +const NOOP = new NoopAttributesProcessor(); +//# sourceMappingURL=AttributesProcessor.js.map /***/ }), -/***/ 54618: +/***/ 32979: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60866,42 +62928,32 @@ exports.hostDetector = new HostDetector(); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.osDetector = void 0; -const semantic_conventions_1 = __nccwpck_require__(67275); -const Resource_1 = __nccwpck_require__(72723); -const os_1 = __nccwpck_require__(22037); -/** - * OSDetector detects the resources related to the operating system (OS) on - * which the process represented by this resource is running. - */ -class OSDetector { - async detect(_config) { - const attributes = { - [semantic_conventions_1.SemanticResourceAttributes.OS_TYPE]: this._normalizeType((0, os_1.platform)()), - [semantic_conventions_1.SemanticResourceAttributes.OS_VERSION]: (0, os_1.release)(), - }; - return new Resource_1.Resource(attributes); +exports.InstrumentSelector = void 0; +const Predicate_1 = __nccwpck_require__(46443); +class InstrumentSelector { + constructor(criteria) { + var _a; + this._nameFilter = new Predicate_1.PatternPredicate((_a = criteria === null || criteria === void 0 ? void 0 : criteria.name) !== null && _a !== void 0 ? _a : '*'); + this._type = criteria === null || criteria === void 0 ? void 0 : criteria.type; + this._unitFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.unit); } - _normalizeType(nodePlatform) { - // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md - switch (nodePlatform) { - case 'sunos': - return 'solaris'; - case 'win32': - return 'windows'; - default: - return nodePlatform; - } + getType() { + return this._type; + } + getNameFilter() { + return this._nameFilter; + } + getUnitFilter() { + return this._unitFilter; } } -exports.osDetector = new OSDetector(); -//# sourceMappingURL=OSDetector.js.map +exports.InstrumentSelector = InstrumentSelector; +//# sourceMappingURL=InstrumentSelector.js.map /***/ }), -/***/ 85671: -/***/ ((__unused_webpack_module, exports) => { +/***/ 49851: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -60921,17 +62973,34 @@ exports.osDetector = new OSDetector(); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultServiceName = void 0; -function defaultServiceName() { - return `unknown_service:${process.argv0}`; +exports.MeterSelector = void 0; +const Predicate_1 = __nccwpck_require__(46443); +class MeterSelector { + constructor(criteria) { + this._nameFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.name); + this._versionFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.version); + this._schemaUrlFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.schemaUrl); + } + getNameFilter() { + return this._nameFilter; + } + /** + * TODO: semver filter? no spec yet. + */ + getVersionFilter() { + return this._versionFilter; + } + getSchemaUrlFilter() { + return this._schemaUrlFilter; + } } -exports.defaultServiceName = defaultServiceName; -//# sourceMappingURL=default-service-name.js.map +exports.MeterSelector = MeterSelector; +//# sourceMappingURL=MeterSelector.js.map /***/ }), -/***/ 6018: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 46443: +/***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -60951,59 +63020,153 @@ exports.defaultServiceName = defaultServiceName; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.detectResources = void 0; -const Resource_1 = __nccwpck_require__(72723); -const api_1 = __nccwpck_require__(65163); -const util = __nccwpck_require__(73837); +exports.ExactPredicate = exports.PatternPredicate = void 0; +// https://tc39.es/proposal-regex-escaping +// escape ^ $ \ . + ? ( ) [ ] { } | +// do not need to escape * as we interpret it as wildcard +const ESCAPE = /[\^$\\.+?()[\]{}|]/g; /** - * Runs all resource detectors and returns the results merged into a single - * Resource. - * - * @param config Configuration for resource detection + * Wildcard pattern predicate, supports patterns like `*`, `foo*`, `*bar`. */ -const detectResources = async (config = {}) => { - const internalConfig = Object.assign(config); - const resources = await Promise.all((internalConfig.detectors || []).map(async (d) => { - try { - const resource = await d.detect(internalConfig); - api_1.diag.debug(`${d.constructor.name} found resource.`, resource); - return resource; +class PatternPredicate { + constructor(pattern) { + if (pattern === '*') { + this._matchAll = true; + this._regexp = /.*/; } - catch (e) { - api_1.diag.debug(`${d.constructor.name} failed: ${e.message}`); - return Resource_1.Resource.empty(); + else { + this._matchAll = false; + this._regexp = new RegExp(PatternPredicate.escapePattern(pattern)); } - })); - // Future check if verbose logging is enabled issue #1903 - logResources(resources); - return resources.reduce((acc, resource) => acc.merge(resource), Resource_1.Resource.empty()); -}; -exports.detectResources = detectResources; -/** - * Writes debug information about the detected resources to the logger defined in the resource detection config, if one is provided. + } + match(str) { + if (this._matchAll) { + return true; + } + return this._regexp.test(str); + } + static escapePattern(pattern) { + return `^${pattern.replace(ESCAPE, '\\$&').replace('*', '.*')}$`; + } + static hasWildcard(pattern) { + return pattern.includes('*'); + } +} +exports.PatternPredicate = PatternPredicate; +class ExactPredicate { + constructor(pattern) { + this._matchAll = pattern === undefined; + this._pattern = pattern; + } + match(str) { + if (this._matchAll) { + return true; + } + if (str === this._pattern) { + return true; + } + return false; + } +} +exports.ExactPredicate = ExactPredicate; +//# sourceMappingURL=Predicate.js.map + +/***/ }), + +/***/ 76212: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors * - * @param resources The array of {@link Resource} that should be logged. Empty entries will be ignored. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ -const logResources = (resources) => { - resources.forEach(resource => { - // Print only populated resources - if (Object.keys(resource.attributes).length > 0) { - const resourceDebugString = util.inspect(resource.attributes, { - depth: 2, - breakLength: Infinity, - sorted: true, - compact: false, - }); - api_1.diag.verbose(resourceDebugString); - } - }); -}; -//# sourceMappingURL=detect-resources.js.map +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getConflictResolutionRecipe = exports.getDescriptionResolutionRecipe = exports.getTypeConflictResolutionRecipe = exports.getUnitConflictResolutionRecipe = exports.getValueTypeConflictResolutionRecipe = exports.getIncompatibilityDetails = void 0; +function getIncompatibilityDetails(existing, otherDescriptor) { + let incompatibility = ''; + if (existing.unit !== otherDescriptor.unit) { + incompatibility += `\t- Unit '${existing.unit}' does not match '${otherDescriptor.unit}'\n`; + } + if (existing.type !== otherDescriptor.type) { + incompatibility += `\t- Type '${existing.type}' does not match '${otherDescriptor.type}'\n`; + } + if (existing.valueType !== otherDescriptor.valueType) { + incompatibility += `\t- Value Type '${existing.valueType}' does not match '${otherDescriptor.valueType}'\n`; + } + if (existing.description !== otherDescriptor.description) { + incompatibility += `\t- Description '${existing.description}' does not match '${otherDescriptor.description}'\n`; + } + return incompatibility; +} +exports.getIncompatibilityDetails = getIncompatibilityDetails; +function getValueTypeConflictResolutionRecipe(existing, otherDescriptor) { + return `\t- use valueType '${existing.valueType}' on instrument creation or use an instrument name other than '${otherDescriptor.name}'`; +} +exports.getValueTypeConflictResolutionRecipe = getValueTypeConflictResolutionRecipe; +function getUnitConflictResolutionRecipe(existing, otherDescriptor) { + return `\t- use unit '${existing.unit}' on instrument creation or use an instrument name other than '${otherDescriptor.name}'`; +} +exports.getUnitConflictResolutionRecipe = getUnitConflictResolutionRecipe; +function getTypeConflictResolutionRecipe(existing, otherDescriptor) { + const selector = { + name: otherDescriptor.name, + type: otherDescriptor.type, + unit: otherDescriptor.unit, + }; + const selectorString = JSON.stringify(selector); + return `\t- create a new view with a name other than '${existing.name}' and InstrumentSelector '${selectorString}'`; +} +exports.getTypeConflictResolutionRecipe = getTypeConflictResolutionRecipe; +function getDescriptionResolutionRecipe(existing, otherDescriptor) { + const selector = { + name: otherDescriptor.name, + type: otherDescriptor.type, + unit: otherDescriptor.unit, + }; + const selectorString = JSON.stringify(selector); + return `\t- create a new view with a name other than '${existing.name}' and InstrumentSelector '${selectorString}' + \t- OR - create a new view with the name ${existing.name} and description '${existing.description}' and InstrumentSelector ${selectorString} + \t- OR - create a new view with the name ${otherDescriptor.name} and description '${existing.description}' and InstrumentSelector ${selectorString}`; +} +exports.getDescriptionResolutionRecipe = getDescriptionResolutionRecipe; +function getConflictResolutionRecipe(existing, otherDescriptor) { + // Conflicts that cannot be solved via views. + if (existing.valueType !== otherDescriptor.valueType) { + return getValueTypeConflictResolutionRecipe(existing, otherDescriptor); + } + if (existing.unit !== otherDescriptor.unit) { + return getUnitConflictResolutionRecipe(existing, otherDescriptor); + } + // Conflicts that can be solved via views. + if (existing.type !== otherDescriptor.type) { + // this will automatically solve possible description conflicts. + return getTypeConflictResolutionRecipe(existing, otherDescriptor); + } + if (existing.description !== otherDescriptor.description) { + return getDescriptionResolutionRecipe(existing, otherDescriptor); + } + return ''; +} +exports.getConflictResolutionRecipe = getConflictResolutionRecipe; +//# sourceMappingURL=RegistrationConflicts.js.map /***/ }), -/***/ 90342: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 1265: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -61022,26 +63185,119 @@ const logResources = (resources) => { * See the License for the specific language governing permissions and * limitations under the License. */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(85671), exports); -__exportStar(__nccwpck_require__(6018), exports); -__exportStar(__nccwpck_require__(99056), exports); -__exportStar(__nccwpck_require__(54618), exports); -//# sourceMappingURL=index.js.map +exports.View = void 0; +const Predicate_1 = __nccwpck_require__(46443); +const AttributesProcessor_1 = __nccwpck_require__(31952); +const InstrumentSelector_1 = __nccwpck_require__(32979); +const MeterSelector_1 = __nccwpck_require__(49851); +const Aggregation_1 = __nccwpck_require__(14769); +function isSelectorNotProvided(options) { + return (options.instrumentName == null && + options.instrumentType == null && + options.instrumentUnit == null && + options.meterName == null && + options.meterVersion == null && + options.meterSchemaUrl == null); +} +/** + * Can be passed to a {@link MeterProvider} to select instruments and alter their metric stream. + */ +class View { + /** + * Create a new {@link View} instance. + * + * Parameters can be categorized as two types: + * Instrument selection criteria: Used to describe the instrument(s) this view will be applied to. + * Will be treated as additive (the Instrument has to meet all the provided criteria to be selected). + * + * Metric stream altering: Alter the metric stream of instruments selected by instrument selection criteria. + * + * @param viewOptions {@link ViewOptions} for altering the metric stream and instrument selection. + * @param viewOptions.name + * Alters the metric stream: + * This will be used as the name of the metrics stream. + * If not provided, the original Instrument name will be used. + * @param viewOptions.description + * Alters the metric stream: + * This will be used as the description of the metrics stream. + * If not provided, the original Instrument description will be used by default. + * @param viewOptions.attributeKeys + * Alters the metric stream: + * If provided, the attributes that are not in the list will be ignored. + * If not provided, all attribute keys will be used by default. + * @param viewOptions.aggregation + * Alters the metric stream: + * Alters the {@link Aggregation} of the metric stream. + * @param viewOptions.instrumentName + * Instrument selection criteria: + * Original name of the Instrument(s) with wildcard support. + * @param viewOptions.instrumentType + * Instrument selection criteria: + * The original type of the Instrument(s). + * @param viewOptions.instrumentUnit + * Instrument selection criteria: + * The unit of the Instrument(s). + * @param viewOptions.meterName + * Instrument selection criteria: + * The name of the Meter. No wildcard support, name must match the meter exactly. + * @param viewOptions.meterVersion + * Instrument selection criteria: + * The version of the Meter. No wildcard support, version must match exactly. + * @param viewOptions.meterSchemaUrl + * Instrument selection criteria: + * The schema URL of the Meter. No wildcard support, schema URL must match exactly. + * + * @example + * // Create a view that changes the Instrument 'my.instrument' to use to an + * // ExplicitBucketHistogramAggregation with the boundaries [20, 30, 40] + * new View({ + * aggregation: new ExplicitBucketHistogramAggregation([20, 30, 40]), + * instrumentName: 'my.instrument' + * }) + */ + constructor(viewOptions) { + var _a; + // If no criteria is provided, the SDK SHOULD treat it as an error. + // It is recommended that the SDK implementations fail fast. + if (isSelectorNotProvided(viewOptions)) { + throw new Error('Cannot create view with no selector arguments supplied'); + } + // the SDK SHOULD NOT allow Views with a specified name to be declared with instrument selectors that + // may select more than one instrument (e.g. wild card instrument name) in the same Meter. + if (viewOptions.name != null && + ((viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.instrumentName) == null || + Predicate_1.PatternPredicate.hasWildcard(viewOptions.instrumentName))) { + throw new Error('Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.'); + } + // Create AttributesProcessor if attributeKeys are defined set. + if (viewOptions.attributeKeys != null) { + this.attributesProcessor = new AttributesProcessor_1.FilteringAttributesProcessor(viewOptions.attributeKeys); + } + else { + this.attributesProcessor = AttributesProcessor_1.AttributesProcessor.Noop(); + } + this.name = viewOptions.name; + this.description = viewOptions.description; + this.aggregation = (_a = viewOptions.aggregation) !== null && _a !== void 0 ? _a : Aggregation_1.Aggregation.Default(); + this.instrumentSelector = new InstrumentSelector_1.InstrumentSelector({ + name: viewOptions.instrumentName, + type: viewOptions.instrumentType, + unit: viewOptions.instrumentUnit, + }); + this.meterSelector = new MeterSelector_1.MeterSelector({ + name: viewOptions.meterName, + version: viewOptions.meterVersion, + schemaUrl: viewOptions.meterSchemaUrl, + }); + } +} +exports.View = View; +//# sourceMappingURL=View.js.map /***/ }), -/***/ 29566: +/***/ 6379: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -61062,7 +63318,37 @@ __exportStar(__nccwpck_require__(54618), exports); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map +exports.ViewRegistry = void 0; +class ViewRegistry { + constructor() { + this._registeredViews = []; + } + addView(view) { + this._registeredViews.push(view); + } + findViews(instrument, meter) { + const views = this._registeredViews.filter(registeredView => { + return (this._matchInstrument(registeredView.instrumentSelector, instrument) && + this._matchMeter(registeredView.meterSelector, meter)); + }); + return views; + } + _matchInstrument(selector, instrument) { + return ((selector.getType() === undefined || + instrument.type === selector.getType()) && + selector.getNameFilter().match(instrument.name) && + selector.getUnitFilter().match(instrument.unit)); + } + _matchMeter(selector, meter) { + return (selector.getNameFilter().match(meter.name) && + (meter.version === undefined || + selector.getVersionFilter().match(meter.version)) && + (meter.schemaUrl === undefined || + selector.getSchemaUrlFilter().match(meter.schemaUrl))); + } +} +exports.ViewRegistry = ViewRegistry; +//# sourceMappingURL=ViewRegistry.js.map /***/ }), @@ -61112,7 +63398,7 @@ class BasicTracerProvider { var _a; this._registeredSpanProcessors = []; this._tracers = new Map(); - const mergedConfig = (0, core_1.merge)({}, config_1.DEFAULT_CONFIG, (0, utility_1.reconfigureLimits)(config)); + const mergedConfig = (0, core_1.merge)({}, (0, config_1.loadDefaultConfig)(), (0, utility_1.reconfigureLimits)(config)); this.resource = (_a = mergedConfig.resource) !== null && _a !== void 0 ? _a : resources_1.Resource.empty(); this.resource = resources_1.Resource.default().merge(this.resource); this._config = Object.assign({}, mergedConfig, { @@ -61214,13 +63500,20 @@ class BasicTracerProvider { shutdown() { return this.activeSpanProcessor.shutdown(); } + /** + * TS cannot yet infer the type of this.constructor: + * https://github.com/Microsoft/TypeScript/issues/3841#issuecomment-337560146 + * There is no need to override either of the getters in your child class. + * The type of the registered component maps should be the same across all + * classes in the inheritance tree. + */ _getPropagator(name) { var _a; - return (_a = BasicTracerProvider._registeredPropagators.get(name)) === null || _a === void 0 ? void 0 : _a(); + return (_a = this.constructor._registeredPropagators.get(name)) === null || _a === void 0 ? void 0 : _a(); } _getSpanExporter(name) { var _a; - return (_a = BasicTracerProvider._registeredExporters.get(name)) === null || _a === void 0 ? void 0 : _a(); + return (_a = this.constructor._registeredExporters.get(name)) === null || _a === void 0 ? void 0 : _a(); } _buildPropagatorFromEnv() { // per spec, propagators from env must be deduplicated @@ -61252,7 +63545,7 @@ class BasicTracerProvider { } _buildExporterFromEnv() { const exporterName = (0, core_1.getEnv)().OTEL_TRACES_EXPORTER; - if (exporterName === 'none') + if (exporterName === 'none' || exporterName === '') return; const exporter = this._getSpanExporter(exporterName); if (!exporter) { @@ -61271,6 +63564,31 @@ BasicTracerProvider._registeredExporters = new Map(); /***/ }), +/***/ 6410: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=IdGenerator.js.map + +/***/ }), + /***/ 12352: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -61345,6 +63663,54 @@ exports.MultiSpanProcessor = MultiSpanProcessor; /***/ }), +/***/ 17446: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SamplingDecision = void 0; +/** + * A sampling decision that determines how a {@link Span} will be recorded + * and collected. + */ +var SamplingDecision; +(function (SamplingDecision) { + /** + * `Span.isRecording() === false`, span will not be recorded and all events + * and attributes will be dropped. + */ + SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD"; + /** + * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags} + * MUST NOT be set. + */ + SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD"; + /** + * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags} + * MUST be set. + */ + SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED"; +})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {})); +//# sourceMappingURL=Sampler.js.map + +/***/ }), + /***/ 61301: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -61367,7 +63733,7 @@ exports.MultiSpanProcessor = MultiSpanProcessor; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Span = void 0; -const api = __nccwpck_require__(65163); +const api_1 = __nccwpck_require__(65163); const core_1 = __nccwpck_require__(89736); const semantic_conventions_1 = __nccwpck_require__(67275); const enums_1 = __nccwpck_require__(35092); @@ -61375,13 +63741,21 @@ const enums_1 = __nccwpck_require__(35092); * This class represents a span. */ class Span { - /** Constructs a new Span instance. */ - constructor(parentTracer, context, spanName, spanContext, kind, parentSpanId, links = [], startTime = (0, core_1.hrTime)()) { + /** + * Constructs a new Span instance. + * + * @deprecated calling Span constructor directly is not supported. Please use tracer.startSpan. + * */ + constructor(parentTracer, context, spanName, spanContext, kind, parentSpanId, links = [], startTime, _deprecatedClock, // keeping this argument even though it is unused to ensure backwards compatibility + attributes) { this.attributes = {}; this.links = []; this.events = []; + this._droppedAttributesCount = 0; + this._droppedEventsCount = 0; + this._droppedLinksCount = 0; this.status = { - code: api.SpanStatusCode.UNSET, + code: api_1.SpanStatusCode.UNSET, }; this.endTime = [0, 0]; this._ended = false; @@ -61391,13 +63765,22 @@ class Span { this.parentSpanId = parentSpanId; this.kind = kind; this.links = links; - this.startTime = (0, core_1.timeInputToHrTime)(startTime); + const now = Date.now(); + this._performanceStartTime = core_1.otperformance.now(); + this._performanceOffset = + now - (this._performanceStartTime + (0, core_1.getTimeOrigin)()); + this._startTimeProvided = startTime != null; + this.startTime = this._getTime(startTime !== null && startTime !== void 0 ? startTime : now); this.resource = parentTracer.resource; this.instrumentationLibrary = parentTracer.instrumentationLibrary; this._spanLimits = parentTracer.getSpanLimits(); + this._attributeValueLengthLimit = + this._spanLimits.attributeValueLengthLimit || 0; + if (attributes != null) { + this.setAttributes(attributes); + } this._spanProcessor = parentTracer.getActiveSpanProcessor(); this._spanProcessor.onStart(this, context); - this._attributeValueLengthLimit = this._spanLimits.attributeValueLengthLimit || 0; } spanContext() { return this._spanContext; @@ -61406,16 +63789,17 @@ class Span { if (value == null || this._isSpanEnded()) return this; if (key.length === 0) { - api.diag.warn(`Invalid attribute key: ${key}`); + api_1.diag.warn(`Invalid attribute key: ${key}`); return this; } if (!(0, core_1.isAttributeValue)(value)) { - api.diag.warn(`Invalid attribute value set for key: ${key}`); + api_1.diag.warn(`Invalid attribute value set for key: ${key}`); return this; } if (Object.keys(this.attributes).length >= this._spanLimits.attributeCountLimit && !Object.prototype.hasOwnProperty.call(this.attributes, key)) { + this._droppedAttributesCount++; return this; } this.attributes[key] = this._truncateToSize(value); @@ -61432,33 +63816,35 @@ class Span { * @param name Span Name * @param [attributesOrStartTime] Span attributes or start time * if type is {@type TimeInput} and 3rd param is undefined - * @param [startTime] Specified start time for the event + * @param [timeStamp] Specified time stamp for the event */ - addEvent(name, attributesOrStartTime, startTime) { + addEvent(name, attributesOrStartTime, timeStamp) { if (this._isSpanEnded()) return this; if (this._spanLimits.eventCountLimit === 0) { - api.diag.warn('No events allowed.'); + api_1.diag.warn('No events allowed.'); + this._droppedEventsCount++; return this; } if (this.events.length >= this._spanLimits.eventCountLimit) { - api.diag.warn('Dropping extra events.'); + if (this._droppedEventsCount === 0) { + api_1.diag.debug('Dropping extra events.'); + } this.events.shift(); + this._droppedEventsCount++; } if ((0, core_1.isTimeInput)(attributesOrStartTime)) { - if (typeof startTime === 'undefined') { - startTime = attributesOrStartTime; + if (!(0, core_1.isTimeInput)(timeStamp)) { + timeStamp = attributesOrStartTime; } attributesOrStartTime = undefined; } - if (typeof startTime === 'undefined') { - startTime = (0, core_1.hrTime)(); - } const attributes = (0, core_1.sanitizeAttributes)(attributesOrStartTime); this.events.push({ name, attributes, - time: (0, core_1.timeInputToHrTime)(startTime), + time: this._getTime(timeStamp), + droppedAttributesCount: 0, }); return this; } @@ -61474,30 +63860,59 @@ class Span { this.name = name; return this; } - end(endTime = (0, core_1.hrTime)()) { + end(endTime) { if (this._isSpanEnded()) { - api.diag.error('You can only call end() on a span once.'); + api_1.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`); return; } this._ended = true; - this.endTime = (0, core_1.timeInputToHrTime)(endTime); + this.endTime = this._getTime(endTime); this._duration = (0, core_1.hrTimeDuration)(this.startTime, this.endTime); if (this._duration[0] < 0) { - api.diag.warn('Inconsistent start and end time, startTime > endTime', this.startTime, this.endTime); + api_1.diag.warn('Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.', this.startTime, this.endTime); + this.endTime = this.startTime.slice(); + this._duration = [0, 0]; + } + if (this._droppedEventsCount > 0) { + api_1.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`); } this._spanProcessor.onEnd(this); } + _getTime(inp) { + if (typeof inp === 'number' && inp < core_1.otperformance.now()) { + // must be a performance timestamp + // apply correction and convert to hrtime + return (0, core_1.hrTime)(inp + this._performanceOffset); + } + if (typeof inp === 'number') { + return (0, core_1.millisToHrTime)(inp); + } + if (inp instanceof Date) { + return (0, core_1.millisToHrTime)(inp.getTime()); + } + if ((0, core_1.isTimeInputHrTime)(inp)) { + return inp; + } + if (this._startTimeProvided) { + // if user provided a time for the start manually + // we can't use duration to calculate event/end times + return (0, core_1.millisToHrTime)(Date.now()); + } + const msDuration = core_1.otperformance.now() - this._performanceStartTime; + return (0, core_1.addHrTimes)(this.startTime, (0, core_1.millisToHrTime)(msDuration)); + } isRecording() { return this._ended === false; } - recordException(exception, time = (0, core_1.hrTime)()) { + recordException(exception, time) { const attributes = {}; if (typeof exception === 'string') { attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_MESSAGE] = exception; } else if (exception) { if (exception.code) { - attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_TYPE] = exception.code.toString(); + attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_TYPE] = + exception.code.toString(); } else if (exception.name) { attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_TYPE] = exception.name; @@ -61515,7 +63930,7 @@ class Span { this.addEvent(enums_1.ExceptionEventName, attributes, time); } else { - api.diag.warn(`Failed to record an exception ${exception}`); + api_1.diag.warn(`Failed to record an exception ${exception}`); } } get duration() { @@ -61524,9 +63939,18 @@ class Span { get ended() { return this._ended; } + get droppedAttributesCount() { + return this._droppedAttributesCount; + } + get droppedEventsCount() { + return this._droppedEventsCount; + } + get droppedLinksCount() { + return this._droppedLinksCount; + } _isSpanEnded() { if (this._ended) { - api.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`); + api_1.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`); } return this._ended; } @@ -61541,7 +63965,7 @@ class Span { } /** * If the given attribute value is of type string and has more characters than given {@code attributeValueLengthLimit} then - * return string with trucated to {@code attributeValueLengthLimit} characters + * return string with truncated to {@code attributeValueLengthLimit} characters * * If the given attribute value is array of strings then * return new array of strings with each element truncated to {@code attributeValueLengthLimit} characters @@ -61556,7 +63980,7 @@ class Span { // Check limit if (limit <= 0) { // Negative values are invalid, so do not truncate - api.diag.warn(`Attribute value limit must be positive, got ${limit}`); + api_1.diag.warn(`Attribute value limit must be positive, got ${limit}`); return value; } // String @@ -61652,6 +64076,7 @@ const api = __nccwpck_require__(65163); const core_1 = __nccwpck_require__(89736); const Span_1 = __nccwpck_require__(61301); const utility_1 = __nccwpck_require__(54324); +const platform_1 = __nccwpck_require__(10262); /** * This class represents a basic tracer. */ @@ -61665,7 +64090,7 @@ class Tracer { this._sampler = localConfig.sampler; this._generalLimits = localConfig.generalLimits; this._spanLimits = localConfig.spanLimits; - this._idGenerator = config.idGenerator || new core_1.RandomIdGenerator(); + this._idGenerator = config.idGenerator || new platform_1.RandomIdGenerator(); this.resource = _tracerProvider.resource; this.instrumentationLibrary = instrumentationLibrary; } @@ -61674,21 +64099,24 @@ class Tracer { * decision. */ startSpan(name, options = {}, context = api.context.active()) { - var _a, _b; - if ((0, core_1.isTracingSuppressed)(context)) { - api.diag.debug('Instrumentation suppressed, returning Noop Span'); - return api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT); - } + var _a, _b, _c; // remove span from context in case a root span is requested via options if (options.root) { context = api.trace.deleteSpan(context); } - const parentSpanContext = api.trace.getSpanContext(context); + const parentSpan = api.trace.getSpan(context); + if ((0, core_1.isTracingSuppressed)(context)) { + api.diag.debug('Instrumentation suppressed, returning Noop Span'); + const nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT); + return nonRecordingSpan; + } + const parentSpanContext = parentSpan === null || parentSpan === void 0 ? void 0 : parentSpan.spanContext(); const spanId = this._idGenerator.generateSpanId(); let traceId; let traceState; let parentSpanId; - if (!parentSpanContext || !api.trace.isSpanContextValid(parentSpanContext)) { + if (!parentSpanContext || + !api.trace.isSpanContextValid(parentSpanContext)) { // New root span. traceId = this._idGenerator.generateTraceId(); } @@ -61708,19 +64136,20 @@ class Tracer { const attributes = (0, core_1.sanitizeAttributes)(options.attributes); // make sampling decision const samplingResult = this._sampler.shouldSample(context, traceId, name, spanKind, attributes, links); + traceState = (_c = samplingResult.traceState) !== null && _c !== void 0 ? _c : traceState; const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED ? api.TraceFlags.SAMPLED : api.TraceFlags.NONE; const spanContext = { traceId, spanId, traceFlags, traceState }; if (samplingResult.decision === api.SamplingDecision.NOT_RECORD) { api.diag.debug('Recording is off, propagating context in a non-recording span'); - return api.trace.wrapSpanContext(spanContext); + const nonRecordingSpan = api.trace.wrapSpanContext(spanContext); + return nonRecordingSpan; } - const span = new Span_1.Span(this, context, name, spanContext, spanKind, parentSpanId, links, options.startTime); // Set initial span attributes. The attributes object may have been mutated // by the sampler, so we sanitize the merged attributes before setting them. const initAttributes = (0, core_1.sanitizeAttributes)(Object.assign(attributes, samplingResult.attributes)); - span.setAttributes(initAttributes); + const span = new Span_1.Span(this, context, name, spanContext, spanKind, parentSpanId, links, options.startTime, undefined, initAttributes); return span; } startActiveSpan(name, arg2, arg3, arg4) { @@ -61785,32 +64214,43 @@ exports.Tracer = Tracer; * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.buildSamplerFromEnv = exports.DEFAULT_CONFIG = void 0; +exports.buildSamplerFromEnv = exports.loadDefaultConfig = void 0; const api_1 = __nccwpck_require__(65163); const core_1 = __nccwpck_require__(89736); +const AlwaysOffSampler_1 = __nccwpck_require__(68118); +const AlwaysOnSampler_1 = __nccwpck_require__(13032); +const ParentBasedSampler_1 = __nccwpck_require__(58070); +const TraceIdRatioBasedSampler_1 = __nccwpck_require__(16712); const env = (0, core_1.getEnv)(); const FALLBACK_OTEL_TRACES_SAMPLER = core_1.TracesSamplerValues.AlwaysOn; const DEFAULT_RATIO = 1; /** - * Default configuration. For fields with primitive values, any user-provided + * Load default configuration. For fields with primitive values, any user-provided * value will override the corresponding default value. For fields with * non-primitive values (like `spanLimits`), the user-provided value will be * used to extend the default value. */ -exports.DEFAULT_CONFIG = { - sampler: buildSamplerFromEnv(env), - forceFlushTimeoutMillis: 30000, - generalLimits: { - attributeValueLengthLimit: (0, core_1.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, - attributeCountLimit: (0, core_1.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT, - }, - spanLimits: { - attributeValueLengthLimit: (0, core_1.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, - attributeCountLimit: (0, core_1.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, - linkCountLimit: (0, core_1.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT, - eventCountLimit: (0, core_1.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT, - }, -}; +// object needs to be wrapped in this function and called when needed otherwise +// envs are parsed before tests are ran - causes tests using these envs to fail +function loadDefaultConfig() { + return { + sampler: buildSamplerFromEnv(env), + forceFlushTimeoutMillis: 30000, + generalLimits: { + attributeValueLengthLimit: (0, core_1.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, + attributeCountLimit: (0, core_1.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT, + }, + spanLimits: { + attributeValueLengthLimit: (0, core_1.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, + attributeCountLimit: (0, core_1.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, + linkCountLimit: (0, core_1.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT, + eventCountLimit: (0, core_1.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT, + attributePerEventCountLimit: (0, core_1.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, + attributePerLinkCountLimit: (0, core_1.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT, + }, + }; +} +exports.loadDefaultConfig = loadDefaultConfig; /** * Based on environment, builds a sampler, complies with specification. * @param environment optional, by default uses getEnv(), but allows passing a value to reuse parsed environment @@ -61818,26 +64258,26 @@ exports.DEFAULT_CONFIG = { function buildSamplerFromEnv(environment = (0, core_1.getEnv)()) { switch (environment.OTEL_TRACES_SAMPLER) { case core_1.TracesSamplerValues.AlwaysOn: - return new core_1.AlwaysOnSampler(); + return new AlwaysOnSampler_1.AlwaysOnSampler(); case core_1.TracesSamplerValues.AlwaysOff: - return new core_1.AlwaysOffSampler(); + return new AlwaysOffSampler_1.AlwaysOffSampler(); case core_1.TracesSamplerValues.ParentBasedAlwaysOn: - return new core_1.ParentBasedSampler({ - root: new core_1.AlwaysOnSampler(), + return new ParentBasedSampler_1.ParentBasedSampler({ + root: new AlwaysOnSampler_1.AlwaysOnSampler(), }); case core_1.TracesSamplerValues.ParentBasedAlwaysOff: - return new core_1.ParentBasedSampler({ - root: new core_1.AlwaysOffSampler(), + return new ParentBasedSampler_1.ParentBasedSampler({ + root: new AlwaysOffSampler_1.AlwaysOffSampler(), }); case core_1.TracesSamplerValues.TraceIdRatio: - return new core_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment)); + return new TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment)); case core_1.TracesSamplerValues.ParentBasedTraceIdRatio: - return new core_1.ParentBasedSampler({ - root: new core_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment)), + return new ParentBasedSampler_1.ParentBasedSampler({ + root: new TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment)), }); default: api_1.diag.error(`OTEL_TRACES_SAMPLER value "${environment.OTEL_TRACES_SAMPLER} invalid, defaulting to ${FALLBACK_OTEL_TRACES_SAMPLER}".`); - return new core_1.AlwaysOnSampler(); + return new AlwaysOnSampler_1.AlwaysOnSampler(); } } exports.buildSamplerFromEnv = buildSamplerFromEnv; @@ -61921,7 +64361,9 @@ const core_1 = __nccwpck_require__(89736); class BatchSpanProcessorBase { constructor(_exporter, config) { this._exporter = _exporter; + this._isExporting = false; this._finishedSpans = []; + this._droppedSpansCount = 0; const env = (0, core_1.getEnv)(); this._maxExportBatchSize = typeof (config === null || config === void 0 ? void 0 : config.maxExportBatchSize) === 'number' @@ -61940,6 +64382,10 @@ class BatchSpanProcessorBase { ? config.exportTimeoutMillis : env.OTEL_BSP_EXPORT_TIMEOUT; this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this); + if (this._maxExportBatchSize > this._maxQueueSize) { + api_1.diag.warn('BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize'); + this._maxExportBatchSize = this._maxQueueSize; + } } forceFlush() { if (this._shutdownOnce.isCalled) { @@ -61977,8 +64423,17 @@ class BatchSpanProcessorBase { _addToBuffer(span) { if (this._finishedSpans.length >= this._maxQueueSize) { // limit reached, drop span + if (this._droppedSpansCount === 0) { + api_1.diag.debug('maxQueueSize reached, dropping spans'); + } + this._droppedSpansCount++; return; } + if (this._droppedSpansCount > 0) { + // some spans were dropped, log once with count of spans dropped + api_1.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`); + this._droppedSpansCount = 0; + } this._finishedSpans.push(span); this._maybeStartTimer(); } @@ -62016,8 +64471,16 @@ class BatchSpanProcessorBase { api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => { // Reset the finished spans buffer here because the next invocations of the _flush method // could pass the same finished spans to the exporter if the buffer is cleared - // outside of the execution of this callback. - this._exporter.export(this._finishedSpans.splice(0, this._maxExportBatchSize), result => { + // outside the execution of this callback. + let spans; + if (this._finishedSpans.length <= this._maxExportBatchSize) { + spans = this._finishedSpans; + this._finishedSpans = []; + } + else { + spans = this._finishedSpans.splice(0, this._maxExportBatchSize); + } + const doExport = () => this._exporter.export(spans, result => { var _a; clearTimeout(timer); if (result.code === core_1.ExportResultCode.SUCCESS) { @@ -62027,24 +64490,53 @@ class BatchSpanProcessorBase { reject((_a = result.error) !== null && _a !== void 0 ? _a : new Error('BatchSpanProcessor: span export failed')); } }); + let pendingResources = null; + for (let i = 0, len = spans.length; i < len; i++) { + const span = spans[i]; + if (span.resource.asyncAttributesPending && + span.resource.waitForAsyncAttributes) { + pendingResources !== null && pendingResources !== void 0 ? pendingResources : (pendingResources = []); + pendingResources.push(span.resource.waitForAsyncAttributes()); + } + } + // Avoid scheduling a promise to make the behavior more predictable and easier to test + if (pendingResources === null) { + doExport(); + } + else { + Promise.all(pendingResources).then(doExport, err => { + (0, core_1.globalErrorHandler)(err); + reject(err); + }); + } }); }); } _maybeStartTimer() { - if (this._timer !== undefined) + if (this._isExporting) return; - this._timer = setTimeout(() => { + const flush = () => { + this._isExporting = true; this._flushOneBatch() - .then(() => { + .finally(() => { + this._isExporting = false; if (this._finishedSpans.length > 0) { this._clearTimer(); this._maybeStartTimer(); } }) .catch(e => { + this._isExporting = false; (0, core_1.globalErrorHandler)(e); }); - }, this._scheduledDelayMillis); + }; + // we only wait if the queue doesn't have enough elements yet + if (this._finishedSpans.length >= this._maxExportBatchSize) { + return flush(); + } + if (this._timer !== undefined) + return; + this._timer = setTimeout(() => flush(), this._scheduledDelayMillis); (0, core_1.unrefTimer)(this._timer); } _clearTimer() { @@ -62101,6 +64593,12 @@ class ConsoleSpanExporter { */ shutdown() { this._sendSpans([]); + return this.forceFlush(); + } + /** + * Exports any pending spans in exporter + */ + forceFlush() { return Promise.resolve(); } /** @@ -62108,9 +64606,14 @@ class ConsoleSpanExporter { * @param span */ _exportInfo(span) { + var _a; return { + resource: { + attributes: span.resource.attributes, + }, traceId: span.spanContext().traceId, parentId: span.parentSpanId, + traceState: (_a = span.spanContext().traceState) === null || _a === void 0 ? void 0 : _a.serialize(), name: span.name, id: span.spanContext().spanId, kind: span.kind, @@ -62119,7 +64622,7 @@ class ConsoleSpanExporter { attributes: span.attributes, status: span.status, events: span.events, - links: span.links + links: span.links, }; } /** @@ -62190,6 +64693,12 @@ class InMemorySpanExporter { shutdown() { this._stopped = true; this._finishedSpans = []; + return this.forceFlush(); + } + /** + * Exports any pending spans in the exporter + */ + forceFlush() { return Promise.resolve(); } reset() { @@ -62301,29 +64810,51 @@ class SimpleSpanProcessor { constructor(_exporter) { this._exporter = _exporter; this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this); + this._unresolvedExports = new Set(); } - forceFlush() { - // do nothing as all spans are being exported without waiting - return Promise.resolve(); + async forceFlush() { + // await unresolved resources before resolving + await Promise.all(Array.from(this._unresolvedExports)); + if (this._exporter.forceFlush) { + await this._exporter.forceFlush(); + } } - // does nothing. onStart(_span, _parentContext) { } onEnd(span) { + var _a, _b; if (this._shutdownOnce.isCalled) { return; } if ((span.spanContext().traceFlags & api_1.TraceFlags.SAMPLED) === 0) { return; } - // prevent downstream exporter calls from generating spans - api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => { - this._exporter.export([span], result => { - var _a; - if (result.code !== core_1.ExportResultCode.SUCCESS) { - (0, core_1.globalErrorHandler)((_a = result.error) !== null && _a !== void 0 ? _a : new Error(`SimpleSpanProcessor: span export failed (status ${result})`)); - } - }); + const doExport = () => core_1.internal + ._export(this._exporter, [span]) + .then((result) => { + var _a; + if (result.code !== core_1.ExportResultCode.SUCCESS) { + (0, core_1.globalErrorHandler)((_a = result.error) !== null && _a !== void 0 ? _a : new Error(`SimpleSpanProcessor: span export failed (status ${result})`)); + } + }) + .catch(error => { + (0, core_1.globalErrorHandler)(error); }); + // Avoid scheduling a promise to make the behavior more predictable and easier to test + if (span.resource.asyncAttributesPending) { + const exportPromise = (_b = (_a = span.resource).waitForAsyncAttributes) === null || _b === void 0 ? void 0 : _b.call(_a).then(() => { + if (exportPromise != null) { + this._unresolvedExports.delete(exportPromise); + } + return doExport(); + }, err => (0, core_1.globalErrorHandler)(err)); + // store the unresolved exports + if (exportPromise != null) { + this._unresolvedExports.add(exportPromise); + } + } + else { + void doExport(); + } } shutdown() { return this._shutdownOnce.call(); @@ -62402,10 +64933,16 @@ __exportStar(__nccwpck_require__(25561), exports); __exportStar(__nccwpck_require__(89802), exports); __exportStar(__nccwpck_require__(4570), exports); __exportStar(__nccwpck_require__(69252), exports); +__exportStar(__nccwpck_require__(68118), exports); +__exportStar(__nccwpck_require__(13032), exports); +__exportStar(__nccwpck_require__(58070), exports); +__exportStar(__nccwpck_require__(16712), exports); +__exportStar(__nccwpck_require__(17446), exports); __exportStar(__nccwpck_require__(61301), exports); __exportStar(__nccwpck_require__(3502), exports); __exportStar(__nccwpck_require__(86598), exports); __exportStar(__nccwpck_require__(49068), exports); +__exportStar(__nccwpck_require__(6410), exports); //# sourceMappingURL=index.js.map /***/ }), @@ -62446,6 +64983,69 @@ __exportStar(__nccwpck_require__(36573), exports); /***/ }), +/***/ 97670: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RandomIdGenerator = void 0; +const SPAN_ID_BYTES = 8; +const TRACE_ID_BYTES = 16; +class RandomIdGenerator { + constructor() { + /** + * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex + * characters corresponding to 128 bits. + */ + this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); + /** + * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex + * characters corresponding to 64 bits. + */ + this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); + } +} +exports.RandomIdGenerator = RandomIdGenerator; +const SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); +function getIdGenerator(bytes) { + return function generateId() { + for (let i = 0; i < bytes / 4; i++) { + // unsigned right shift drops decimal part of the number + // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE + SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4); + } + // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated + for (let i = 0; i < bytes; i++) { + if (SHARED_BUFFER[i] > 0) { + break; + } + else if (i === bytes - 1) { + SHARED_BUFFER[bytes - 1] = 1; + } + } + return SHARED_BUFFER.toString('hex', 0, bytes); + }; +} +//# sourceMappingURL=RandomIdGenerator.js.map + +/***/ }), + /***/ 97913: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -62472,13 +65072,200 @@ const BatchSpanProcessorBase_1 = __nccwpck_require__(69727); class BatchSpanProcessor extends BatchSpanProcessorBase_1.BatchSpanProcessorBase { onShutdown() { } } -exports.BatchSpanProcessor = BatchSpanProcessor; -//# sourceMappingURL=BatchSpanProcessor.js.map +exports.BatchSpanProcessor = BatchSpanProcessor; +//# sourceMappingURL=BatchSpanProcessor.js.map + +/***/ }), + +/***/ 36573: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(97913), exports); +__exportStar(__nccwpck_require__(97670), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 68118: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AlwaysOffSampler = void 0; +const Sampler_1 = __nccwpck_require__(17446); +/** Sampler that samples no traces. */ +class AlwaysOffSampler { + shouldSample() { + return { + decision: Sampler_1.SamplingDecision.NOT_RECORD, + }; + } + toString() { + return 'AlwaysOffSampler'; + } +} +exports.AlwaysOffSampler = AlwaysOffSampler; +//# sourceMappingURL=AlwaysOffSampler.js.map + +/***/ }), + +/***/ 13032: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AlwaysOnSampler = void 0; +const Sampler_1 = __nccwpck_require__(17446); +/** Sampler that samples all traces. */ +class AlwaysOnSampler { + shouldSample() { + return { + decision: Sampler_1.SamplingDecision.RECORD_AND_SAMPLED, + }; + } + toString() { + return 'AlwaysOnSampler'; + } +} +exports.AlwaysOnSampler = AlwaysOnSampler; +//# sourceMappingURL=AlwaysOnSampler.js.map + +/***/ }), + +/***/ 58070: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ParentBasedSampler = void 0; +const api_1 = __nccwpck_require__(65163); +const core_1 = __nccwpck_require__(89736); +const AlwaysOffSampler_1 = __nccwpck_require__(68118); +const AlwaysOnSampler_1 = __nccwpck_require__(13032); +/** + * A composite sampler that either respects the parent span's sampling decision + * or delegates to `delegateSampler` for root spans. + */ +class ParentBasedSampler { + constructor(config) { + var _a, _b, _c, _d; + this._root = config.root; + if (!this._root) { + (0, core_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured')); + this._root = new AlwaysOnSampler_1.AlwaysOnSampler(); + } + this._remoteParentSampled = + (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler(); + this._remoteParentNotSampled = + (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler(); + this._localParentSampled = + (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler(); + this._localParentNotSampled = + (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler(); + } + shouldSample(context, traceId, spanName, spanKind, attributes, links) { + const parentContext = api_1.trace.getSpanContext(context); + if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) { + return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links); + } + if (parentContext.isRemote) { + if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { + return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); + } + return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); + } + if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { + return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); + } + return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); + } + toString() { + return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`; + } +} +exports.ParentBasedSampler = ParentBasedSampler; +//# sourceMappingURL=ParentBasedSampler.js.map /***/ }), -/***/ 36573: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 16712: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -62497,19 +65284,44 @@ exports.BatchSpanProcessor = BatchSpanProcessor; * See the License for the specific language governing permissions and * limitations under the License. */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(97913), exports); -//# sourceMappingURL=index.js.map +exports.TraceIdRatioBasedSampler = void 0; +const api_1 = __nccwpck_require__(65163); +const Sampler_1 = __nccwpck_require__(17446); +/** Sampler that samples a given fraction of traces based of trace id deterministically. */ +class TraceIdRatioBasedSampler { + constructor(_ratio = 0) { + this._ratio = _ratio; + this._ratio = this._normalize(_ratio); + this._upperBound = Math.floor(this._ratio * 0xffffffff); + } + shouldSample(context, traceId) { + return { + decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound + ? Sampler_1.SamplingDecision.RECORD_AND_SAMPLED + : Sampler_1.SamplingDecision.NOT_RECORD, + }; + } + toString() { + return `TraceIdRatioBased{${this._ratio}}`; + } + _normalize(ratio) { + if (typeof ratio !== 'number' || isNaN(ratio)) + return 0; + return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; + } + _accumulate(traceId) { + let accumulation = 0; + for (let i = 0; i < traceId.length / 8; i++) { + const pos = i * 8; + const part = parseInt(traceId.slice(pos, pos + 8), 16); + accumulation = (accumulation ^ part) >>> 0; + } + return accumulation; + } +} +exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; +//# sourceMappingURL=TraceIdRatioBasedSampler.js.map /***/ }), @@ -62561,6 +65373,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.reconfigureLimits = exports.mergeConfig = void 0; const config_1 = __nccwpck_require__(91); +const core_1 = __nccwpck_require__(89736); /** * Function to merge Default configuration (as specified in './config') with * user provided configurations. @@ -62569,9 +65382,10 @@ function mergeConfig(userConfig) { const perInstanceDefaults = { sampler: (0, config_1.buildSamplerFromEnv)(), }; - const target = Object.assign({}, config_1.DEFAULT_CONFIG, perInstanceDefaults, userConfig); - target.generalLimits = Object.assign({}, config_1.DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {}); - target.spanLimits = Object.assign({}, config_1.DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {}); + const DEFAULT_CONFIG = (0, config_1.loadDefaultConfig)(); + const target = Object.assign({}, DEFAULT_CONFIG, perInstanceDefaults, userConfig); + target.generalLimits = Object.assign({}, DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {}); + target.spanLimits = Object.assign({}, DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {}); return target; } exports.mergeConfig = mergeConfig; @@ -62581,22 +65395,19 @@ exports.mergeConfig = mergeConfig; * @param userConfig User provided tracer configuration */ function reconfigureLimits(userConfig) { - var _a, _b; + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; const spanLimits = Object.assign({}, userConfig.spanLimits); + const parsedEnvConfig = (0, core_1.getEnvWithoutDefaults)(); /** - * When span attribute count limit is not defined, but general attribute count limit is defined - * Then, span attribute count limit will be same as general one + * Reassign span attribute count limit to use first non null value defined by user or use default value */ - if (spanLimits.attributeCountLimit == null && ((_a = userConfig.generalLimits) === null || _a === void 0 ? void 0 : _a.attributeCountLimit) != null) { - spanLimits.attributeCountLimit = userConfig.generalLimits.attributeCountLimit; - } + spanLimits.attributeCountLimit = + (_f = (_e = (_d = (_b = (_a = userConfig.spanLimits) === null || _a === void 0 ? void 0 : _a.attributeCountLimit) !== null && _b !== void 0 ? _b : (_c = userConfig.generalLimits) === null || _c === void 0 ? void 0 : _c.attributeCountLimit) !== null && _d !== void 0 ? _d : parsedEnvConfig.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT) !== null && _e !== void 0 ? _e : parsedEnvConfig.OTEL_ATTRIBUTE_COUNT_LIMIT) !== null && _f !== void 0 ? _f : core_1.DEFAULT_ATTRIBUTE_COUNT_LIMIT; /** - * When span attribute value length limit is not defined, but general attribute value length limit is defined - * Then, span attribute value length limit will be same as general one + * Reassign span attribute value length limit to use first non null value defined by user or use default value */ - if (spanLimits.attributeValueLengthLimit == null && ((_b = userConfig.generalLimits) === null || _b === void 0 ? void 0 : _b.attributeValueLengthLimit) != null) { - spanLimits.attributeValueLengthLimit = userConfig.generalLimits.attributeValueLengthLimit; - } + spanLimits.attributeValueLengthLimit = + (_m = (_l = (_k = (_h = (_g = userConfig.spanLimits) === null || _g === void 0 ? void 0 : _g.attributeValueLengthLimit) !== null && _h !== void 0 ? _h : (_j = userConfig.generalLimits) === null || _j === void 0 ? void 0 : _j.attributeValueLengthLimit) !== null && _k !== void 0 ? _k : parsedEnvConfig.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _l !== void 0 ? _l : parsedEnvConfig.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _m !== void 0 ? _m : core_1.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT; return Object.assign({}, userConfig, { spanLimits }); } exports.reconfigureLimits = reconfigureLimits; @@ -62641,7 +65452,7 @@ __exportStar(__nccwpck_require__(2834), exports); /***/ }), -/***/ 85003: +/***/ 749: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -62662,501 +65473,1035 @@ __exportStar(__nccwpck_require__(2834), exports); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0; +exports.createConstMap = void 0; +/** + * Creates a const map from the given values + * @param values - An array of values to be used as keys and values in the map. + * @returns A populated version of the map with the values and keys derived from the values. + */ +/*#__NO_SIDE_EFFECTS__*/ +function createConstMap(values) { + // eslint-disable-next-line prefer-const, @typescript-eslint/no-explicit-any + let res = {}; + const len = values.length; + for (let lp = 0; lp < len; lp++) { + const val = values[lp]; + if (val) { + res[String(val).toUpperCase().replace(/[-.]/g, '_')] = val; + } + } + return res; +} +exports.createConstMap = createConstMap; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 85003: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SEMRESATTRS_K8S_STATEFULSET_NAME = exports.SEMRESATTRS_K8S_STATEFULSET_UID = exports.SEMRESATTRS_K8S_DEPLOYMENT_NAME = exports.SEMRESATTRS_K8S_DEPLOYMENT_UID = exports.SEMRESATTRS_K8S_REPLICASET_NAME = exports.SEMRESATTRS_K8S_REPLICASET_UID = exports.SEMRESATTRS_K8S_CONTAINER_NAME = exports.SEMRESATTRS_K8S_POD_NAME = exports.SEMRESATTRS_K8S_POD_UID = exports.SEMRESATTRS_K8S_NAMESPACE_NAME = exports.SEMRESATTRS_K8S_NODE_UID = exports.SEMRESATTRS_K8S_NODE_NAME = exports.SEMRESATTRS_K8S_CLUSTER_NAME = exports.SEMRESATTRS_HOST_IMAGE_VERSION = exports.SEMRESATTRS_HOST_IMAGE_ID = exports.SEMRESATTRS_HOST_IMAGE_NAME = exports.SEMRESATTRS_HOST_ARCH = exports.SEMRESATTRS_HOST_TYPE = exports.SEMRESATTRS_HOST_NAME = exports.SEMRESATTRS_HOST_ID = exports.SEMRESATTRS_FAAS_MAX_MEMORY = exports.SEMRESATTRS_FAAS_INSTANCE = exports.SEMRESATTRS_FAAS_VERSION = exports.SEMRESATTRS_FAAS_ID = exports.SEMRESATTRS_FAAS_NAME = exports.SEMRESATTRS_DEVICE_MODEL_NAME = exports.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = exports.SEMRESATTRS_DEVICE_ID = exports.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = exports.SEMRESATTRS_CONTAINER_IMAGE_TAG = exports.SEMRESATTRS_CONTAINER_IMAGE_NAME = exports.SEMRESATTRS_CONTAINER_RUNTIME = exports.SEMRESATTRS_CONTAINER_ID = exports.SEMRESATTRS_CONTAINER_NAME = exports.SEMRESATTRS_AWS_LOG_STREAM_ARNS = exports.SEMRESATTRS_AWS_LOG_STREAM_NAMES = exports.SEMRESATTRS_AWS_LOG_GROUP_ARNS = exports.SEMRESATTRS_AWS_LOG_GROUP_NAMES = exports.SEMRESATTRS_AWS_EKS_CLUSTER_ARN = exports.SEMRESATTRS_AWS_ECS_TASK_REVISION = exports.SEMRESATTRS_AWS_ECS_TASK_FAMILY = exports.SEMRESATTRS_AWS_ECS_TASK_ARN = exports.SEMRESATTRS_AWS_ECS_LAUNCHTYPE = exports.SEMRESATTRS_AWS_ECS_CLUSTER_ARN = exports.SEMRESATTRS_AWS_ECS_CONTAINER_ARN = exports.SEMRESATTRS_CLOUD_PLATFORM = exports.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = exports.SEMRESATTRS_CLOUD_REGION = exports.SEMRESATTRS_CLOUD_ACCOUNT_ID = exports.SEMRESATTRS_CLOUD_PROVIDER = void 0; +exports.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = exports.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = exports.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = exports.CLOUDPLATFORMVALUES_AZURE_AKS = exports.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = exports.CLOUDPLATFORMVALUES_AZURE_VM = exports.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = exports.CLOUDPLATFORMVALUES_AWS_LAMBDA = exports.CLOUDPLATFORMVALUES_AWS_EKS = exports.CLOUDPLATFORMVALUES_AWS_ECS = exports.CLOUDPLATFORMVALUES_AWS_EC2 = exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = exports.CloudProviderValues = exports.CLOUDPROVIDERVALUES_GCP = exports.CLOUDPROVIDERVALUES_AZURE = exports.CLOUDPROVIDERVALUES_AWS = exports.CLOUDPROVIDERVALUES_ALIBABA_CLOUD = exports.SemanticResourceAttributes = exports.SEMRESATTRS_WEBENGINE_DESCRIPTION = exports.SEMRESATTRS_WEBENGINE_VERSION = exports.SEMRESATTRS_WEBENGINE_NAME = exports.SEMRESATTRS_TELEMETRY_AUTO_VERSION = exports.SEMRESATTRS_TELEMETRY_SDK_VERSION = exports.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = exports.SEMRESATTRS_TELEMETRY_SDK_NAME = exports.SEMRESATTRS_SERVICE_VERSION = exports.SEMRESATTRS_SERVICE_INSTANCE_ID = exports.SEMRESATTRS_SERVICE_NAMESPACE = exports.SEMRESATTRS_SERVICE_NAME = exports.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = exports.SEMRESATTRS_PROCESS_RUNTIME_VERSION = exports.SEMRESATTRS_PROCESS_RUNTIME_NAME = exports.SEMRESATTRS_PROCESS_OWNER = exports.SEMRESATTRS_PROCESS_COMMAND_ARGS = exports.SEMRESATTRS_PROCESS_COMMAND_LINE = exports.SEMRESATTRS_PROCESS_COMMAND = exports.SEMRESATTRS_PROCESS_EXECUTABLE_PATH = exports.SEMRESATTRS_PROCESS_EXECUTABLE_NAME = exports.SEMRESATTRS_PROCESS_PID = exports.SEMRESATTRS_OS_VERSION = exports.SEMRESATTRS_OS_NAME = exports.SEMRESATTRS_OS_DESCRIPTION = exports.SEMRESATTRS_OS_TYPE = exports.SEMRESATTRS_K8S_CRONJOB_NAME = exports.SEMRESATTRS_K8S_CRONJOB_UID = exports.SEMRESATTRS_K8S_JOB_NAME = exports.SEMRESATTRS_K8S_JOB_UID = exports.SEMRESATTRS_K8S_DAEMONSET_NAME = exports.SEMRESATTRS_K8S_DAEMONSET_UID = void 0; +exports.TelemetrySdkLanguageValues = exports.TELEMETRYSDKLANGUAGEVALUES_WEBJS = exports.TELEMETRYSDKLANGUAGEVALUES_RUBY = exports.TELEMETRYSDKLANGUAGEVALUES_PYTHON = exports.TELEMETRYSDKLANGUAGEVALUES_PHP = exports.TELEMETRYSDKLANGUAGEVALUES_NODEJS = exports.TELEMETRYSDKLANGUAGEVALUES_JAVA = exports.TELEMETRYSDKLANGUAGEVALUES_GO = exports.TELEMETRYSDKLANGUAGEVALUES_ERLANG = exports.TELEMETRYSDKLANGUAGEVALUES_DOTNET = exports.TELEMETRYSDKLANGUAGEVALUES_CPP = exports.OsTypeValues = exports.OSTYPEVALUES_Z_OS = exports.OSTYPEVALUES_SOLARIS = exports.OSTYPEVALUES_AIX = exports.OSTYPEVALUES_HPUX = exports.OSTYPEVALUES_DRAGONFLYBSD = exports.OSTYPEVALUES_OPENBSD = exports.OSTYPEVALUES_NETBSD = exports.OSTYPEVALUES_FREEBSD = exports.OSTYPEVALUES_DARWIN = exports.OSTYPEVALUES_LINUX = exports.OSTYPEVALUES_WINDOWS = exports.HostArchValues = exports.HOSTARCHVALUES_X86 = exports.HOSTARCHVALUES_PPC64 = exports.HOSTARCHVALUES_PPC32 = exports.HOSTARCHVALUES_IA64 = exports.HOSTARCHVALUES_ARM64 = exports.HOSTARCHVALUES_ARM32 = exports.HOSTARCHVALUES_AMD64 = exports.AwsEcsLaunchtypeValues = exports.AWSECSLAUNCHTYPEVALUES_FARGATE = exports.AWSECSLAUNCHTYPEVALUES_EC2 = exports.CloudPlatformValues = exports.CLOUDPLATFORMVALUES_GCP_APP_ENGINE = exports.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = exports.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = exports.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = void 0; +const utils_1 = __nccwpck_require__(749); +//---------------------------------------------------------------------------------------------------------- // DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticResourceAttributes = { - /** - * Name of the cloud provider. - */ - CLOUD_PROVIDER: 'cloud.provider', - /** - * The cloud account ID the resource is assigned to. - */ - CLOUD_ACCOUNT_ID: 'cloud.account.id', - /** - * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations). - */ - CLOUD_REGION: 'cloud.region', - /** - * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. - * - * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. - */ - CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone', - /** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - */ - CLOUD_PLATFORM: 'cloud.platform', - /** - * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - */ - AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn', - /** - * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - */ - AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn', - /** - * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - */ - AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype', - /** - * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). - */ - AWS_ECS_TASK_ARN: 'aws.ecs.task.arn', - /** - * The task definition family this task definition is a member of. - */ - AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family', - /** - * The revision for this task definition. - */ - AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision', - /** - * The ARN of an EKS cluster. - */ - AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn', - /** - * The name(s) of the AWS log group(s) an application is writing to. - * - * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. - */ - AWS_LOG_GROUP_NAMES: 'aws.log.group.names', - /** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * - * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - */ - AWS_LOG_GROUP_ARNS: 'aws.log.group.arns', - /** - * The name(s) of the AWS log stream(s) an application is writing to. - */ - AWS_LOG_STREAM_NAMES: 'aws.log.stream.names', - /** - * The ARN(s) of the AWS log stream(s). - * - * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. - */ - AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns', - /** - * Container name. - */ - CONTAINER_NAME: 'container.name', - /** - * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. - */ - CONTAINER_ID: 'container.id', - /** - * The container runtime managing this container. - */ - CONTAINER_RUNTIME: 'container.runtime', - /** - * Name of the image the container was built on. - */ - CONTAINER_IMAGE_NAME: 'container.image.name', - /** - * Container image tag. - */ - CONTAINER_IMAGE_TAG: 'container.image.tag', - /** - * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). - */ - DEPLOYMENT_ENVIRONMENT: 'deployment.environment', - /** - * A unique identifier representing the device. - * - * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. - */ - DEVICE_ID: 'device.id', - /** - * The model identifier for the device. - * - * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. - */ - DEVICE_MODEL_IDENTIFIER: 'device.model.identifier', - /** - * The marketing name for the device model. - * - * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. - */ - DEVICE_MODEL_NAME: 'device.model.name', - /** - * The name of the single function that this runtime instance executes. - * - * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes). - */ - FAAS_NAME: 'faas.name', - /** - * The unique ID of the single function that this runtime instance executes. - * - * Note: Depending on the cloud provider, use: - - * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - Take care not to use the "invoked ARN" directly but replace any - [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple - different aliases. - * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) - * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id). - - On some providers, it may not be possible to determine the full ID at startup, - which is why this field cannot be made required. For example, on AWS the account ID - part of the ARN is not available without calling another AWS API - which may be deemed too slow for a short-running lambda function. - As an alternative, consider setting `faas.id` as a span attribute instead. - */ - FAAS_ID: 'faas.id', - /** - * The immutable version of the function being executed. - * - * Note: Depending on the cloud provider and platform, use: - - * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - (an integer represented as a decimal string). - * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) - (i.e., the function name plus the revision suffix). - * **Google Cloud Functions:** The value of the - [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - * **Azure Functions:** Not applicable. Do not set this attribute. - */ - FAAS_VERSION: 'faas.version', - /** - * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. - * - * Note: * **AWS Lambda:** Use the (full) log stream name. - */ - FAAS_INSTANCE: 'faas.instance', - /** - * The amount of memory available to the serverless function in MiB. - * - * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. - */ - FAAS_MAX_MEMORY: 'faas.max_memory', - /** - * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. - */ - HOST_ID: 'host.id', - /** - * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. - */ - HOST_NAME: 'host.name', - /** - * Type of host. For Cloud, this must be the machine type. - */ - HOST_TYPE: 'host.type', - /** - * The CPU architecture the host system is running on. - */ - HOST_ARCH: 'host.arch', - /** - * Name of the VM image or OS install the host was instantiated from. - */ - HOST_IMAGE_NAME: 'host.image.name', - /** - * VM image ID. For Cloud, this value is from the provider. - */ - HOST_IMAGE_ID: 'host.image.id', - /** - * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes). - */ - HOST_IMAGE_VERSION: 'host.image.version', - /** - * The name of the cluster. - */ - K8S_CLUSTER_NAME: 'k8s.cluster.name', - /** - * The name of the Node. - */ - K8S_NODE_NAME: 'k8s.node.name', - /** - * The UID of the Node. - */ - K8S_NODE_UID: 'k8s.node.uid', - /** - * The name of the namespace that the pod is running in. - */ - K8S_NAMESPACE_NAME: 'k8s.namespace.name', - /** - * The UID of the Pod. - */ - K8S_POD_UID: 'k8s.pod.uid', - /** - * The name of the Pod. - */ - K8S_POD_NAME: 'k8s.pod.name', - /** - * The name of the Container in a Pod template. - */ - K8S_CONTAINER_NAME: 'k8s.container.name', - /** - * The UID of the ReplicaSet. - */ - K8S_REPLICASET_UID: 'k8s.replicaset.uid', - /** - * The name of the ReplicaSet. - */ - K8S_REPLICASET_NAME: 'k8s.replicaset.name', - /** - * The UID of the Deployment. - */ - K8S_DEPLOYMENT_UID: 'k8s.deployment.uid', - /** - * The name of the Deployment. - */ - K8S_DEPLOYMENT_NAME: 'k8s.deployment.name', - /** - * The UID of the StatefulSet. - */ - K8S_STATEFULSET_UID: 'k8s.statefulset.uid', - /** - * The name of the StatefulSet. - */ - K8S_STATEFULSET_NAME: 'k8s.statefulset.name', - /** - * The UID of the DaemonSet. - */ - K8S_DAEMONSET_UID: 'k8s.daemonset.uid', - /** - * The name of the DaemonSet. - */ - K8S_DAEMONSET_NAME: 'k8s.daemonset.name', - /** - * The UID of the Job. - */ - K8S_JOB_UID: 'k8s.job.uid', - /** - * The name of the Job. - */ - K8S_JOB_NAME: 'k8s.job.name', - /** - * The UID of the CronJob. - */ - K8S_CRONJOB_UID: 'k8s.cronjob.uid', - /** - * The name of the CronJob. - */ - K8S_CRONJOB_NAME: 'k8s.cronjob.name', - /** - * The operating system type. - */ - OS_TYPE: 'os.type', - /** - * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. - */ - OS_DESCRIPTION: 'os.description', - /** - * Human readable operating system name. - */ - OS_NAME: 'os.name', - /** - * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes). - */ - OS_VERSION: 'os.version', - /** - * Process identifier (PID). - */ - PROCESS_PID: 'process.pid', - /** - * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_NAME: 'process.executable.name', - /** - * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. - */ - PROCESS_EXECUTABLE_PATH: 'process.executable.path', - /** - * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. - */ - PROCESS_COMMAND: 'process.command', - /** - * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. - */ - PROCESS_COMMAND_LINE: 'process.command_line', - /** - * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. - */ - PROCESS_COMMAND_ARGS: 'process.command_args', - /** - * The username of the user that owns the process. - */ - PROCESS_OWNER: 'process.owner', - /** - * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. - */ - PROCESS_RUNTIME_NAME: 'process.runtime.name', - /** - * The version of the runtime of this process, as returned by the runtime without modification. - */ - PROCESS_RUNTIME_VERSION: 'process.runtime.version', - /** - * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. - */ - PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description', - /** - * Logical name of the service. - * - * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. - */ - SERVICE_NAME: 'service.name', - /** - * A namespace for `service.name`. - * - * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. - */ - SERVICE_NAMESPACE: 'service.namespace', - /** - * The string ID of the service instance. - * - * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). - */ - SERVICE_INSTANCE_ID: 'service.instance.id', - /** - * The version string of the service API or implementation. - */ - SERVICE_VERSION: 'service.version', - /** - * The name of the telemetry SDK as defined above. - */ - TELEMETRY_SDK_NAME: 'telemetry.sdk.name', - /** - * The language of the telemetry SDK. - */ - TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language', - /** - * The version string of the telemetry SDK. - */ - TELEMETRY_SDK_VERSION: 'telemetry.sdk.version', - /** - * The version string of the auto instrumentation agent, if used. - */ - TELEMETRY_AUTO_VERSION: 'telemetry.auto.version', - /** - * The name of the web engine. - */ - WEBENGINE_NAME: 'webengine.name', - /** - * The version of the web engine. - */ - WEBENGINE_VERSION: 'webengine.version', - /** - * Additional description of the web engine (e.g. detailed version and edition information). - */ - WEBENGINE_DESCRIPTION: 'webengine.description', -}; -exports.CloudProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.CloudPlatformValues = { - /** Alibaba Cloud Elastic Compute Service. */ - ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs', - /** Alibaba Cloud Function Compute. */ - ALIBABA_CLOUD_FC: 'alibaba_cloud_fc', - /** AWS Elastic Compute Cloud. */ - AWS_EC2: 'aws_ec2', - /** AWS Elastic Container Service. */ - AWS_ECS: 'aws_ecs', - /** AWS Elastic Kubernetes Service. */ - AWS_EKS: 'aws_eks', - /** AWS Lambda. */ - AWS_LAMBDA: 'aws_lambda', - /** AWS Elastic Beanstalk. */ - AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk', - /** Azure Virtual Machines. */ - AZURE_VM: 'azure_vm', - /** Azure Container Instances. */ - AZURE_CONTAINER_INSTANCES: 'azure_container_instances', - /** Azure Kubernetes Service. */ - AZURE_AKS: 'azure_aks', - /** Azure Functions. */ - AZURE_FUNCTIONS: 'azure_functions', - /** Azure App Service. */ - AZURE_APP_SERVICE: 'azure_app_service', - /** Google Cloud Compute Engine (GCE). */ - GCP_COMPUTE_ENGINE: 'gcp_compute_engine', - /** Google Cloud Run. */ - GCP_CLOUD_RUN: 'gcp_cloud_run', - /** Google Cloud Kubernetes Engine (GKE). */ - GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine', - /** Google Cloud Functions (GCF). */ - GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions', - /** Google Cloud App Engine (GAE). */ - GCP_APP_ENGINE: 'gcp_app_engine', -}; -exports.AwsEcsLaunchtypeValues = { - /** ec2. */ - EC2: 'ec2', - /** fargate. */ - FARGATE: 'fargate', -}; -exports.HostArchValues = { - /** AMD64. */ - AMD64: 'amd64', - /** ARM32. */ - ARM32: 'arm32', - /** ARM64. */ - ARM64: 'arm64', - /** Itanium. */ - IA64: 'ia64', - /** 32-bit PowerPC. */ - PPC32: 'ppc32', - /** 64-bit PowerPC. */ - PPC64: 'ppc64', - /** 32-bit x86. */ - X86: 'x86', -}; -exports.OsTypeValues = { - /** Microsoft Windows. */ - WINDOWS: 'windows', - /** Linux. */ - LINUX: 'linux', - /** Apple Darwin. */ - DARWIN: 'darwin', - /** FreeBSD. */ - FREEBSD: 'freebsd', - /** NetBSD. */ - NETBSD: 'netbsd', - /** OpenBSD. */ - OPENBSD: 'openbsd', - /** DragonFly BSD. */ - DRAGONFLYBSD: 'dragonflybsd', - /** HP-UX (Hewlett Packard Unix). */ - HPUX: 'hpux', - /** AIX (Advanced Interactive eXecutive). */ - AIX: 'aix', - /** Oracle Solaris. */ - SOLARIS: 'solaris', - /** IBM z/OS. */ - Z_OS: 'z_os', -}; -exports.TelemetrySdkLanguageValues = { - /** cpp. */ - CPP: 'cpp', - /** dotnet. */ - DOTNET: 'dotnet', - /** erlang. */ - ERLANG: 'erlang', - /** go. */ - GO: 'go', - /** java. */ - JAVA: 'java', - /** nodejs. */ - NODEJS: 'nodejs', - /** php. */ - PHP: 'php', - /** python. */ - PYTHON: 'python', - /** ruby. */ - RUBY: 'ruby', - /** webjs. */ - WEBJS: 'webjs', -}; +//---------------------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------------------- +// Constant values for SemanticResourceAttributes +//---------------------------------------------------------------------------------------------------------- +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_CLOUD_PROVIDER = 'cloud.provider'; +const TMP_CLOUD_ACCOUNT_ID = 'cloud.account.id'; +const TMP_CLOUD_REGION = 'cloud.region'; +const TMP_CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone'; +const TMP_CLOUD_PLATFORM = 'cloud.platform'; +const TMP_AWS_ECS_CONTAINER_ARN = 'aws.ecs.container.arn'; +const TMP_AWS_ECS_CLUSTER_ARN = 'aws.ecs.cluster.arn'; +const TMP_AWS_ECS_LAUNCHTYPE = 'aws.ecs.launchtype'; +const TMP_AWS_ECS_TASK_ARN = 'aws.ecs.task.arn'; +const TMP_AWS_ECS_TASK_FAMILY = 'aws.ecs.task.family'; +const TMP_AWS_ECS_TASK_REVISION = 'aws.ecs.task.revision'; +const TMP_AWS_EKS_CLUSTER_ARN = 'aws.eks.cluster.arn'; +const TMP_AWS_LOG_GROUP_NAMES = 'aws.log.group.names'; +const TMP_AWS_LOG_GROUP_ARNS = 'aws.log.group.arns'; +const TMP_AWS_LOG_STREAM_NAMES = 'aws.log.stream.names'; +const TMP_AWS_LOG_STREAM_ARNS = 'aws.log.stream.arns'; +const TMP_CONTAINER_NAME = 'container.name'; +const TMP_CONTAINER_ID = 'container.id'; +const TMP_CONTAINER_RUNTIME = 'container.runtime'; +const TMP_CONTAINER_IMAGE_NAME = 'container.image.name'; +const TMP_CONTAINER_IMAGE_TAG = 'container.image.tag'; +const TMP_DEPLOYMENT_ENVIRONMENT = 'deployment.environment'; +const TMP_DEVICE_ID = 'device.id'; +const TMP_DEVICE_MODEL_IDENTIFIER = 'device.model.identifier'; +const TMP_DEVICE_MODEL_NAME = 'device.model.name'; +const TMP_FAAS_NAME = 'faas.name'; +const TMP_FAAS_ID = 'faas.id'; +const TMP_FAAS_VERSION = 'faas.version'; +const TMP_FAAS_INSTANCE = 'faas.instance'; +const TMP_FAAS_MAX_MEMORY = 'faas.max_memory'; +const TMP_HOST_ID = 'host.id'; +const TMP_HOST_NAME = 'host.name'; +const TMP_HOST_TYPE = 'host.type'; +const TMP_HOST_ARCH = 'host.arch'; +const TMP_HOST_IMAGE_NAME = 'host.image.name'; +const TMP_HOST_IMAGE_ID = 'host.image.id'; +const TMP_HOST_IMAGE_VERSION = 'host.image.version'; +const TMP_K8S_CLUSTER_NAME = 'k8s.cluster.name'; +const TMP_K8S_NODE_NAME = 'k8s.node.name'; +const TMP_K8S_NODE_UID = 'k8s.node.uid'; +const TMP_K8S_NAMESPACE_NAME = 'k8s.namespace.name'; +const TMP_K8S_POD_UID = 'k8s.pod.uid'; +const TMP_K8S_POD_NAME = 'k8s.pod.name'; +const TMP_K8S_CONTAINER_NAME = 'k8s.container.name'; +const TMP_K8S_REPLICASET_UID = 'k8s.replicaset.uid'; +const TMP_K8S_REPLICASET_NAME = 'k8s.replicaset.name'; +const TMP_K8S_DEPLOYMENT_UID = 'k8s.deployment.uid'; +const TMP_K8S_DEPLOYMENT_NAME = 'k8s.deployment.name'; +const TMP_K8S_STATEFULSET_UID = 'k8s.statefulset.uid'; +const TMP_K8S_STATEFULSET_NAME = 'k8s.statefulset.name'; +const TMP_K8S_DAEMONSET_UID = 'k8s.daemonset.uid'; +const TMP_K8S_DAEMONSET_NAME = 'k8s.daemonset.name'; +const TMP_K8S_JOB_UID = 'k8s.job.uid'; +const TMP_K8S_JOB_NAME = 'k8s.job.name'; +const TMP_K8S_CRONJOB_UID = 'k8s.cronjob.uid'; +const TMP_K8S_CRONJOB_NAME = 'k8s.cronjob.name'; +const TMP_OS_TYPE = 'os.type'; +const TMP_OS_DESCRIPTION = 'os.description'; +const TMP_OS_NAME = 'os.name'; +const TMP_OS_VERSION = 'os.version'; +const TMP_PROCESS_PID = 'process.pid'; +const TMP_PROCESS_EXECUTABLE_NAME = 'process.executable.name'; +const TMP_PROCESS_EXECUTABLE_PATH = 'process.executable.path'; +const TMP_PROCESS_COMMAND = 'process.command'; +const TMP_PROCESS_COMMAND_LINE = 'process.command_line'; +const TMP_PROCESS_COMMAND_ARGS = 'process.command_args'; +const TMP_PROCESS_OWNER = 'process.owner'; +const TMP_PROCESS_RUNTIME_NAME = 'process.runtime.name'; +const TMP_PROCESS_RUNTIME_VERSION = 'process.runtime.version'; +const TMP_PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description'; +const TMP_SERVICE_NAME = 'service.name'; +const TMP_SERVICE_NAMESPACE = 'service.namespace'; +const TMP_SERVICE_INSTANCE_ID = 'service.instance.id'; +const TMP_SERVICE_VERSION = 'service.version'; +const TMP_TELEMETRY_SDK_NAME = 'telemetry.sdk.name'; +const TMP_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language'; +const TMP_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version'; +const TMP_TELEMETRY_AUTO_VERSION = 'telemetry.auto.version'; +const TMP_WEBENGINE_NAME = 'webengine.name'; +const TMP_WEBENGINE_VERSION = 'webengine.version'; +const TMP_WEBENGINE_DESCRIPTION = 'webengine.description'; +/** + * Name of the cloud provider. + */ +exports.SEMRESATTRS_CLOUD_PROVIDER = TMP_CLOUD_PROVIDER; +/** + * The cloud account ID the resource is assigned to. + */ +exports.SEMRESATTRS_CLOUD_ACCOUNT_ID = TMP_CLOUD_ACCOUNT_ID; +/** + * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations). + */ +exports.SEMRESATTRS_CLOUD_REGION = TMP_CLOUD_REGION; +/** + * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. + * + * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. + */ +exports.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = TMP_CLOUD_AVAILABILITY_ZONE; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.SEMRESATTRS_CLOUD_PLATFORM = TMP_CLOUD_PLATFORM; +/** + * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + */ +exports.SEMRESATTRS_AWS_ECS_CONTAINER_ARN = TMP_AWS_ECS_CONTAINER_ARN; +/** + * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). + */ +exports.SEMRESATTRS_AWS_ECS_CLUSTER_ARN = TMP_AWS_ECS_CLUSTER_ARN; +/** + * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + */ +exports.SEMRESATTRS_AWS_ECS_LAUNCHTYPE = TMP_AWS_ECS_LAUNCHTYPE; +/** + * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). + */ +exports.SEMRESATTRS_AWS_ECS_TASK_ARN = TMP_AWS_ECS_TASK_ARN; +/** + * The task definition family this task definition is a member of. + */ +exports.SEMRESATTRS_AWS_ECS_TASK_FAMILY = TMP_AWS_ECS_TASK_FAMILY; +/** + * The revision for this task definition. + */ +exports.SEMRESATTRS_AWS_ECS_TASK_REVISION = TMP_AWS_ECS_TASK_REVISION; +/** + * The ARN of an EKS cluster. + */ +exports.SEMRESATTRS_AWS_EKS_CLUSTER_ARN = TMP_AWS_EKS_CLUSTER_ARN; +/** + * The name(s) of the AWS log group(s) an application is writing to. + * + * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. + */ +exports.SEMRESATTRS_AWS_LOG_GROUP_NAMES = TMP_AWS_LOG_GROUP_NAMES; +/** + * The Amazon Resource Name(s) (ARN) of the AWS log group(s). + * + * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + */ +exports.SEMRESATTRS_AWS_LOG_GROUP_ARNS = TMP_AWS_LOG_GROUP_ARNS; +/** + * The name(s) of the AWS log stream(s) an application is writing to. + */ +exports.SEMRESATTRS_AWS_LOG_STREAM_NAMES = TMP_AWS_LOG_STREAM_NAMES; +/** + * The ARN(s) of the AWS log stream(s). + * + * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. + */ +exports.SEMRESATTRS_AWS_LOG_STREAM_ARNS = TMP_AWS_LOG_STREAM_ARNS; +/** + * Container name. + */ +exports.SEMRESATTRS_CONTAINER_NAME = TMP_CONTAINER_NAME; +/** + * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. + */ +exports.SEMRESATTRS_CONTAINER_ID = TMP_CONTAINER_ID; +/** + * The container runtime managing this container. + */ +exports.SEMRESATTRS_CONTAINER_RUNTIME = TMP_CONTAINER_RUNTIME; +/** + * Name of the image the container was built on. + */ +exports.SEMRESATTRS_CONTAINER_IMAGE_NAME = TMP_CONTAINER_IMAGE_NAME; +/** + * Container image tag. + */ +exports.SEMRESATTRS_CONTAINER_IMAGE_TAG = TMP_CONTAINER_IMAGE_TAG; +/** + * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). + */ +exports.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = TMP_DEPLOYMENT_ENVIRONMENT; +/** + * A unique identifier representing the device. + * + * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. + */ +exports.SEMRESATTRS_DEVICE_ID = TMP_DEVICE_ID; +/** + * The model identifier for the device. + * + * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. + */ +exports.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = TMP_DEVICE_MODEL_IDENTIFIER; +/** + * The marketing name for the device model. + * + * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. + */ +exports.SEMRESATTRS_DEVICE_MODEL_NAME = TMP_DEVICE_MODEL_NAME; +/** + * The name of the single function that this runtime instance executes. + * + * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes). + */ +exports.SEMRESATTRS_FAAS_NAME = TMP_FAAS_NAME; +/** +* The unique ID of the single function that this runtime instance executes. +* +* Note: Depending on the cloud provider, use: + +* **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). +Take care not to use the "invoked ARN" directly but replace any +[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple +different aliases. +* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) +* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id). + +On some providers, it may not be possible to determine the full ID at startup, +which is why this field cannot be made required. For example, on AWS the account ID +part of the ARN is not available without calling another AWS API +which may be deemed too slow for a short-running lambda function. +As an alternative, consider setting `faas.id` as a span attribute instead. +*/ +exports.SEMRESATTRS_FAAS_ID = TMP_FAAS_ID; +/** +* The immutable version of the function being executed. +* +* Note: Depending on the cloud provider and platform, use: + +* **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) + (an integer represented as a decimal string). +* **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) + (i.e., the function name plus the revision suffix). +* **Google Cloud Functions:** The value of the + [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). +* **Azure Functions:** Not applicable. Do not set this attribute. +*/ +exports.SEMRESATTRS_FAAS_VERSION = TMP_FAAS_VERSION; +/** + * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. + * + * Note: * **AWS Lambda:** Use the (full) log stream name. + */ +exports.SEMRESATTRS_FAAS_INSTANCE = TMP_FAAS_INSTANCE; +/** + * The amount of memory available to the serverless function in MiB. + * + * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. + */ +exports.SEMRESATTRS_FAAS_MAX_MEMORY = TMP_FAAS_MAX_MEMORY; +/** + * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. + */ +exports.SEMRESATTRS_HOST_ID = TMP_HOST_ID; +/** + * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. + */ +exports.SEMRESATTRS_HOST_NAME = TMP_HOST_NAME; +/** + * Type of host. For Cloud, this must be the machine type. + */ +exports.SEMRESATTRS_HOST_TYPE = TMP_HOST_TYPE; +/** + * The CPU architecture the host system is running on. + */ +exports.SEMRESATTRS_HOST_ARCH = TMP_HOST_ARCH; +/** + * Name of the VM image or OS install the host was instantiated from. + */ +exports.SEMRESATTRS_HOST_IMAGE_NAME = TMP_HOST_IMAGE_NAME; +/** + * VM image ID. For Cloud, this value is from the provider. + */ +exports.SEMRESATTRS_HOST_IMAGE_ID = TMP_HOST_IMAGE_ID; +/** + * The version string of the VM image as defined in [Version Attributes](README.md#version-attributes). + */ +exports.SEMRESATTRS_HOST_IMAGE_VERSION = TMP_HOST_IMAGE_VERSION; +/** + * The name of the cluster. + */ +exports.SEMRESATTRS_K8S_CLUSTER_NAME = TMP_K8S_CLUSTER_NAME; +/** + * The name of the Node. + */ +exports.SEMRESATTRS_K8S_NODE_NAME = TMP_K8S_NODE_NAME; +/** + * The UID of the Node. + */ +exports.SEMRESATTRS_K8S_NODE_UID = TMP_K8S_NODE_UID; +/** + * The name of the namespace that the pod is running in. + */ +exports.SEMRESATTRS_K8S_NAMESPACE_NAME = TMP_K8S_NAMESPACE_NAME; +/** + * The UID of the Pod. + */ +exports.SEMRESATTRS_K8S_POD_UID = TMP_K8S_POD_UID; +/** + * The name of the Pod. + */ +exports.SEMRESATTRS_K8S_POD_NAME = TMP_K8S_POD_NAME; +/** + * The name of the Container in a Pod template. + */ +exports.SEMRESATTRS_K8S_CONTAINER_NAME = TMP_K8S_CONTAINER_NAME; +/** + * The UID of the ReplicaSet. + */ +exports.SEMRESATTRS_K8S_REPLICASET_UID = TMP_K8S_REPLICASET_UID; +/** + * The name of the ReplicaSet. + */ +exports.SEMRESATTRS_K8S_REPLICASET_NAME = TMP_K8S_REPLICASET_NAME; +/** + * The UID of the Deployment. + */ +exports.SEMRESATTRS_K8S_DEPLOYMENT_UID = TMP_K8S_DEPLOYMENT_UID; +/** + * The name of the Deployment. + */ +exports.SEMRESATTRS_K8S_DEPLOYMENT_NAME = TMP_K8S_DEPLOYMENT_NAME; +/** + * The UID of the StatefulSet. + */ +exports.SEMRESATTRS_K8S_STATEFULSET_UID = TMP_K8S_STATEFULSET_UID; +/** + * The name of the StatefulSet. + */ +exports.SEMRESATTRS_K8S_STATEFULSET_NAME = TMP_K8S_STATEFULSET_NAME; +/** + * The UID of the DaemonSet. + */ +exports.SEMRESATTRS_K8S_DAEMONSET_UID = TMP_K8S_DAEMONSET_UID; +/** + * The name of the DaemonSet. + */ +exports.SEMRESATTRS_K8S_DAEMONSET_NAME = TMP_K8S_DAEMONSET_NAME; +/** + * The UID of the Job. + */ +exports.SEMRESATTRS_K8S_JOB_UID = TMP_K8S_JOB_UID; +/** + * The name of the Job. + */ +exports.SEMRESATTRS_K8S_JOB_NAME = TMP_K8S_JOB_NAME; +/** + * The UID of the CronJob. + */ +exports.SEMRESATTRS_K8S_CRONJOB_UID = TMP_K8S_CRONJOB_UID; +/** + * The name of the CronJob. + */ +exports.SEMRESATTRS_K8S_CRONJOB_NAME = TMP_K8S_CRONJOB_NAME; +/** + * The operating system type. + */ +exports.SEMRESATTRS_OS_TYPE = TMP_OS_TYPE; +/** + * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. + */ +exports.SEMRESATTRS_OS_DESCRIPTION = TMP_OS_DESCRIPTION; +/** + * Human readable operating system name. + */ +exports.SEMRESATTRS_OS_NAME = TMP_OS_NAME; +/** + * The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes). + */ +exports.SEMRESATTRS_OS_VERSION = TMP_OS_VERSION; +/** + * Process identifier (PID). + */ +exports.SEMRESATTRS_PROCESS_PID = TMP_PROCESS_PID; +/** + * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. + */ +exports.SEMRESATTRS_PROCESS_EXECUTABLE_NAME = TMP_PROCESS_EXECUTABLE_NAME; +/** + * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. + */ +exports.SEMRESATTRS_PROCESS_EXECUTABLE_PATH = TMP_PROCESS_EXECUTABLE_PATH; +/** + * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. + */ +exports.SEMRESATTRS_PROCESS_COMMAND = TMP_PROCESS_COMMAND; +/** + * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. + */ +exports.SEMRESATTRS_PROCESS_COMMAND_LINE = TMP_PROCESS_COMMAND_LINE; +/** + * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. + */ +exports.SEMRESATTRS_PROCESS_COMMAND_ARGS = TMP_PROCESS_COMMAND_ARGS; +/** + * The username of the user that owns the process. + */ +exports.SEMRESATTRS_PROCESS_OWNER = TMP_PROCESS_OWNER; +/** + * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. + */ +exports.SEMRESATTRS_PROCESS_RUNTIME_NAME = TMP_PROCESS_RUNTIME_NAME; +/** + * The version of the runtime of this process, as returned by the runtime without modification. + */ +exports.SEMRESATTRS_PROCESS_RUNTIME_VERSION = TMP_PROCESS_RUNTIME_VERSION; +/** + * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. + */ +exports.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = TMP_PROCESS_RUNTIME_DESCRIPTION; +/** + * Logical name of the service. + * + * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. + */ +exports.SEMRESATTRS_SERVICE_NAME = TMP_SERVICE_NAME; +/** + * A namespace for `service.name`. + * + * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. + */ +exports.SEMRESATTRS_SERVICE_NAMESPACE = TMP_SERVICE_NAMESPACE; +/** + * The string ID of the service instance. + * + * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). + */ +exports.SEMRESATTRS_SERVICE_INSTANCE_ID = TMP_SERVICE_INSTANCE_ID; +/** + * The version string of the service API or implementation. + */ +exports.SEMRESATTRS_SERVICE_VERSION = TMP_SERVICE_VERSION; +/** + * The name of the telemetry SDK as defined above. + */ +exports.SEMRESATTRS_TELEMETRY_SDK_NAME = TMP_TELEMETRY_SDK_NAME; +/** + * The language of the telemetry SDK. + */ +exports.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = TMP_TELEMETRY_SDK_LANGUAGE; +/** + * The version string of the telemetry SDK. + */ +exports.SEMRESATTRS_TELEMETRY_SDK_VERSION = TMP_TELEMETRY_SDK_VERSION; +/** + * The version string of the auto instrumentation agent, if used. + */ +exports.SEMRESATTRS_TELEMETRY_AUTO_VERSION = TMP_TELEMETRY_AUTO_VERSION; +/** + * The name of the web engine. + */ +exports.SEMRESATTRS_WEBENGINE_NAME = TMP_WEBENGINE_NAME; +/** + * The version of the web engine. + */ +exports.SEMRESATTRS_WEBENGINE_VERSION = TMP_WEBENGINE_VERSION; +/** + * Additional description of the web engine (e.g. detailed version and edition information). + */ +exports.SEMRESATTRS_WEBENGINE_DESCRIPTION = TMP_WEBENGINE_DESCRIPTION; +/** + * Create exported Value Map for SemanticResourceAttributes values + * @deprecated Use the SEMRESATTRS_XXXXX constants rather than the SemanticResourceAttributes.XXXXX for bundle minification + */ +exports.SemanticResourceAttributes = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_CLOUD_PROVIDER, + TMP_CLOUD_ACCOUNT_ID, + TMP_CLOUD_REGION, + TMP_CLOUD_AVAILABILITY_ZONE, + TMP_CLOUD_PLATFORM, + TMP_AWS_ECS_CONTAINER_ARN, + TMP_AWS_ECS_CLUSTER_ARN, + TMP_AWS_ECS_LAUNCHTYPE, + TMP_AWS_ECS_TASK_ARN, + TMP_AWS_ECS_TASK_FAMILY, + TMP_AWS_ECS_TASK_REVISION, + TMP_AWS_EKS_CLUSTER_ARN, + TMP_AWS_LOG_GROUP_NAMES, + TMP_AWS_LOG_GROUP_ARNS, + TMP_AWS_LOG_STREAM_NAMES, + TMP_AWS_LOG_STREAM_ARNS, + TMP_CONTAINER_NAME, + TMP_CONTAINER_ID, + TMP_CONTAINER_RUNTIME, + TMP_CONTAINER_IMAGE_NAME, + TMP_CONTAINER_IMAGE_TAG, + TMP_DEPLOYMENT_ENVIRONMENT, + TMP_DEVICE_ID, + TMP_DEVICE_MODEL_IDENTIFIER, + TMP_DEVICE_MODEL_NAME, + TMP_FAAS_NAME, + TMP_FAAS_ID, + TMP_FAAS_VERSION, + TMP_FAAS_INSTANCE, + TMP_FAAS_MAX_MEMORY, + TMP_HOST_ID, + TMP_HOST_NAME, + TMP_HOST_TYPE, + TMP_HOST_ARCH, + TMP_HOST_IMAGE_NAME, + TMP_HOST_IMAGE_ID, + TMP_HOST_IMAGE_VERSION, + TMP_K8S_CLUSTER_NAME, + TMP_K8S_NODE_NAME, + TMP_K8S_NODE_UID, + TMP_K8S_NAMESPACE_NAME, + TMP_K8S_POD_UID, + TMP_K8S_POD_NAME, + TMP_K8S_CONTAINER_NAME, + TMP_K8S_REPLICASET_UID, + TMP_K8S_REPLICASET_NAME, + TMP_K8S_DEPLOYMENT_UID, + TMP_K8S_DEPLOYMENT_NAME, + TMP_K8S_STATEFULSET_UID, + TMP_K8S_STATEFULSET_NAME, + TMP_K8S_DAEMONSET_UID, + TMP_K8S_DAEMONSET_NAME, + TMP_K8S_JOB_UID, + TMP_K8S_JOB_NAME, + TMP_K8S_CRONJOB_UID, + TMP_K8S_CRONJOB_NAME, + TMP_OS_TYPE, + TMP_OS_DESCRIPTION, + TMP_OS_NAME, + TMP_OS_VERSION, + TMP_PROCESS_PID, + TMP_PROCESS_EXECUTABLE_NAME, + TMP_PROCESS_EXECUTABLE_PATH, + TMP_PROCESS_COMMAND, + TMP_PROCESS_COMMAND_LINE, + TMP_PROCESS_COMMAND_ARGS, + TMP_PROCESS_OWNER, + TMP_PROCESS_RUNTIME_NAME, + TMP_PROCESS_RUNTIME_VERSION, + TMP_PROCESS_RUNTIME_DESCRIPTION, + TMP_SERVICE_NAME, + TMP_SERVICE_NAMESPACE, + TMP_SERVICE_INSTANCE_ID, + TMP_SERVICE_VERSION, + TMP_TELEMETRY_SDK_NAME, + TMP_TELEMETRY_SDK_LANGUAGE, + TMP_TELEMETRY_SDK_VERSION, + TMP_TELEMETRY_AUTO_VERSION, + TMP_WEBENGINE_NAME, + TMP_WEBENGINE_VERSION, + TMP_WEBENGINE_DESCRIPTION, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for CloudProviderValues enum definition + * + * Name of the cloud provider. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud'; +const TMP_CLOUDPROVIDERVALUES_AWS = 'aws'; +const TMP_CLOUDPROVIDERVALUES_AZURE = 'azure'; +const TMP_CLOUDPROVIDERVALUES_GCP = 'gcp'; +/** + * Name of the cloud provider. + */ +exports.CLOUDPROVIDERVALUES_ALIBABA_CLOUD = TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD; +/** + * Name of the cloud provider. + */ +exports.CLOUDPROVIDERVALUES_AWS = TMP_CLOUDPROVIDERVALUES_AWS; +/** + * Name of the cloud provider. + */ +exports.CLOUDPROVIDERVALUES_AZURE = TMP_CLOUDPROVIDERVALUES_AZURE; +/** + * Name of the cloud provider. + */ +exports.CLOUDPROVIDERVALUES_GCP = TMP_CLOUDPROVIDERVALUES_GCP; +/** + * The constant map of values for CloudProviderValues. + * @deprecated Use the CLOUDPROVIDERVALUES_XXXXX constants rather than the CloudProviderValues.XXXXX for bundle minification. + */ +exports.CloudProviderValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD, + TMP_CLOUDPROVIDERVALUES_AWS, + TMP_CLOUDPROVIDERVALUES_AZURE, + TMP_CLOUDPROVIDERVALUES_GCP, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for CloudPlatformValues enum definition + * + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = 'alibaba_cloud_ecs'; +const TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = 'alibaba_cloud_fc'; +const TMP_CLOUDPLATFORMVALUES_AWS_EC2 = 'aws_ec2'; +const TMP_CLOUDPLATFORMVALUES_AWS_ECS = 'aws_ecs'; +const TMP_CLOUDPLATFORMVALUES_AWS_EKS = 'aws_eks'; +const TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA = 'aws_lambda'; +const TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = 'aws_elastic_beanstalk'; +const TMP_CLOUDPLATFORMVALUES_AZURE_VM = 'azure_vm'; +const TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = 'azure_container_instances'; +const TMP_CLOUDPLATFORMVALUES_AZURE_AKS = 'azure_aks'; +const TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = 'azure_functions'; +const TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = 'azure_app_service'; +const TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = 'gcp_compute_engine'; +const TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = 'gcp_cloud_run'; +const TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = 'gcp_kubernetes_engine'; +const TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = 'gcp_cloud_functions'; +const TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE = 'gcp_app_engine'; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_AWS_EC2 = TMP_CLOUDPLATFORMVALUES_AWS_EC2; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_AWS_ECS = TMP_CLOUDPLATFORMVALUES_AWS_ECS; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_AWS_EKS = TMP_CLOUDPLATFORMVALUES_AWS_EKS; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_AWS_LAMBDA = TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_AZURE_VM = TMP_CLOUDPLATFORMVALUES_AZURE_VM; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_AZURE_AKS = TMP_CLOUDPLATFORMVALUES_AZURE_AKS; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS; +/** + * The cloud platform in use. + * + * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. + */ +exports.CLOUDPLATFORMVALUES_GCP_APP_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE; +/** + * The constant map of values for CloudPlatformValues. + * @deprecated Use the CLOUDPLATFORMVALUES_XXXXX constants rather than the CloudPlatformValues.XXXXX for bundle minification. + */ +exports.CloudPlatformValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS, + TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC, + TMP_CLOUDPLATFORMVALUES_AWS_EC2, + TMP_CLOUDPLATFORMVALUES_AWS_ECS, + TMP_CLOUDPLATFORMVALUES_AWS_EKS, + TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA, + TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK, + TMP_CLOUDPLATFORMVALUES_AZURE_VM, + TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES, + TMP_CLOUDPLATFORMVALUES_AZURE_AKS, + TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS, + TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE, + TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE, + TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN, + TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE, + TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS, + TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for AwsEcsLaunchtypeValues enum definition + * + * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_AWSECSLAUNCHTYPEVALUES_EC2 = 'ec2'; +const TMP_AWSECSLAUNCHTYPEVALUES_FARGATE = 'fargate'; +/** + * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + */ +exports.AWSECSLAUNCHTYPEVALUES_EC2 = TMP_AWSECSLAUNCHTYPEVALUES_EC2; +/** + * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. + */ +exports.AWSECSLAUNCHTYPEVALUES_FARGATE = TMP_AWSECSLAUNCHTYPEVALUES_FARGATE; +/** + * The constant map of values for AwsEcsLaunchtypeValues. + * @deprecated Use the AWSECSLAUNCHTYPEVALUES_XXXXX constants rather than the AwsEcsLaunchtypeValues.XXXXX for bundle minification. + */ +exports.AwsEcsLaunchtypeValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_AWSECSLAUNCHTYPEVALUES_EC2, + TMP_AWSECSLAUNCHTYPEVALUES_FARGATE, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for HostArchValues enum definition + * + * The CPU architecture the host system is running on. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_HOSTARCHVALUES_AMD64 = 'amd64'; +const TMP_HOSTARCHVALUES_ARM32 = 'arm32'; +const TMP_HOSTARCHVALUES_ARM64 = 'arm64'; +const TMP_HOSTARCHVALUES_IA64 = 'ia64'; +const TMP_HOSTARCHVALUES_PPC32 = 'ppc32'; +const TMP_HOSTARCHVALUES_PPC64 = 'ppc64'; +const TMP_HOSTARCHVALUES_X86 = 'x86'; +/** + * The CPU architecture the host system is running on. + */ +exports.HOSTARCHVALUES_AMD64 = TMP_HOSTARCHVALUES_AMD64; +/** + * The CPU architecture the host system is running on. + */ +exports.HOSTARCHVALUES_ARM32 = TMP_HOSTARCHVALUES_ARM32; +/** + * The CPU architecture the host system is running on. + */ +exports.HOSTARCHVALUES_ARM64 = TMP_HOSTARCHVALUES_ARM64; +/** + * The CPU architecture the host system is running on. + */ +exports.HOSTARCHVALUES_IA64 = TMP_HOSTARCHVALUES_IA64; +/** + * The CPU architecture the host system is running on. + */ +exports.HOSTARCHVALUES_PPC32 = TMP_HOSTARCHVALUES_PPC32; +/** + * The CPU architecture the host system is running on. + */ +exports.HOSTARCHVALUES_PPC64 = TMP_HOSTARCHVALUES_PPC64; +/** + * The CPU architecture the host system is running on. + */ +exports.HOSTARCHVALUES_X86 = TMP_HOSTARCHVALUES_X86; +/** + * The constant map of values for HostArchValues. + * @deprecated Use the HOSTARCHVALUES_XXXXX constants rather than the HostArchValues.XXXXX for bundle minification. + */ +exports.HostArchValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_HOSTARCHVALUES_AMD64, + TMP_HOSTARCHVALUES_ARM32, + TMP_HOSTARCHVALUES_ARM64, + TMP_HOSTARCHVALUES_IA64, + TMP_HOSTARCHVALUES_PPC32, + TMP_HOSTARCHVALUES_PPC64, + TMP_HOSTARCHVALUES_X86, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for OsTypeValues enum definition + * + * The operating system type. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_OSTYPEVALUES_WINDOWS = 'windows'; +const TMP_OSTYPEVALUES_LINUX = 'linux'; +const TMP_OSTYPEVALUES_DARWIN = 'darwin'; +const TMP_OSTYPEVALUES_FREEBSD = 'freebsd'; +const TMP_OSTYPEVALUES_NETBSD = 'netbsd'; +const TMP_OSTYPEVALUES_OPENBSD = 'openbsd'; +const TMP_OSTYPEVALUES_DRAGONFLYBSD = 'dragonflybsd'; +const TMP_OSTYPEVALUES_HPUX = 'hpux'; +const TMP_OSTYPEVALUES_AIX = 'aix'; +const TMP_OSTYPEVALUES_SOLARIS = 'solaris'; +const TMP_OSTYPEVALUES_Z_OS = 'z_os'; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_WINDOWS = TMP_OSTYPEVALUES_WINDOWS; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_LINUX = TMP_OSTYPEVALUES_LINUX; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_DARWIN = TMP_OSTYPEVALUES_DARWIN; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_FREEBSD = TMP_OSTYPEVALUES_FREEBSD; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_NETBSD = TMP_OSTYPEVALUES_NETBSD; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_OPENBSD = TMP_OSTYPEVALUES_OPENBSD; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_DRAGONFLYBSD = TMP_OSTYPEVALUES_DRAGONFLYBSD; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_HPUX = TMP_OSTYPEVALUES_HPUX; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_AIX = TMP_OSTYPEVALUES_AIX; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_SOLARIS = TMP_OSTYPEVALUES_SOLARIS; +/** + * The operating system type. + */ +exports.OSTYPEVALUES_Z_OS = TMP_OSTYPEVALUES_Z_OS; +/** + * The constant map of values for OsTypeValues. + * @deprecated Use the OSTYPEVALUES_XXXXX constants rather than the OsTypeValues.XXXXX for bundle minification. + */ +exports.OsTypeValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_OSTYPEVALUES_WINDOWS, + TMP_OSTYPEVALUES_LINUX, + TMP_OSTYPEVALUES_DARWIN, + TMP_OSTYPEVALUES_FREEBSD, + TMP_OSTYPEVALUES_NETBSD, + TMP_OSTYPEVALUES_OPENBSD, + TMP_OSTYPEVALUES_DRAGONFLYBSD, + TMP_OSTYPEVALUES_HPUX, + TMP_OSTYPEVALUES_AIX, + TMP_OSTYPEVALUES_SOLARIS, + TMP_OSTYPEVALUES_Z_OS, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for TelemetrySdkLanguageValues enum definition + * + * The language of the telemetry SDK. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_TELEMETRYSDKLANGUAGEVALUES_CPP = 'cpp'; +const TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET = 'dotnet'; +const TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG = 'erlang'; +const TMP_TELEMETRYSDKLANGUAGEVALUES_GO = 'go'; +const TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA = 'java'; +const TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS = 'nodejs'; +const TMP_TELEMETRYSDKLANGUAGEVALUES_PHP = 'php'; +const TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON = 'python'; +const TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY = 'ruby'; +const TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS = 'webjs'; +/** + * The language of the telemetry SDK. + */ +exports.TELEMETRYSDKLANGUAGEVALUES_CPP = TMP_TELEMETRYSDKLANGUAGEVALUES_CPP; +/** + * The language of the telemetry SDK. + */ +exports.TELEMETRYSDKLANGUAGEVALUES_DOTNET = TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET; +/** + * The language of the telemetry SDK. + */ +exports.TELEMETRYSDKLANGUAGEVALUES_ERLANG = TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG; +/** + * The language of the telemetry SDK. + */ +exports.TELEMETRYSDKLANGUAGEVALUES_GO = TMP_TELEMETRYSDKLANGUAGEVALUES_GO; +/** + * The language of the telemetry SDK. + */ +exports.TELEMETRYSDKLANGUAGEVALUES_JAVA = TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA; +/** + * The language of the telemetry SDK. + */ +exports.TELEMETRYSDKLANGUAGEVALUES_NODEJS = TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS; +/** + * The language of the telemetry SDK. + */ +exports.TELEMETRYSDKLANGUAGEVALUES_PHP = TMP_TELEMETRYSDKLANGUAGEVALUES_PHP; +/** + * The language of the telemetry SDK. + */ +exports.TELEMETRYSDKLANGUAGEVALUES_PYTHON = TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON; +/** + * The language of the telemetry SDK. + */ +exports.TELEMETRYSDKLANGUAGEVALUES_RUBY = TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY; +/** + * The language of the telemetry SDK. + */ +exports.TELEMETRYSDKLANGUAGEVALUES_WEBJS = TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS; +/** + * The constant map of values for TelemetrySdkLanguageValues. + * @deprecated Use the TELEMETRYSDKLANGUAGEVALUES_XXXXX constants rather than the TelemetrySdkLanguageValues.XXXXX for bundle minification. + */ +exports.TelemetrySdkLanguageValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_TELEMETRYSDKLANGUAGEVALUES_CPP, + TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET, + TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG, + TMP_TELEMETRYSDKLANGUAGEVALUES_GO, + TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA, + TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS, + TMP_TELEMETRYSDKLANGUAGEVALUES_PHP, + TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON, + TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY, + TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS, +]); //# sourceMappingURL=SemanticResourceAttributes.js.map /***/ }), @@ -63180,913 +66525,1887 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /* * Copyright The OpenTelemetry Authors * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +__exportStar(__nccwpck_require__(85003), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 89943: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SEMATTRS_NET_HOST_CARRIER_ICC = exports.SEMATTRS_NET_HOST_CARRIER_MNC = exports.SEMATTRS_NET_HOST_CARRIER_MCC = exports.SEMATTRS_NET_HOST_CARRIER_NAME = exports.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = exports.SEMATTRS_NET_HOST_CONNECTION_TYPE = exports.SEMATTRS_NET_HOST_NAME = exports.SEMATTRS_NET_HOST_PORT = exports.SEMATTRS_NET_HOST_IP = exports.SEMATTRS_NET_PEER_NAME = exports.SEMATTRS_NET_PEER_PORT = exports.SEMATTRS_NET_PEER_IP = exports.SEMATTRS_NET_TRANSPORT = exports.SEMATTRS_FAAS_INVOKED_REGION = exports.SEMATTRS_FAAS_INVOKED_PROVIDER = exports.SEMATTRS_FAAS_INVOKED_NAME = exports.SEMATTRS_FAAS_COLDSTART = exports.SEMATTRS_FAAS_CRON = exports.SEMATTRS_FAAS_TIME = exports.SEMATTRS_FAAS_DOCUMENT_NAME = exports.SEMATTRS_FAAS_DOCUMENT_TIME = exports.SEMATTRS_FAAS_DOCUMENT_OPERATION = exports.SEMATTRS_FAAS_DOCUMENT_COLLECTION = exports.SEMATTRS_FAAS_EXECUTION = exports.SEMATTRS_FAAS_TRIGGER = exports.SEMATTRS_EXCEPTION_ESCAPED = exports.SEMATTRS_EXCEPTION_STACKTRACE = exports.SEMATTRS_EXCEPTION_MESSAGE = exports.SEMATTRS_EXCEPTION_TYPE = exports.SEMATTRS_DB_SQL_TABLE = exports.SEMATTRS_DB_MONGODB_COLLECTION = exports.SEMATTRS_DB_REDIS_DATABASE_INDEX = exports.SEMATTRS_DB_HBASE_NAMESPACE = exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = exports.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = exports.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = exports.SEMATTRS_DB_CASSANDRA_TABLE = exports.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = exports.SEMATTRS_DB_CASSANDRA_PAGE_SIZE = exports.SEMATTRS_DB_CASSANDRA_KEYSPACE = exports.SEMATTRS_DB_MSSQL_INSTANCE_NAME = exports.SEMATTRS_DB_OPERATION = exports.SEMATTRS_DB_STATEMENT = exports.SEMATTRS_DB_NAME = exports.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = exports.SEMATTRS_DB_USER = exports.SEMATTRS_DB_CONNECTION_STRING = exports.SEMATTRS_DB_SYSTEM = exports.SEMATTRS_AWS_LAMBDA_INVOKED_ARN = void 0; +exports.SEMATTRS_MESSAGING_DESTINATION_KIND = exports.SEMATTRS_MESSAGING_DESTINATION = exports.SEMATTRS_MESSAGING_SYSTEM = exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = exports.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = exports.SEMATTRS_AWS_DYNAMODB_COUNT = exports.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = exports.SEMATTRS_AWS_DYNAMODB_SEGMENT = exports.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = exports.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = exports.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = exports.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = exports.SEMATTRS_AWS_DYNAMODB_SELECT = exports.SEMATTRS_AWS_DYNAMODB_INDEX_NAME = exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = exports.SEMATTRS_AWS_DYNAMODB_LIMIT = exports.SEMATTRS_AWS_DYNAMODB_PROJECTION = exports.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = exports.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = exports.SEMATTRS_HTTP_CLIENT_IP = exports.SEMATTRS_HTTP_ROUTE = exports.SEMATTRS_HTTP_SERVER_NAME = exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = exports.SEMATTRS_HTTP_USER_AGENT = exports.SEMATTRS_HTTP_FLAVOR = exports.SEMATTRS_HTTP_STATUS_CODE = exports.SEMATTRS_HTTP_SCHEME = exports.SEMATTRS_HTTP_HOST = exports.SEMATTRS_HTTP_TARGET = exports.SEMATTRS_HTTP_URL = exports.SEMATTRS_HTTP_METHOD = exports.SEMATTRS_CODE_LINENO = exports.SEMATTRS_CODE_FILEPATH = exports.SEMATTRS_CODE_NAMESPACE = exports.SEMATTRS_CODE_FUNCTION = exports.SEMATTRS_THREAD_NAME = exports.SEMATTRS_THREAD_ID = exports.SEMATTRS_ENDUSER_SCOPE = exports.SEMATTRS_ENDUSER_ROLE = exports.SEMATTRS_ENDUSER_ID = exports.SEMATTRS_PEER_SERVICE = void 0; +exports.DBSYSTEMVALUES_FILEMAKER = exports.DBSYSTEMVALUES_DERBY = exports.DBSYSTEMVALUES_FIREBIRD = exports.DBSYSTEMVALUES_ADABAS = exports.DBSYSTEMVALUES_CACHE = exports.DBSYSTEMVALUES_EDB = exports.DBSYSTEMVALUES_FIRSTSQL = exports.DBSYSTEMVALUES_INGRES = exports.DBSYSTEMVALUES_HANADB = exports.DBSYSTEMVALUES_MAXDB = exports.DBSYSTEMVALUES_PROGRESS = exports.DBSYSTEMVALUES_HSQLDB = exports.DBSYSTEMVALUES_CLOUDSCAPE = exports.DBSYSTEMVALUES_HIVE = exports.DBSYSTEMVALUES_REDSHIFT = exports.DBSYSTEMVALUES_POSTGRESQL = exports.DBSYSTEMVALUES_DB2 = exports.DBSYSTEMVALUES_ORACLE = exports.DBSYSTEMVALUES_MYSQL = exports.DBSYSTEMVALUES_MSSQL = exports.DBSYSTEMVALUES_OTHER_SQL = exports.SemanticAttributes = exports.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = exports.SEMATTRS_MESSAGE_COMPRESSED_SIZE = exports.SEMATTRS_MESSAGE_ID = exports.SEMATTRS_MESSAGE_TYPE = exports.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = exports.SEMATTRS_RPC_JSONRPC_ERROR_CODE = exports.SEMATTRS_RPC_JSONRPC_REQUEST_ID = exports.SEMATTRS_RPC_JSONRPC_VERSION = exports.SEMATTRS_RPC_GRPC_STATUS_CODE = exports.SEMATTRS_RPC_METHOD = exports.SEMATTRS_RPC_SERVICE = exports.SEMATTRS_RPC_SYSTEM = exports.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = exports.SEMATTRS_MESSAGING_KAFKA_PARTITION = exports.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = exports.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = exports.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = exports.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = exports.SEMATTRS_MESSAGING_CONSUMER_ID = exports.SEMATTRS_MESSAGING_OPERATION = exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = exports.SEMATTRS_MESSAGING_CONVERSATION_ID = exports.SEMATTRS_MESSAGING_MESSAGE_ID = exports.SEMATTRS_MESSAGING_URL = exports.SEMATTRS_MESSAGING_PROTOCOL_VERSION = exports.SEMATTRS_MESSAGING_PROTOCOL = exports.SEMATTRS_MESSAGING_TEMP_DESTINATION = void 0; +exports.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = exports.FaasDocumentOperationValues = exports.FAASDOCUMENTOPERATIONVALUES_DELETE = exports.FAASDOCUMENTOPERATIONVALUES_EDIT = exports.FAASDOCUMENTOPERATIONVALUES_INSERT = exports.FaasTriggerValues = exports.FAASTRIGGERVALUES_OTHER = exports.FAASTRIGGERVALUES_TIMER = exports.FAASTRIGGERVALUES_PUBSUB = exports.FAASTRIGGERVALUES_HTTP = exports.FAASTRIGGERVALUES_DATASOURCE = exports.DbCassandraConsistencyLevelValues = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = exports.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ANY = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_THREE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_TWO = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ONE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ALL = exports.DbSystemValues = exports.DBSYSTEMVALUES_COCKROACHDB = exports.DBSYSTEMVALUES_MEMCACHED = exports.DBSYSTEMVALUES_ELASTICSEARCH = exports.DBSYSTEMVALUES_GEODE = exports.DBSYSTEMVALUES_NEO4J = exports.DBSYSTEMVALUES_DYNAMODB = exports.DBSYSTEMVALUES_COSMOSDB = exports.DBSYSTEMVALUES_COUCHDB = exports.DBSYSTEMVALUES_COUCHBASE = exports.DBSYSTEMVALUES_REDIS = exports.DBSYSTEMVALUES_MONGODB = exports.DBSYSTEMVALUES_HBASE = exports.DBSYSTEMVALUES_CASSANDRA = exports.DBSYSTEMVALUES_COLDFUSION = exports.DBSYSTEMVALUES_H2 = exports.DBSYSTEMVALUES_VERTICA = exports.DBSYSTEMVALUES_TERADATA = exports.DBSYSTEMVALUES_SYBASE = exports.DBSYSTEMVALUES_SQLITE = exports.DBSYSTEMVALUES_POINTBASE = exports.DBSYSTEMVALUES_PERVASIVE = exports.DBSYSTEMVALUES_NETEZZA = exports.DBSYSTEMVALUES_MARIADB = exports.DBSYSTEMVALUES_INTERBASE = exports.DBSYSTEMVALUES_INSTANTDB = exports.DBSYSTEMVALUES_INFORMIX = void 0; +exports.MESSAGINGOPERATIONVALUES_RECEIVE = exports.MessagingDestinationKindValues = exports.MESSAGINGDESTINATIONKINDVALUES_TOPIC = exports.MESSAGINGDESTINATIONKINDVALUES_QUEUE = exports.HttpFlavorValues = exports.HTTPFLAVORVALUES_QUIC = exports.HTTPFLAVORVALUES_SPDY = exports.HTTPFLAVORVALUES_HTTP_2_0 = exports.HTTPFLAVORVALUES_HTTP_1_1 = exports.HTTPFLAVORVALUES_HTTP_1_0 = exports.NetHostConnectionSubtypeValues = exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_NR = exports.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = exports.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_GSM = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = exports.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = exports.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = exports.NetHostConnectionTypeValues = exports.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = exports.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = exports.NETHOSTCONNECTIONTYPEVALUES_CELL = exports.NETHOSTCONNECTIONTYPEVALUES_WIRED = exports.NETHOSTCONNECTIONTYPEVALUES_WIFI = exports.NetTransportValues = exports.NETTRANSPORTVALUES_OTHER = exports.NETTRANSPORTVALUES_INPROC = exports.NETTRANSPORTVALUES_PIPE = exports.NETTRANSPORTVALUES_UNIX = exports.NETTRANSPORTVALUES_IP = exports.NETTRANSPORTVALUES_IP_UDP = exports.NETTRANSPORTVALUES_IP_TCP = exports.FaasInvokedProviderValues = exports.FAASINVOKEDPROVIDERVALUES_GCP = exports.FAASINVOKEDPROVIDERVALUES_AZURE = exports.FAASINVOKEDPROVIDERVALUES_AWS = void 0; +exports.MessageTypeValues = exports.MESSAGETYPEVALUES_RECEIVED = exports.MESSAGETYPEVALUES_SENT = exports.RpcGrpcStatusCodeValues = exports.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = exports.RPCGRPCSTATUSCODEVALUES_DATA_LOSS = exports.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = exports.RPCGRPCSTATUSCODEVALUES_INTERNAL = exports.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = exports.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = exports.RPCGRPCSTATUSCODEVALUES_ABORTED = exports.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = exports.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = exports.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = exports.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = exports.RPCGRPCSTATUSCODEVALUES_NOT_FOUND = exports.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = exports.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = exports.RPCGRPCSTATUSCODEVALUES_UNKNOWN = exports.RPCGRPCSTATUSCODEVALUES_CANCELLED = exports.RPCGRPCSTATUSCODEVALUES_OK = exports.MessagingOperationValues = exports.MESSAGINGOPERATIONVALUES_PROCESS = void 0; +const utils_1 = __nccwpck_require__(749); +//---------------------------------------------------------------------------------------------------------- +// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 +//---------------------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------------------- +// Constant values for SemanticAttributes +//---------------------------------------------------------------------------------------------------------- +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn'; +const TMP_DB_SYSTEM = 'db.system'; +const TMP_DB_CONNECTION_STRING = 'db.connection_string'; +const TMP_DB_USER = 'db.user'; +const TMP_DB_JDBC_DRIVER_CLASSNAME = 'db.jdbc.driver_classname'; +const TMP_DB_NAME = 'db.name'; +const TMP_DB_STATEMENT = 'db.statement'; +const TMP_DB_OPERATION = 'db.operation'; +const TMP_DB_MSSQL_INSTANCE_NAME = 'db.mssql.instance_name'; +const TMP_DB_CASSANDRA_KEYSPACE = 'db.cassandra.keyspace'; +const TMP_DB_CASSANDRA_PAGE_SIZE = 'db.cassandra.page_size'; +const TMP_DB_CASSANDRA_CONSISTENCY_LEVEL = 'db.cassandra.consistency_level'; +const TMP_DB_CASSANDRA_TABLE = 'db.cassandra.table'; +const TMP_DB_CASSANDRA_IDEMPOTENCE = 'db.cassandra.idempotence'; +const TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = 'db.cassandra.speculative_execution_count'; +const TMP_DB_CASSANDRA_COORDINATOR_ID = 'db.cassandra.coordinator.id'; +const TMP_DB_CASSANDRA_COORDINATOR_DC = 'db.cassandra.coordinator.dc'; +const TMP_DB_HBASE_NAMESPACE = 'db.hbase.namespace'; +const TMP_DB_REDIS_DATABASE_INDEX = 'db.redis.database_index'; +const TMP_DB_MONGODB_COLLECTION = 'db.mongodb.collection'; +const TMP_DB_SQL_TABLE = 'db.sql.table'; +const TMP_EXCEPTION_TYPE = 'exception.type'; +const TMP_EXCEPTION_MESSAGE = 'exception.message'; +const TMP_EXCEPTION_STACKTRACE = 'exception.stacktrace'; +const TMP_EXCEPTION_ESCAPED = 'exception.escaped'; +const TMP_FAAS_TRIGGER = 'faas.trigger'; +const TMP_FAAS_EXECUTION = 'faas.execution'; +const TMP_FAAS_DOCUMENT_COLLECTION = 'faas.document.collection'; +const TMP_FAAS_DOCUMENT_OPERATION = 'faas.document.operation'; +const TMP_FAAS_DOCUMENT_TIME = 'faas.document.time'; +const TMP_FAAS_DOCUMENT_NAME = 'faas.document.name'; +const TMP_FAAS_TIME = 'faas.time'; +const TMP_FAAS_CRON = 'faas.cron'; +const TMP_FAAS_COLDSTART = 'faas.coldstart'; +const TMP_FAAS_INVOKED_NAME = 'faas.invoked_name'; +const TMP_FAAS_INVOKED_PROVIDER = 'faas.invoked_provider'; +const TMP_FAAS_INVOKED_REGION = 'faas.invoked_region'; +const TMP_NET_TRANSPORT = 'net.transport'; +const TMP_NET_PEER_IP = 'net.peer.ip'; +const TMP_NET_PEER_PORT = 'net.peer.port'; +const TMP_NET_PEER_NAME = 'net.peer.name'; +const TMP_NET_HOST_IP = 'net.host.ip'; +const TMP_NET_HOST_PORT = 'net.host.port'; +const TMP_NET_HOST_NAME = 'net.host.name'; +const TMP_NET_HOST_CONNECTION_TYPE = 'net.host.connection.type'; +const TMP_NET_HOST_CONNECTION_SUBTYPE = 'net.host.connection.subtype'; +const TMP_NET_HOST_CARRIER_NAME = 'net.host.carrier.name'; +const TMP_NET_HOST_CARRIER_MCC = 'net.host.carrier.mcc'; +const TMP_NET_HOST_CARRIER_MNC = 'net.host.carrier.mnc'; +const TMP_NET_HOST_CARRIER_ICC = 'net.host.carrier.icc'; +const TMP_PEER_SERVICE = 'peer.service'; +const TMP_ENDUSER_ID = 'enduser.id'; +const TMP_ENDUSER_ROLE = 'enduser.role'; +const TMP_ENDUSER_SCOPE = 'enduser.scope'; +const TMP_THREAD_ID = 'thread.id'; +const TMP_THREAD_NAME = 'thread.name'; +const TMP_CODE_FUNCTION = 'code.function'; +const TMP_CODE_NAMESPACE = 'code.namespace'; +const TMP_CODE_FILEPATH = 'code.filepath'; +const TMP_CODE_LINENO = 'code.lineno'; +const TMP_HTTP_METHOD = 'http.method'; +const TMP_HTTP_URL = 'http.url'; +const TMP_HTTP_TARGET = 'http.target'; +const TMP_HTTP_HOST = 'http.host'; +const TMP_HTTP_SCHEME = 'http.scheme'; +const TMP_HTTP_STATUS_CODE = 'http.status_code'; +const TMP_HTTP_FLAVOR = 'http.flavor'; +const TMP_HTTP_USER_AGENT = 'http.user_agent'; +const TMP_HTTP_REQUEST_CONTENT_LENGTH = 'http.request_content_length'; +const TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed'; +const TMP_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length'; +const TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed'; +const TMP_HTTP_SERVER_NAME = 'http.server_name'; +const TMP_HTTP_ROUTE = 'http.route'; +const TMP_HTTP_CLIENT_IP = 'http.client_ip'; +const TMP_AWS_DYNAMODB_TABLE_NAMES = 'aws.dynamodb.table_names'; +const TMP_AWS_DYNAMODB_CONSUMED_CAPACITY = 'aws.dynamodb.consumed_capacity'; +const TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = 'aws.dynamodb.item_collection_metrics'; +const TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = 'aws.dynamodb.provisioned_read_capacity'; +const TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = 'aws.dynamodb.provisioned_write_capacity'; +const TMP_AWS_DYNAMODB_CONSISTENT_READ = 'aws.dynamodb.consistent_read'; +const TMP_AWS_DYNAMODB_PROJECTION = 'aws.dynamodb.projection'; +const TMP_AWS_DYNAMODB_LIMIT = 'aws.dynamodb.limit'; +const TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET = 'aws.dynamodb.attributes_to_get'; +const TMP_AWS_DYNAMODB_INDEX_NAME = 'aws.dynamodb.index_name'; +const TMP_AWS_DYNAMODB_SELECT = 'aws.dynamodb.select'; +const TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = 'aws.dynamodb.global_secondary_indexes'; +const TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = 'aws.dynamodb.local_secondary_indexes'; +const TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = 'aws.dynamodb.exclusive_start_table'; +const TMP_AWS_DYNAMODB_TABLE_COUNT = 'aws.dynamodb.table_count'; +const TMP_AWS_DYNAMODB_SCAN_FORWARD = 'aws.dynamodb.scan_forward'; +const TMP_AWS_DYNAMODB_SEGMENT = 'aws.dynamodb.segment'; +const TMP_AWS_DYNAMODB_TOTAL_SEGMENTS = 'aws.dynamodb.total_segments'; +const TMP_AWS_DYNAMODB_COUNT = 'aws.dynamodb.count'; +const TMP_AWS_DYNAMODB_SCANNED_COUNT = 'aws.dynamodb.scanned_count'; +const TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = 'aws.dynamodb.attribute_definitions'; +const TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = 'aws.dynamodb.global_secondary_index_updates'; +const TMP_MESSAGING_SYSTEM = 'messaging.system'; +const TMP_MESSAGING_DESTINATION = 'messaging.destination'; +const TMP_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind'; +const TMP_MESSAGING_TEMP_DESTINATION = 'messaging.temp_destination'; +const TMP_MESSAGING_PROTOCOL = 'messaging.protocol'; +const TMP_MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version'; +const TMP_MESSAGING_URL = 'messaging.url'; +const TMP_MESSAGING_MESSAGE_ID = 'messaging.message_id'; +const TMP_MESSAGING_CONVERSATION_ID = 'messaging.conversation_id'; +const TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = 'messaging.message_payload_size_bytes'; +const TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = 'messaging.message_payload_compressed_size_bytes'; +const TMP_MESSAGING_OPERATION = 'messaging.operation'; +const TMP_MESSAGING_CONSUMER_ID = 'messaging.consumer_id'; +const TMP_MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key'; +const TMP_MESSAGING_KAFKA_MESSAGE_KEY = 'messaging.kafka.message_key'; +const TMP_MESSAGING_KAFKA_CONSUMER_GROUP = 'messaging.kafka.consumer_group'; +const TMP_MESSAGING_KAFKA_CLIENT_ID = 'messaging.kafka.client_id'; +const TMP_MESSAGING_KAFKA_PARTITION = 'messaging.kafka.partition'; +const TMP_MESSAGING_KAFKA_TOMBSTONE = 'messaging.kafka.tombstone'; +const TMP_RPC_SYSTEM = 'rpc.system'; +const TMP_RPC_SERVICE = 'rpc.service'; +const TMP_RPC_METHOD = 'rpc.method'; +const TMP_RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code'; +const TMP_RPC_JSONRPC_VERSION = 'rpc.jsonrpc.version'; +const TMP_RPC_JSONRPC_REQUEST_ID = 'rpc.jsonrpc.request_id'; +const TMP_RPC_JSONRPC_ERROR_CODE = 'rpc.jsonrpc.error_code'; +const TMP_RPC_JSONRPC_ERROR_MESSAGE = 'rpc.jsonrpc.error_message'; +const TMP_MESSAGE_TYPE = 'message.type'; +const TMP_MESSAGE_ID = 'message.id'; +const TMP_MESSAGE_COMPRESSED_SIZE = 'message.compressed_size'; +const TMP_MESSAGE_UNCOMPRESSED_SIZE = 'message.uncompressed_size'; +/** + * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). + * + * Note: This may be different from `faas.id` if an alias is involved. + */ +exports.SEMATTRS_AWS_LAMBDA_INVOKED_ARN = TMP_AWS_LAMBDA_INVOKED_ARN; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.SEMATTRS_DB_SYSTEM = TMP_DB_SYSTEM; +/** + * The connection string used to connect to the database. It is recommended to remove embedded credentials. + */ +exports.SEMATTRS_DB_CONNECTION_STRING = TMP_DB_CONNECTION_STRING; +/** + * Username for accessing the database. + */ +exports.SEMATTRS_DB_USER = TMP_DB_USER; +/** + * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. + */ +exports.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = TMP_DB_JDBC_DRIVER_CLASSNAME; +/** + * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). + * + * Note: In some SQL databases, the database name to be used is called "schema name". + */ +exports.SEMATTRS_DB_NAME = TMP_DB_NAME; +/** + * The database statement being executed. + * + * Note: The value may be sanitized to exclude sensitive information. + */ +exports.SEMATTRS_DB_STATEMENT = TMP_DB_STATEMENT; +/** + * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. + * + * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. + */ +exports.SEMATTRS_DB_OPERATION = TMP_DB_OPERATION; +/** + * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. + * + * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). + */ +exports.SEMATTRS_DB_MSSQL_INSTANCE_NAME = TMP_DB_MSSQL_INSTANCE_NAME; +/** + * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. + */ +exports.SEMATTRS_DB_CASSANDRA_KEYSPACE = TMP_DB_CASSANDRA_KEYSPACE; +/** + * The fetch size used for paging, i.e. how many rows will be returned at once. + */ +exports.SEMATTRS_DB_CASSANDRA_PAGE_SIZE = TMP_DB_CASSANDRA_PAGE_SIZE; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = TMP_DB_CASSANDRA_CONSISTENCY_LEVEL; +/** + * The name of the primary table that the operation is acting upon, including the schema name (if applicable). + * + * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. + */ +exports.SEMATTRS_DB_CASSANDRA_TABLE = TMP_DB_CASSANDRA_TABLE; +/** + * Whether or not the query is idempotent. + */ +exports.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = TMP_DB_CASSANDRA_IDEMPOTENCE; +/** + * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. + */ +exports.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT; +/** + * The ID of the coordinating node for a query. + */ +exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = TMP_DB_CASSANDRA_COORDINATOR_ID; +/** + * The data center of the coordinating node for a query. + */ +exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = TMP_DB_CASSANDRA_COORDINATOR_DC; +/** + * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. + */ +exports.SEMATTRS_DB_HBASE_NAMESPACE = TMP_DB_HBASE_NAMESPACE; +/** + * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. + */ +exports.SEMATTRS_DB_REDIS_DATABASE_INDEX = TMP_DB_REDIS_DATABASE_INDEX; +/** + * The collection being accessed within the database stated in `db.name`. + */ +exports.SEMATTRS_DB_MONGODB_COLLECTION = TMP_DB_MONGODB_COLLECTION; +/** + * The name of the primary table that the operation is acting upon, including the schema name (if applicable). + * + * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. + */ +exports.SEMATTRS_DB_SQL_TABLE = TMP_DB_SQL_TABLE; +/** + * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. + */ +exports.SEMATTRS_EXCEPTION_TYPE = TMP_EXCEPTION_TYPE; +/** + * The exception message. + */ +exports.SEMATTRS_EXCEPTION_MESSAGE = TMP_EXCEPTION_MESSAGE; +/** + * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. + */ +exports.SEMATTRS_EXCEPTION_STACKTRACE = TMP_EXCEPTION_STACKTRACE; +/** +* SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. +* +* Note: An exception is considered to have escaped (or left) the scope of a span, +if that span is ended while the exception is still logically "in flight". +This may be actually "in flight" in some languages (e.g. if the exception +is passed to a Context manager's `__exit__` method in Python) but will +usually be caught at the point of recording the exception in most languages. + +It is usually not possible to determine at the point where an exception is thrown +whether it will escape the scope of a span. +However, it is trivial to know that an exception +will escape, if one checks for an active exception just before ending the span, +as done in the [example above](#exception-end-example). + +It follows that an exception may still escape the scope of the span +even if the `exception.escaped` attribute was not set or set to false, +since the event might have been recorded at a time where it was not +clear whether the exception will escape. +*/ +exports.SEMATTRS_EXCEPTION_ESCAPED = TMP_EXCEPTION_ESCAPED; +/** + * Type of the trigger on which the function is executed. + */ +exports.SEMATTRS_FAAS_TRIGGER = TMP_FAAS_TRIGGER; +/** + * The execution ID of the current function execution. + */ +exports.SEMATTRS_FAAS_EXECUTION = TMP_FAAS_EXECUTION; +/** + * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. + */ +exports.SEMATTRS_FAAS_DOCUMENT_COLLECTION = TMP_FAAS_DOCUMENT_COLLECTION; +/** + * Describes the type of the operation that was performed on the data. + */ +exports.SEMATTRS_FAAS_DOCUMENT_OPERATION = TMP_FAAS_DOCUMENT_OPERATION; +/** + * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + */ +exports.SEMATTRS_FAAS_DOCUMENT_TIME = TMP_FAAS_DOCUMENT_TIME; +/** + * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. + */ +exports.SEMATTRS_FAAS_DOCUMENT_NAME = TMP_FAAS_DOCUMENT_NAME; +/** + * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + */ +exports.SEMATTRS_FAAS_TIME = TMP_FAAS_TIME; +/** + * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). + */ +exports.SEMATTRS_FAAS_CRON = TMP_FAAS_CRON; +/** + * A boolean that is true if the serverless function is executed for the first time (aka cold-start). + */ +exports.SEMATTRS_FAAS_COLDSTART = TMP_FAAS_COLDSTART; +/** + * The name of the invoked function. + * + * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. + */ +exports.SEMATTRS_FAAS_INVOKED_NAME = TMP_FAAS_INVOKED_NAME; +/** + * The cloud provider of the invoked function. + * + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + */ +exports.SEMATTRS_FAAS_INVOKED_PROVIDER = TMP_FAAS_INVOKED_PROVIDER; +/** + * The cloud region of the invoked function. + * + * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. + */ +exports.SEMATTRS_FAAS_INVOKED_REGION = TMP_FAAS_INVOKED_REGION; +/** + * Transport protocol used. See note below. + */ +exports.SEMATTRS_NET_TRANSPORT = TMP_NET_TRANSPORT; +/** + * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). + */ +exports.SEMATTRS_NET_PEER_IP = TMP_NET_PEER_IP; +/** + * Remote port number. + */ +exports.SEMATTRS_NET_PEER_PORT = TMP_NET_PEER_PORT; +/** + * Remote hostname or similar, see note below. + */ +exports.SEMATTRS_NET_PEER_NAME = TMP_NET_PEER_NAME; +/** + * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. + */ +exports.SEMATTRS_NET_HOST_IP = TMP_NET_HOST_IP; +/** + * Like `net.peer.port` but for the host port. + */ +exports.SEMATTRS_NET_HOST_PORT = TMP_NET_HOST_PORT; +/** + * Local hostname or similar, see note below. + */ +exports.SEMATTRS_NET_HOST_NAME = TMP_NET_HOST_NAME; +/** + * The internet connection type currently being used by the host. + */ +exports.SEMATTRS_NET_HOST_CONNECTION_TYPE = TMP_NET_HOST_CONNECTION_TYPE; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = TMP_NET_HOST_CONNECTION_SUBTYPE; +/** + * The name of the mobile carrier. + */ +exports.SEMATTRS_NET_HOST_CARRIER_NAME = TMP_NET_HOST_CARRIER_NAME; +/** + * The mobile carrier country code. + */ +exports.SEMATTRS_NET_HOST_CARRIER_MCC = TMP_NET_HOST_CARRIER_MCC; +/** + * The mobile carrier network code. + */ +exports.SEMATTRS_NET_HOST_CARRIER_MNC = TMP_NET_HOST_CARRIER_MNC; +/** + * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. + */ +exports.SEMATTRS_NET_HOST_CARRIER_ICC = TMP_NET_HOST_CARRIER_ICC; +/** + * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. + */ +exports.SEMATTRS_PEER_SERVICE = TMP_PEER_SERVICE; +/** + * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. + */ +exports.SEMATTRS_ENDUSER_ID = TMP_ENDUSER_ID; +/** + * Actual/assumed role the client is making the request under extracted from token or application security context. + */ +exports.SEMATTRS_ENDUSER_ROLE = TMP_ENDUSER_ROLE; +/** + * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). + */ +exports.SEMATTRS_ENDUSER_SCOPE = TMP_ENDUSER_SCOPE; +/** + * Current "managed" thread ID (as opposed to OS thread ID). + */ +exports.SEMATTRS_THREAD_ID = TMP_THREAD_ID; +/** + * Current thread name. + */ +exports.SEMATTRS_THREAD_NAME = TMP_THREAD_NAME; +/** + * The method or function name, or equivalent (usually rightmost part of the code unit's name). + */ +exports.SEMATTRS_CODE_FUNCTION = TMP_CODE_FUNCTION; +/** + * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. + */ +exports.SEMATTRS_CODE_NAMESPACE = TMP_CODE_NAMESPACE; +/** + * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). + */ +exports.SEMATTRS_CODE_FILEPATH = TMP_CODE_FILEPATH; +/** + * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. + */ +exports.SEMATTRS_CODE_LINENO = TMP_CODE_LINENO; +/** + * HTTP request method. + */ +exports.SEMATTRS_HTTP_METHOD = TMP_HTTP_METHOD; +/** + * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. + * + * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`. + */ +exports.SEMATTRS_HTTP_URL = TMP_HTTP_URL; +/** + * The full request target as passed in a HTTP request line or equivalent. + */ +exports.SEMATTRS_HTTP_TARGET = TMP_HTTP_TARGET; +/** + * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note. + * + * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set. + */ +exports.SEMATTRS_HTTP_HOST = TMP_HTTP_HOST; +/** + * The URI scheme identifying the used protocol. + */ +exports.SEMATTRS_HTTP_SCHEME = TMP_HTTP_SCHEME; +/** + * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). + */ +exports.SEMATTRS_HTTP_STATUS_CODE = TMP_HTTP_STATUS_CODE; +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +exports.SEMATTRS_HTTP_FLAVOR = TMP_HTTP_FLAVOR; +/** + * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. + */ +exports.SEMATTRS_HTTP_USER_AGENT = TMP_HTTP_USER_AGENT; +/** + * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. + */ +exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = TMP_HTTP_REQUEST_CONTENT_LENGTH; +/** + * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. + */ +exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED; +/** + * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. + */ +exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = TMP_HTTP_RESPONSE_CONTENT_LENGTH; +/** + * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. + */ +exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED; +/** + * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). + * + * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available. + */ +exports.SEMATTRS_HTTP_SERVER_NAME = TMP_HTTP_SERVER_NAME; +/** + * The matched route (path template). + */ +exports.SEMATTRS_HTTP_ROUTE = TMP_HTTP_ROUTE; +/** +* The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). +* +* Note: This is not necessarily the same as `net.peer.ip`, which would +identify the network-level peer, which may be a proxy. + +This attribute should be set when a source of information different +from the one used for `net.peer.ip`, is available even if that other +source just confirms the same value as `net.peer.ip`. +Rationale: For `net.peer.ip`, one typically does not know if it +comes from a proxy, reverse proxy, or the actual client. Setting +`http.client_ip` when it's the same as `net.peer.ip` means that +one is at least somewhat confident that the address is not that of +the closest proxy. +*/ +exports.SEMATTRS_HTTP_CLIENT_IP = TMP_HTTP_CLIENT_IP; +/** + * The keys in the `RequestItems` object field. + */ +exports.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = TMP_AWS_DYNAMODB_TABLE_NAMES; +/** + * The JSON-serialized value of each item in the `ConsumedCapacity` response field. + */ +exports.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = TMP_AWS_DYNAMODB_CONSUMED_CAPACITY; +/** + * The JSON-serialized value of the `ItemCollectionMetrics` response field. + */ +exports.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS; +/** + * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY; +/** + * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY; +/** + * The value of the `ConsistentRead` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = TMP_AWS_DYNAMODB_CONSISTENT_READ; +/** + * The value of the `ProjectionExpression` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_PROJECTION = TMP_AWS_DYNAMODB_PROJECTION; +/** + * The value of the `Limit` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_LIMIT = TMP_AWS_DYNAMODB_LIMIT; +/** + * The value of the `AttributesToGet` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET; +/** + * The value of the `IndexName` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_INDEX_NAME = TMP_AWS_DYNAMODB_INDEX_NAME; +/** + * The value of the `Select` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_SELECT = TMP_AWS_DYNAMODB_SELECT; +/** + * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. + */ +exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES; +/** + * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. + */ +exports.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES; +/** + * The value of the `ExclusiveStartTableName` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE; +/** + * The the number of items in the `TableNames` response parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = TMP_AWS_DYNAMODB_TABLE_COUNT; +/** + * The value of the `ScanIndexForward` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = TMP_AWS_DYNAMODB_SCAN_FORWARD; +/** + * The value of the `Segment` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_SEGMENT = TMP_AWS_DYNAMODB_SEGMENT; +/** + * The value of the `TotalSegments` request parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = TMP_AWS_DYNAMODB_TOTAL_SEGMENTS; +/** + * The value of the `Count` response parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_COUNT = TMP_AWS_DYNAMODB_COUNT; +/** + * The value of the `ScannedCount` response parameter. + */ +exports.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = TMP_AWS_DYNAMODB_SCANNED_COUNT; +/** + * The JSON-serialized value of each item in the `AttributeDefinitions` request field. + */ +exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS; +/** + * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. + */ +exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES; +/** + * A string identifying the messaging system. + */ +exports.SEMATTRS_MESSAGING_SYSTEM = TMP_MESSAGING_SYSTEM; +/** + * The message destination name. This might be equal to the span name but is required nevertheless. + */ +exports.SEMATTRS_MESSAGING_DESTINATION = TMP_MESSAGING_DESTINATION; +/** + * The kind of message destination. + */ +exports.SEMATTRS_MESSAGING_DESTINATION_KIND = TMP_MESSAGING_DESTINATION_KIND; +/** + * A boolean that is true if the message destination is temporary. + */ +exports.SEMATTRS_MESSAGING_TEMP_DESTINATION = TMP_MESSAGING_TEMP_DESTINATION; +/** + * The name of the transport protocol. + */ +exports.SEMATTRS_MESSAGING_PROTOCOL = TMP_MESSAGING_PROTOCOL; +/** + * The version of the transport protocol. + */ +exports.SEMATTRS_MESSAGING_PROTOCOL_VERSION = TMP_MESSAGING_PROTOCOL_VERSION; +/** + * Connection string. + */ +exports.SEMATTRS_MESSAGING_URL = TMP_MESSAGING_URL; +/** + * A value used by the messaging system as an identifier for the message, represented as a string. + */ +exports.SEMATTRS_MESSAGING_MESSAGE_ID = TMP_MESSAGING_MESSAGE_ID; +/** + * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". + */ +exports.SEMATTRS_MESSAGING_CONVERSATION_ID = TMP_MESSAGING_CONVERSATION_ID; +/** + * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. + */ +exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES; +/** + * The compressed size of the message payload in bytes. + */ +exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES; +/** + * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. + */ +exports.SEMATTRS_MESSAGING_OPERATION = TMP_MESSAGING_OPERATION; +/** + * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. + */ +exports.SEMATTRS_MESSAGING_CONSUMER_ID = TMP_MESSAGING_CONSUMER_ID; +/** + * RabbitMQ message routing key. + */ +exports.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = TMP_MESSAGING_RABBITMQ_ROUTING_KEY; +/** + * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. + * + * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. + */ +exports.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = TMP_MESSAGING_KAFKA_MESSAGE_KEY; +/** + * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. + */ +exports.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = TMP_MESSAGING_KAFKA_CONSUMER_GROUP; +/** + * Client Id for the Consumer or Producer that is handling the message. + */ +exports.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = TMP_MESSAGING_KAFKA_CLIENT_ID; +/** + * Partition the message is sent to. + */ +exports.SEMATTRS_MESSAGING_KAFKA_PARTITION = TMP_MESSAGING_KAFKA_PARTITION; +/** + * A boolean that is true if the message is a tombstone. + */ +exports.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = TMP_MESSAGING_KAFKA_TOMBSTONE; +/** + * A string identifying the remoting system. + */ +exports.SEMATTRS_RPC_SYSTEM = TMP_RPC_SYSTEM; +/** + * The full (logical) name of the service being called, including its package name, if applicable. + * + * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). + */ +exports.SEMATTRS_RPC_SERVICE = TMP_RPC_SERVICE; +/** + * The name of the (logical) method being called, must be equal to the $method part in the span name. + * + * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). + */ +exports.SEMATTRS_RPC_METHOD = TMP_RPC_METHOD; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.SEMATTRS_RPC_GRPC_STATUS_CODE = TMP_RPC_GRPC_STATUS_CODE; +/** + * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted. + */ +exports.SEMATTRS_RPC_JSONRPC_VERSION = TMP_RPC_JSONRPC_VERSION; +/** + * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. + */ +exports.SEMATTRS_RPC_JSONRPC_REQUEST_ID = TMP_RPC_JSONRPC_REQUEST_ID; +/** + * `error.code` property of response if it is an error response. + */ +exports.SEMATTRS_RPC_JSONRPC_ERROR_CODE = TMP_RPC_JSONRPC_ERROR_CODE; +/** + * `error.message` property of response if it is an error response. + */ +exports.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = TMP_RPC_JSONRPC_ERROR_MESSAGE; +/** + * Whether this is a received or sent message. + */ +exports.SEMATTRS_MESSAGE_TYPE = TMP_MESSAGE_TYPE; +/** + * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. + * + * Note: This way we guarantee that the values will be consistent between different implementations. + */ +exports.SEMATTRS_MESSAGE_ID = TMP_MESSAGE_ID; +/** + * Compressed size of the message in bytes. + */ +exports.SEMATTRS_MESSAGE_COMPRESSED_SIZE = TMP_MESSAGE_COMPRESSED_SIZE; +/** + * Uncompressed size of the message in bytes. + */ +exports.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = TMP_MESSAGE_UNCOMPRESSED_SIZE; +/** + * Create exported Value Map for SemanticAttributes values + * @deprecated Use the SEMATTRS_XXXXX constants rather than the SemanticAttributes.XXXXX for bundle minification + */ +exports.SemanticAttributes = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_AWS_LAMBDA_INVOKED_ARN, + TMP_DB_SYSTEM, + TMP_DB_CONNECTION_STRING, + TMP_DB_USER, + TMP_DB_JDBC_DRIVER_CLASSNAME, + TMP_DB_NAME, + TMP_DB_STATEMENT, + TMP_DB_OPERATION, + TMP_DB_MSSQL_INSTANCE_NAME, + TMP_DB_CASSANDRA_KEYSPACE, + TMP_DB_CASSANDRA_PAGE_SIZE, + TMP_DB_CASSANDRA_CONSISTENCY_LEVEL, + TMP_DB_CASSANDRA_TABLE, + TMP_DB_CASSANDRA_IDEMPOTENCE, + TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT, + TMP_DB_CASSANDRA_COORDINATOR_ID, + TMP_DB_CASSANDRA_COORDINATOR_DC, + TMP_DB_HBASE_NAMESPACE, + TMP_DB_REDIS_DATABASE_INDEX, + TMP_DB_MONGODB_COLLECTION, + TMP_DB_SQL_TABLE, + TMP_EXCEPTION_TYPE, + TMP_EXCEPTION_MESSAGE, + TMP_EXCEPTION_STACKTRACE, + TMP_EXCEPTION_ESCAPED, + TMP_FAAS_TRIGGER, + TMP_FAAS_EXECUTION, + TMP_FAAS_DOCUMENT_COLLECTION, + TMP_FAAS_DOCUMENT_OPERATION, + TMP_FAAS_DOCUMENT_TIME, + TMP_FAAS_DOCUMENT_NAME, + TMP_FAAS_TIME, + TMP_FAAS_CRON, + TMP_FAAS_COLDSTART, + TMP_FAAS_INVOKED_NAME, + TMP_FAAS_INVOKED_PROVIDER, + TMP_FAAS_INVOKED_REGION, + TMP_NET_TRANSPORT, + TMP_NET_PEER_IP, + TMP_NET_PEER_PORT, + TMP_NET_PEER_NAME, + TMP_NET_HOST_IP, + TMP_NET_HOST_PORT, + TMP_NET_HOST_NAME, + TMP_NET_HOST_CONNECTION_TYPE, + TMP_NET_HOST_CONNECTION_SUBTYPE, + TMP_NET_HOST_CARRIER_NAME, + TMP_NET_HOST_CARRIER_MCC, + TMP_NET_HOST_CARRIER_MNC, + TMP_NET_HOST_CARRIER_ICC, + TMP_PEER_SERVICE, + TMP_ENDUSER_ID, + TMP_ENDUSER_ROLE, + TMP_ENDUSER_SCOPE, + TMP_THREAD_ID, + TMP_THREAD_NAME, + TMP_CODE_FUNCTION, + TMP_CODE_NAMESPACE, + TMP_CODE_FILEPATH, + TMP_CODE_LINENO, + TMP_HTTP_METHOD, + TMP_HTTP_URL, + TMP_HTTP_TARGET, + TMP_HTTP_HOST, + TMP_HTTP_SCHEME, + TMP_HTTP_STATUS_CODE, + TMP_HTTP_FLAVOR, + TMP_HTTP_USER_AGENT, + TMP_HTTP_REQUEST_CONTENT_LENGTH, + TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED, + TMP_HTTP_RESPONSE_CONTENT_LENGTH, + TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, + TMP_HTTP_SERVER_NAME, + TMP_HTTP_ROUTE, + TMP_HTTP_CLIENT_IP, + TMP_AWS_DYNAMODB_TABLE_NAMES, + TMP_AWS_DYNAMODB_CONSUMED_CAPACITY, + TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS, + TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY, + TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY, + TMP_AWS_DYNAMODB_CONSISTENT_READ, + TMP_AWS_DYNAMODB_PROJECTION, + TMP_AWS_DYNAMODB_LIMIT, + TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET, + TMP_AWS_DYNAMODB_INDEX_NAME, + TMP_AWS_DYNAMODB_SELECT, + TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES, + TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES, + TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE, + TMP_AWS_DYNAMODB_TABLE_COUNT, + TMP_AWS_DYNAMODB_SCAN_FORWARD, + TMP_AWS_DYNAMODB_SEGMENT, + TMP_AWS_DYNAMODB_TOTAL_SEGMENTS, + TMP_AWS_DYNAMODB_COUNT, + TMP_AWS_DYNAMODB_SCANNED_COUNT, + TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS, + TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES, + TMP_MESSAGING_SYSTEM, + TMP_MESSAGING_DESTINATION, + TMP_MESSAGING_DESTINATION_KIND, + TMP_MESSAGING_TEMP_DESTINATION, + TMP_MESSAGING_PROTOCOL, + TMP_MESSAGING_PROTOCOL_VERSION, + TMP_MESSAGING_URL, + TMP_MESSAGING_MESSAGE_ID, + TMP_MESSAGING_CONVERSATION_ID, + TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES, + TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES, + TMP_MESSAGING_OPERATION, + TMP_MESSAGING_CONSUMER_ID, + TMP_MESSAGING_RABBITMQ_ROUTING_KEY, + TMP_MESSAGING_KAFKA_MESSAGE_KEY, + TMP_MESSAGING_KAFKA_CONSUMER_GROUP, + TMP_MESSAGING_KAFKA_CLIENT_ID, + TMP_MESSAGING_KAFKA_PARTITION, + TMP_MESSAGING_KAFKA_TOMBSTONE, + TMP_RPC_SYSTEM, + TMP_RPC_SERVICE, + TMP_RPC_METHOD, + TMP_RPC_GRPC_STATUS_CODE, + TMP_RPC_JSONRPC_VERSION, + TMP_RPC_JSONRPC_REQUEST_ID, + TMP_RPC_JSONRPC_ERROR_CODE, + TMP_RPC_JSONRPC_ERROR_MESSAGE, + TMP_MESSAGE_TYPE, + TMP_MESSAGE_ID, + TMP_MESSAGE_COMPRESSED_SIZE, + TMP_MESSAGE_UNCOMPRESSED_SIZE, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for DbSystemValues enum definition + * + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_DBSYSTEMVALUES_OTHER_SQL = 'other_sql'; +const TMP_DBSYSTEMVALUES_MSSQL = 'mssql'; +const TMP_DBSYSTEMVALUES_MYSQL = 'mysql'; +const TMP_DBSYSTEMVALUES_ORACLE = 'oracle'; +const TMP_DBSYSTEMVALUES_DB2 = 'db2'; +const TMP_DBSYSTEMVALUES_POSTGRESQL = 'postgresql'; +const TMP_DBSYSTEMVALUES_REDSHIFT = 'redshift'; +const TMP_DBSYSTEMVALUES_HIVE = 'hive'; +const TMP_DBSYSTEMVALUES_CLOUDSCAPE = 'cloudscape'; +const TMP_DBSYSTEMVALUES_HSQLDB = 'hsqldb'; +const TMP_DBSYSTEMVALUES_PROGRESS = 'progress'; +const TMP_DBSYSTEMVALUES_MAXDB = 'maxdb'; +const TMP_DBSYSTEMVALUES_HANADB = 'hanadb'; +const TMP_DBSYSTEMVALUES_INGRES = 'ingres'; +const TMP_DBSYSTEMVALUES_FIRSTSQL = 'firstsql'; +const TMP_DBSYSTEMVALUES_EDB = 'edb'; +const TMP_DBSYSTEMVALUES_CACHE = 'cache'; +const TMP_DBSYSTEMVALUES_ADABAS = 'adabas'; +const TMP_DBSYSTEMVALUES_FIREBIRD = 'firebird'; +const TMP_DBSYSTEMVALUES_DERBY = 'derby'; +const TMP_DBSYSTEMVALUES_FILEMAKER = 'filemaker'; +const TMP_DBSYSTEMVALUES_INFORMIX = 'informix'; +const TMP_DBSYSTEMVALUES_INSTANTDB = 'instantdb'; +const TMP_DBSYSTEMVALUES_INTERBASE = 'interbase'; +const TMP_DBSYSTEMVALUES_MARIADB = 'mariadb'; +const TMP_DBSYSTEMVALUES_NETEZZA = 'netezza'; +const TMP_DBSYSTEMVALUES_PERVASIVE = 'pervasive'; +const TMP_DBSYSTEMVALUES_POINTBASE = 'pointbase'; +const TMP_DBSYSTEMVALUES_SQLITE = 'sqlite'; +const TMP_DBSYSTEMVALUES_SYBASE = 'sybase'; +const TMP_DBSYSTEMVALUES_TERADATA = 'teradata'; +const TMP_DBSYSTEMVALUES_VERTICA = 'vertica'; +const TMP_DBSYSTEMVALUES_H2 = 'h2'; +const TMP_DBSYSTEMVALUES_COLDFUSION = 'coldfusion'; +const TMP_DBSYSTEMVALUES_CASSANDRA = 'cassandra'; +const TMP_DBSYSTEMVALUES_HBASE = 'hbase'; +const TMP_DBSYSTEMVALUES_MONGODB = 'mongodb'; +const TMP_DBSYSTEMVALUES_REDIS = 'redis'; +const TMP_DBSYSTEMVALUES_COUCHBASE = 'couchbase'; +const TMP_DBSYSTEMVALUES_COUCHDB = 'couchdb'; +const TMP_DBSYSTEMVALUES_COSMOSDB = 'cosmosdb'; +const TMP_DBSYSTEMVALUES_DYNAMODB = 'dynamodb'; +const TMP_DBSYSTEMVALUES_NEO4J = 'neo4j'; +const TMP_DBSYSTEMVALUES_GEODE = 'geode'; +const TMP_DBSYSTEMVALUES_ELASTICSEARCH = 'elasticsearch'; +const TMP_DBSYSTEMVALUES_MEMCACHED = 'memcached'; +const TMP_DBSYSTEMVALUES_COCKROACHDB = 'cockroachdb'; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_OTHER_SQL = TMP_DBSYSTEMVALUES_OTHER_SQL; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_MSSQL = TMP_DBSYSTEMVALUES_MSSQL; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_MYSQL = TMP_DBSYSTEMVALUES_MYSQL; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_ORACLE = TMP_DBSYSTEMVALUES_ORACLE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_DB2 = TMP_DBSYSTEMVALUES_DB2; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_POSTGRESQL = TMP_DBSYSTEMVALUES_POSTGRESQL; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_REDSHIFT = TMP_DBSYSTEMVALUES_REDSHIFT; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_HIVE = TMP_DBSYSTEMVALUES_HIVE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_CLOUDSCAPE = TMP_DBSYSTEMVALUES_CLOUDSCAPE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_HSQLDB = TMP_DBSYSTEMVALUES_HSQLDB; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_PROGRESS = TMP_DBSYSTEMVALUES_PROGRESS; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_MAXDB = TMP_DBSYSTEMVALUES_MAXDB; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_HANADB = TMP_DBSYSTEMVALUES_HANADB; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_INGRES = TMP_DBSYSTEMVALUES_INGRES; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_FIRSTSQL = TMP_DBSYSTEMVALUES_FIRSTSQL; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_EDB = TMP_DBSYSTEMVALUES_EDB; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_CACHE = TMP_DBSYSTEMVALUES_CACHE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_ADABAS = TMP_DBSYSTEMVALUES_ADABAS; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_FIREBIRD = TMP_DBSYSTEMVALUES_FIREBIRD; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_DERBY = TMP_DBSYSTEMVALUES_DERBY; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_FILEMAKER = TMP_DBSYSTEMVALUES_FILEMAKER; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_INFORMIX = TMP_DBSYSTEMVALUES_INFORMIX; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_INSTANTDB = TMP_DBSYSTEMVALUES_INSTANTDB; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_INTERBASE = TMP_DBSYSTEMVALUES_INTERBASE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_MARIADB = TMP_DBSYSTEMVALUES_MARIADB; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_NETEZZA = TMP_DBSYSTEMVALUES_NETEZZA; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_PERVASIVE = TMP_DBSYSTEMVALUES_PERVASIVE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_POINTBASE = TMP_DBSYSTEMVALUES_POINTBASE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_SQLITE = TMP_DBSYSTEMVALUES_SQLITE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_SYBASE = TMP_DBSYSTEMVALUES_SYBASE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_TERADATA = TMP_DBSYSTEMVALUES_TERADATA; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_VERTICA = TMP_DBSYSTEMVALUES_VERTICA; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_H2 = TMP_DBSYSTEMVALUES_H2; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_COLDFUSION = TMP_DBSYSTEMVALUES_COLDFUSION; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_CASSANDRA = TMP_DBSYSTEMVALUES_CASSANDRA; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_HBASE = TMP_DBSYSTEMVALUES_HBASE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_MONGODB = TMP_DBSYSTEMVALUES_MONGODB; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_REDIS = TMP_DBSYSTEMVALUES_REDIS; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_COUCHBASE = TMP_DBSYSTEMVALUES_COUCHBASE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_COUCHDB = TMP_DBSYSTEMVALUES_COUCHDB; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_COSMOSDB = TMP_DBSYSTEMVALUES_COSMOSDB; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_DYNAMODB = TMP_DBSYSTEMVALUES_DYNAMODB; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_NEO4J = TMP_DBSYSTEMVALUES_NEO4J; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_GEODE = TMP_DBSYSTEMVALUES_GEODE; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_ELASTICSEARCH = TMP_DBSYSTEMVALUES_ELASTICSEARCH; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_MEMCACHED = TMP_DBSYSTEMVALUES_MEMCACHED; +/** + * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. + */ +exports.DBSYSTEMVALUES_COCKROACHDB = TMP_DBSYSTEMVALUES_COCKROACHDB; +/** + * The constant map of values for DbSystemValues. + * @deprecated Use the DBSYSTEMVALUES_XXXXX constants rather than the DbSystemValues.XXXXX for bundle minification. + */ +exports.DbSystemValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_DBSYSTEMVALUES_OTHER_SQL, + TMP_DBSYSTEMVALUES_MSSQL, + TMP_DBSYSTEMVALUES_MYSQL, + TMP_DBSYSTEMVALUES_ORACLE, + TMP_DBSYSTEMVALUES_DB2, + TMP_DBSYSTEMVALUES_POSTGRESQL, + TMP_DBSYSTEMVALUES_REDSHIFT, + TMP_DBSYSTEMVALUES_HIVE, + TMP_DBSYSTEMVALUES_CLOUDSCAPE, + TMP_DBSYSTEMVALUES_HSQLDB, + TMP_DBSYSTEMVALUES_PROGRESS, + TMP_DBSYSTEMVALUES_MAXDB, + TMP_DBSYSTEMVALUES_HANADB, + TMP_DBSYSTEMVALUES_INGRES, + TMP_DBSYSTEMVALUES_FIRSTSQL, + TMP_DBSYSTEMVALUES_EDB, + TMP_DBSYSTEMVALUES_CACHE, + TMP_DBSYSTEMVALUES_ADABAS, + TMP_DBSYSTEMVALUES_FIREBIRD, + TMP_DBSYSTEMVALUES_DERBY, + TMP_DBSYSTEMVALUES_FILEMAKER, + TMP_DBSYSTEMVALUES_INFORMIX, + TMP_DBSYSTEMVALUES_INSTANTDB, + TMP_DBSYSTEMVALUES_INTERBASE, + TMP_DBSYSTEMVALUES_MARIADB, + TMP_DBSYSTEMVALUES_NETEZZA, + TMP_DBSYSTEMVALUES_PERVASIVE, + TMP_DBSYSTEMVALUES_POINTBASE, + TMP_DBSYSTEMVALUES_SQLITE, + TMP_DBSYSTEMVALUES_SYBASE, + TMP_DBSYSTEMVALUES_TERADATA, + TMP_DBSYSTEMVALUES_VERTICA, + TMP_DBSYSTEMVALUES_H2, + TMP_DBSYSTEMVALUES_COLDFUSION, + TMP_DBSYSTEMVALUES_CASSANDRA, + TMP_DBSYSTEMVALUES_HBASE, + TMP_DBSYSTEMVALUES_MONGODB, + TMP_DBSYSTEMVALUES_REDIS, + TMP_DBSYSTEMVALUES_COUCHBASE, + TMP_DBSYSTEMVALUES_COUCHDB, + TMP_DBSYSTEMVALUES_COSMOSDB, + TMP_DBSYSTEMVALUES_DYNAMODB, + TMP_DBSYSTEMVALUES_NEO4J, + TMP_DBSYSTEMVALUES_GEODE, + TMP_DBSYSTEMVALUES_ELASTICSEARCH, + TMP_DBSYSTEMVALUES_MEMCACHED, + TMP_DBSYSTEMVALUES_COCKROACHDB, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for DbCassandraConsistencyLevelValues enum definition + * + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL = 'all'; +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = 'each_quorum'; +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = 'quorum'; +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = 'local_quorum'; +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE = 'one'; +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO = 'two'; +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE = 'three'; +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = 'local_one'; +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY = 'any'; +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = 'serial'; +const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = 'local_serial'; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_ALL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_TWO = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_THREE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_ANY = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL; +/** + * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + */ +exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL; +/** + * The constant map of values for DbCassandraConsistencyLevelValues. + * @deprecated Use the DBCASSANDRACONSISTENCYLEVELVALUES_XXXXX constants rather than the DbCassandraConsistencyLevelValues.XXXXX for bundle minification. + */ +exports.DbCassandraConsistencyLevelValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL, + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM, + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM, + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM, + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE, + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO, + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE, + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE, + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY, + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL, + TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for FaasTriggerValues enum definition + * + * Type of the trigger on which the function is executed. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_FAASTRIGGERVALUES_DATASOURCE = 'datasource'; +const TMP_FAASTRIGGERVALUES_HTTP = 'http'; +const TMP_FAASTRIGGERVALUES_PUBSUB = 'pubsub'; +const TMP_FAASTRIGGERVALUES_TIMER = 'timer'; +const TMP_FAASTRIGGERVALUES_OTHER = 'other'; +/** + * Type of the trigger on which the function is executed. + */ +exports.FAASTRIGGERVALUES_DATASOURCE = TMP_FAASTRIGGERVALUES_DATASOURCE; +/** + * Type of the trigger on which the function is executed. + */ +exports.FAASTRIGGERVALUES_HTTP = TMP_FAASTRIGGERVALUES_HTTP; +/** + * Type of the trigger on which the function is executed. + */ +exports.FAASTRIGGERVALUES_PUBSUB = TMP_FAASTRIGGERVALUES_PUBSUB; +/** + * Type of the trigger on which the function is executed. + */ +exports.FAASTRIGGERVALUES_TIMER = TMP_FAASTRIGGERVALUES_TIMER; +/** + * Type of the trigger on which the function is executed. + */ +exports.FAASTRIGGERVALUES_OTHER = TMP_FAASTRIGGERVALUES_OTHER; +/** + * The constant map of values for FaasTriggerValues. + * @deprecated Use the FAASTRIGGERVALUES_XXXXX constants rather than the FaasTriggerValues.XXXXX for bundle minification. + */ +exports.FaasTriggerValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_FAASTRIGGERVALUES_DATASOURCE, + TMP_FAASTRIGGERVALUES_HTTP, + TMP_FAASTRIGGERVALUES_PUBSUB, + TMP_FAASTRIGGERVALUES_TIMER, + TMP_FAASTRIGGERVALUES_OTHER, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for FaasDocumentOperationValues enum definition * - * https://www.apache.org/licenses/LICENSE-2.0 + * Describes the type of the operation that was performed on the data. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_FAASDOCUMENTOPERATIONVALUES_INSERT = 'insert'; +const TMP_FAASDOCUMENTOPERATIONVALUES_EDIT = 'edit'; +const TMP_FAASDOCUMENTOPERATIONVALUES_DELETE = 'delete'; +/** + * Describes the type of the operation that was performed on the data. + */ +exports.FAASDOCUMENTOPERATIONVALUES_INSERT = TMP_FAASDOCUMENTOPERATIONVALUES_INSERT; +/** + * Describes the type of the operation that was performed on the data. + */ +exports.FAASDOCUMENTOPERATIONVALUES_EDIT = TMP_FAASDOCUMENTOPERATIONVALUES_EDIT; +/** + * Describes the type of the operation that was performed on the data. + */ +exports.FAASDOCUMENTOPERATIONVALUES_DELETE = TMP_FAASDOCUMENTOPERATIONVALUES_DELETE; +/** + * The constant map of values for FaasDocumentOperationValues. + * @deprecated Use the FAASDOCUMENTOPERATIONVALUES_XXXXX constants rather than the FaasDocumentOperationValues.XXXXX for bundle minification. + */ +exports.FaasDocumentOperationValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_FAASDOCUMENTOPERATIONVALUES_INSERT, + TMP_FAASDOCUMENTOPERATIONVALUES_EDIT, + TMP_FAASDOCUMENTOPERATIONVALUES_DELETE, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for FaasInvokedProviderValues enum definition * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The cloud provider of the invoked function. + * + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud'; +const TMP_FAASINVOKEDPROVIDERVALUES_AWS = 'aws'; +const TMP_FAASINVOKEDPROVIDERVALUES_AZURE = 'azure'; +const TMP_FAASINVOKEDPROVIDERVALUES_GCP = 'gcp'; +/** + * The cloud provider of the invoked function. + * + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. */ -__exportStar(__nccwpck_require__(85003), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 89943: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors +exports.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD; +/** + * The cloud provider of the invoked function. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + */ +exports.FAASINVOKEDPROVIDERVALUES_AWS = TMP_FAASINVOKEDPROVIDERVALUES_AWS; +/** + * The cloud provider of the invoked function. * - * https://www.apache.org/licenses/LICENSE-2.0 + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + */ +exports.FAASINVOKEDPROVIDERVALUES_AZURE = TMP_FAASINVOKEDPROVIDERVALUES_AZURE; +/** + * The cloud provider of the invoked function. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. + */ +exports.FAASINVOKEDPROVIDERVALUES_GCP = TMP_FAASINVOKEDPROVIDERVALUES_GCP; +/** + * The constant map of values for FaasInvokedProviderValues. + * @deprecated Use the FAASINVOKEDPROVIDERVALUES_XXXXX constants rather than the FaasInvokedProviderValues.XXXXX for bundle minification. + */ +exports.FaasInvokedProviderValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD, + TMP_FAASINVOKEDPROVIDERVALUES_AWS, + TMP_FAASINVOKEDPROVIDERVALUES_AZURE, + TMP_FAASINVOKEDPROVIDERVALUES_GCP, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for NetTransportValues enum definition + * + * Transport protocol used. See note below. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_NETTRANSPORTVALUES_IP_TCP = 'ip_tcp'; +const TMP_NETTRANSPORTVALUES_IP_UDP = 'ip_udp'; +const TMP_NETTRANSPORTVALUES_IP = 'ip'; +const TMP_NETTRANSPORTVALUES_UNIX = 'unix'; +const TMP_NETTRANSPORTVALUES_PIPE = 'pipe'; +const TMP_NETTRANSPORTVALUES_INPROC = 'inproc'; +const TMP_NETTRANSPORTVALUES_OTHER = 'other'; +/** + * Transport protocol used. See note below. + */ +exports.NETTRANSPORTVALUES_IP_TCP = TMP_NETTRANSPORTVALUES_IP_TCP; +/** + * Transport protocol used. See note below. + */ +exports.NETTRANSPORTVALUES_IP_UDP = TMP_NETTRANSPORTVALUES_IP_UDP; +/** + * Transport protocol used. See note below. + */ +exports.NETTRANSPORTVALUES_IP = TMP_NETTRANSPORTVALUES_IP; +/** + * Transport protocol used. See note below. + */ +exports.NETTRANSPORTVALUES_UNIX = TMP_NETTRANSPORTVALUES_UNIX; +/** + * Transport protocol used. See note below. + */ +exports.NETTRANSPORTVALUES_PIPE = TMP_NETTRANSPORTVALUES_PIPE; +/** + * Transport protocol used. See note below. + */ +exports.NETTRANSPORTVALUES_INPROC = TMP_NETTRANSPORTVALUES_INPROC; +/** + * Transport protocol used. See note below. + */ +exports.NETTRANSPORTVALUES_OTHER = TMP_NETTRANSPORTVALUES_OTHER; +/** + * The constant map of values for NetTransportValues. + * @deprecated Use the NETTRANSPORTVALUES_XXXXX constants rather than the NetTransportValues.XXXXX for bundle minification. + */ +exports.NetTransportValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_NETTRANSPORTVALUES_IP_TCP, + TMP_NETTRANSPORTVALUES_IP_UDP, + TMP_NETTRANSPORTVALUES_IP, + TMP_NETTRANSPORTVALUES_UNIX, + TMP_NETTRANSPORTVALUES_PIPE, + TMP_NETTRANSPORTVALUES_INPROC, + TMP_NETTRANSPORTVALUES_OTHER, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for NetHostConnectionTypeValues enum definition + * + * The internet connection type currently being used by the host. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI = 'wifi'; +const TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED = 'wired'; +const TMP_NETHOSTCONNECTIONTYPEVALUES_CELL = 'cell'; +const TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = 'unavailable'; +const TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = 'unknown'; +/** + * The internet connection type currently being used by the host. + */ +exports.NETHOSTCONNECTIONTYPEVALUES_WIFI = TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI; +/** + * The internet connection type currently being used by the host. + */ +exports.NETHOSTCONNECTIONTYPEVALUES_WIRED = TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED; +/** + * The internet connection type currently being used by the host. + */ +exports.NETHOSTCONNECTIONTYPEVALUES_CELL = TMP_NETHOSTCONNECTIONTYPEVALUES_CELL; +/** + * The internet connection type currently being used by the host. + */ +exports.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE; +/** + * The internet connection type currently being used by the host. + */ +exports.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN; +/** + * The constant map of values for NetHostConnectionTypeValues. + * @deprecated Use the NETHOSTCONNECTIONTYPEVALUES_XXXXX constants rather than the NetHostConnectionTypeValues.XXXXX for bundle minification. + */ +exports.NetHostConnectionTypeValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI, + TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED, + TMP_NETHOSTCONNECTIONTYPEVALUES_CELL, + TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE, + TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for NetHostConnectionSubtypeValues enum definition + * + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = 'gprs'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = 'edge'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = 'umts'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = 'cdma'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = 'evdo_0'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = 'evdo_a'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = 'cdma2000_1xrtt'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = 'hsdpa'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = 'hsupa'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = 'hspa'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = 'iden'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = 'evdo_b'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE = 'lte'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = 'ehrpd'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = 'hspap'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM = 'gsm'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = 'td_scdma'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = 'iwlan'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR = 'nr'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = 'nrnsa'; +const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = 'lte_ca'; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_GSM = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_NR = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA; +/** + * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. + */ +exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA; +/** + * The constant map of values for NetHostConnectionSubtypeValues. + * @deprecated Use the NETHOSTCONNECTIONSUBTYPEVALUES_XXXXX constants rather than the NetHostConnectionSubtypeValues.XXXXX for bundle minification. + */ +exports.NetHostConnectionSubtypeValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA, + TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for HttpFlavorValues enum definition + * + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_HTTPFLAVORVALUES_HTTP_1_0 = '1.0'; +const TMP_HTTPFLAVORVALUES_HTTP_1_1 = '1.1'; +const TMP_HTTPFLAVORVALUES_HTTP_2_0 = '2.0'; +const TMP_HTTPFLAVORVALUES_SPDY = 'SPDY'; +const TMP_HTTPFLAVORVALUES_QUIC = 'QUIC'; +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +exports.HTTPFLAVORVALUES_HTTP_1_0 = TMP_HTTPFLAVORVALUES_HTTP_1_0; +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +exports.HTTPFLAVORVALUES_HTTP_1_1 = TMP_HTTPFLAVORVALUES_HTTP_1_1; +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +exports.HTTPFLAVORVALUES_HTTP_2_0 = TMP_HTTPFLAVORVALUES_HTTP_2_0; +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +exports.HTTPFLAVORVALUES_SPDY = TMP_HTTPFLAVORVALUES_SPDY; +/** + * Kind of HTTP protocol used. + * + * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + */ +exports.HTTPFLAVORVALUES_QUIC = TMP_HTTPFLAVORVALUES_QUIC; +/** + * The constant map of values for HttpFlavorValues. + * @deprecated Use the HTTPFLAVORVALUES_XXXXX constants rather than the HttpFlavorValues.XXXXX for bundle minification. */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0; -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -exports.SemanticAttributes = { - /** - * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). - * - * Note: This may be different from `faas.id` if an alias is involved. - */ - AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn', - /** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - */ - DB_SYSTEM: 'db.system', - /** - * The connection string used to connect to the database. It is recommended to remove embedded credentials. - */ - DB_CONNECTION_STRING: 'db.connection_string', - /** - * Username for accessing the database. - */ - DB_USER: 'db.user', - /** - * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. - */ - DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname', - /** - * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). - * - * Note: In some SQL databases, the database name to be used is called "schema name". - */ - DB_NAME: 'db.name', - /** - * The database statement being executed. - * - * Note: The value may be sanitized to exclude sensitive information. - */ - DB_STATEMENT: 'db.statement', - /** - * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. - * - * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. - */ - DB_OPERATION: 'db.operation', - /** - * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. - * - * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). - */ - DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name', - /** - * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace', - /** - * The fetch size used for paging, i.e. how many rows will be returned at once. - */ - DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size', - /** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - */ - DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_CASSANDRA_TABLE: 'db.cassandra.table', - /** - * Whether or not the query is idempotent. - */ - DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence', - /** - * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. - */ - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count', - /** - * The ID of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id', - /** - * The data center of the coordinating node for a query. - */ - DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc', - /** - * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. - */ - DB_HBASE_NAMESPACE: 'db.hbase.namespace', - /** - * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. - */ - DB_REDIS_DATABASE_INDEX: 'db.redis.database_index', - /** - * The collection being accessed within the database stated in `db.name`. - */ - DB_MONGODB_COLLECTION: 'db.mongodb.collection', - /** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - */ - DB_SQL_TABLE: 'db.sql.table', - /** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. - */ - EXCEPTION_TYPE: 'exception.type', - /** - * The exception message. - */ - EXCEPTION_MESSAGE: 'exception.message', - /** - * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - */ - EXCEPTION_STACKTRACE: 'exception.stacktrace', - /** - * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. - * - * Note: An exception is considered to have escaped (or left) the scope of a span, - if that span is ended while the exception is still logically "in flight". - This may be actually "in flight" in some languages (e.g. if the exception - is passed to a Context manager's `__exit__` method in Python) but will - usually be caught at the point of recording the exception in most languages. - - It is usually not possible to determine at the point where an exception is thrown - whether it will escape the scope of a span. - However, it is trivial to know that an exception - will escape, if one checks for an active exception just before ending the span, - as done in the [example above](#exception-end-example). - - It follows that an exception may still escape the scope of the span - even if the `exception.escaped` attribute was not set or set to false, - since the event might have been recorded at a time where it was not - clear whether the exception will escape. - */ - EXCEPTION_ESCAPED: 'exception.escaped', - /** - * Type of the trigger on which the function is executed. - */ - FAAS_TRIGGER: 'faas.trigger', - /** - * The execution ID of the current function execution. - */ - FAAS_EXECUTION: 'faas.execution', - /** - * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - */ - FAAS_DOCUMENT_COLLECTION: 'faas.document.collection', - /** - * Describes the type of the operation that was performed on the data. - */ - FAAS_DOCUMENT_OPERATION: 'faas.document.operation', - /** - * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_DOCUMENT_TIME: 'faas.document.time', - /** - * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. - */ - FAAS_DOCUMENT_NAME: 'faas.document.name', - /** - * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - */ - FAAS_TIME: 'faas.time', - /** - * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - */ - FAAS_CRON: 'faas.cron', - /** - * A boolean that is true if the serverless function is executed for the first time (aka cold-start). - */ - FAAS_COLDSTART: 'faas.coldstart', - /** - * The name of the invoked function. - * - * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. - */ - FAAS_INVOKED_NAME: 'faas.invoked_name', - /** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - */ - FAAS_INVOKED_PROVIDER: 'faas.invoked_provider', - /** - * The cloud region of the invoked function. - * - * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. - */ - FAAS_INVOKED_REGION: 'faas.invoked_region', - /** - * Transport protocol used. See note below. - */ - NET_TRANSPORT: 'net.transport', - /** - * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). - */ - NET_PEER_IP: 'net.peer.ip', - /** - * Remote port number. - */ - NET_PEER_PORT: 'net.peer.port', - /** - * Remote hostname or similar, see note below. - */ - NET_PEER_NAME: 'net.peer.name', - /** - * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. - */ - NET_HOST_IP: 'net.host.ip', - /** - * Like `net.peer.port` but for the host port. - */ - NET_HOST_PORT: 'net.host.port', - /** - * Local hostname or similar, see note below. - */ - NET_HOST_NAME: 'net.host.name', - /** - * The internet connection type currently being used by the host. - */ - NET_HOST_CONNECTION_TYPE: 'net.host.connection.type', - /** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - */ - NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype', - /** - * The name of the mobile carrier. - */ - NET_HOST_CARRIER_NAME: 'net.host.carrier.name', - /** - * The mobile carrier country code. - */ - NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc', - /** - * The mobile carrier network code. - */ - NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc', - /** - * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. - */ - NET_HOST_CARRIER_ICC: 'net.host.carrier.icc', - /** - * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. - */ - PEER_SERVICE: 'peer.service', - /** - * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. - */ - ENDUSER_ID: 'enduser.id', - /** - * Actual/assumed role the client is making the request under extracted from token or application security context. - */ - ENDUSER_ROLE: 'enduser.role', - /** - * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - */ - ENDUSER_SCOPE: 'enduser.scope', - /** - * Current "managed" thread ID (as opposed to OS thread ID). - */ - THREAD_ID: 'thread.id', - /** - * Current thread name. - */ - THREAD_NAME: 'thread.name', - /** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). - */ - CODE_FUNCTION: 'code.function', - /** - * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. - */ - CODE_NAMESPACE: 'code.namespace', - /** - * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). - */ - CODE_FILEPATH: 'code.filepath', - /** - * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. - */ - CODE_LINENO: 'code.lineno', - /** - * HTTP request method. - */ - HTTP_METHOD: 'http.method', - /** - * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. - * - * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`. - */ - HTTP_URL: 'http.url', - /** - * The full request target as passed in a HTTP request line or equivalent. - */ - HTTP_TARGET: 'http.target', - /** - * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note. - * - * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set. - */ - HTTP_HOST: 'http.host', - /** - * The URI scheme identifying the used protocol. - */ - HTTP_SCHEME: 'http.scheme', - /** - * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). - */ - HTTP_STATUS_CODE: 'http.status_code', - /** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - */ - HTTP_FLAVOR: 'http.flavor', - /** - * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. - */ - HTTP_USER_AGENT: 'http.user_agent', - /** - * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length', - /** - * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed', - /** - * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - */ - HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length', - /** - * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. - */ - HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed', - /** - * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). - * - * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available. - */ - HTTP_SERVER_NAME: 'http.server_name', - /** - * The matched route (path template). - */ - HTTP_ROUTE: 'http.route', - /** - * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). - * - * Note: This is not necessarily the same as `net.peer.ip`, which would - identify the network-level peer, which may be a proxy. - - This attribute should be set when a source of information different - from the one used for `net.peer.ip`, is available even if that other - source just confirms the same value as `net.peer.ip`. - Rationale: For `net.peer.ip`, one typically does not know if it - comes from a proxy, reverse proxy, or the actual client. Setting - `http.client_ip` when it's the same as `net.peer.ip` means that - one is at least somewhat confident that the address is not that of - the closest proxy. - */ - HTTP_CLIENT_IP: 'http.client_ip', - /** - * The keys in the `RequestItems` object field. - */ - AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names', - /** - * The JSON-serialized value of each item in the `ConsumedCapacity` response field. - */ - AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity', - /** - * The JSON-serialized value of the `ItemCollectionMetrics` response field. - */ - AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics', - /** - * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity', - /** - * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. - */ - AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity', - /** - * The value of the `ConsistentRead` request parameter. - */ - AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read', - /** - * The value of the `ProjectionExpression` request parameter. - */ - AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection', - /** - * The value of the `Limit` request parameter. - */ - AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit', - /** - * The value of the `AttributesToGet` request parameter. - */ - AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get', - /** - * The value of the `IndexName` request parameter. - */ - AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name', - /** - * The value of the `Select` request parameter. - */ - AWS_DYNAMODB_SELECT: 'aws.dynamodb.select', - /** - * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes', - /** - * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. - */ - AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes', - /** - * The value of the `ExclusiveStartTableName` request parameter. - */ - AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table', - /** - * The the number of items in the `TableNames` response parameter. - */ - AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count', - /** - * The value of the `ScanIndexForward` request parameter. - */ - AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward', - /** - * The value of the `Segment` request parameter. - */ - AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment', - /** - * The value of the `TotalSegments` request parameter. - */ - AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments', - /** - * The value of the `Count` response parameter. - */ - AWS_DYNAMODB_COUNT: 'aws.dynamodb.count', - /** - * The value of the `ScannedCount` response parameter. - */ - AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count', - /** - * The JSON-serialized value of each item in the `AttributeDefinitions` request field. - */ - AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions', - /** - * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. - */ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates', - /** - * A string identifying the messaging system. - */ - MESSAGING_SYSTEM: 'messaging.system', - /** - * The message destination name. This might be equal to the span name but is required nevertheless. - */ - MESSAGING_DESTINATION: 'messaging.destination', - /** - * The kind of message destination. - */ - MESSAGING_DESTINATION_KIND: 'messaging.destination_kind', - /** - * A boolean that is true if the message destination is temporary. - */ - MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination', - /** - * The name of the transport protocol. - */ - MESSAGING_PROTOCOL: 'messaging.protocol', - /** - * The version of the transport protocol. - */ - MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version', - /** - * Connection string. - */ - MESSAGING_URL: 'messaging.url', - /** - * A value used by the messaging system as an identifier for the message, represented as a string. - */ - MESSAGING_MESSAGE_ID: 'messaging.message_id', - /** - * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". - */ - MESSAGING_CONVERSATION_ID: 'messaging.conversation_id', - /** - * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. - */ - MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes', - /** - * The compressed size of the message payload in bytes. - */ - MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes', - /** - * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. - */ - MESSAGING_OPERATION: 'messaging.operation', - /** - * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. - */ - MESSAGING_CONSUMER_ID: 'messaging.consumer_id', - /** - * RabbitMQ message routing key. - */ - MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key', - /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. - * - * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. - */ - MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key', - /** - * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. - */ - MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group', - /** - * Client Id for the Consumer or Producer that is handling the message. - */ - MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id', - /** - * Partition the message is sent to. - */ - MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition', - /** - * A boolean that is true if the message is a tombstone. - */ - MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone', - /** - * A string identifying the remoting system. - */ - RPC_SYSTEM: 'rpc.system', - /** - * The full (logical) name of the service being called, including its package name, if applicable. - * - * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). - */ - RPC_SERVICE: 'rpc.service', - /** - * The name of the (logical) method being called, must be equal to the $method part in the span name. - * - * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). - */ - RPC_METHOD: 'rpc.method', - /** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - */ - RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code', - /** - * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted. - */ - RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version', - /** - * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. - */ - RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id', - /** - * `error.code` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code', - /** - * `error.message` property of response if it is an error response. - */ - RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message', - /** - * Whether this is a received or sent message. - */ - MESSAGE_TYPE: 'message.type', - /** - * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. - * - * Note: This way we guarantee that the values will be consistent between different implementations. - */ - MESSAGE_ID: 'message.id', - /** - * Compressed size of the message in bytes. - */ - MESSAGE_COMPRESSED_SIZE: 'message.compressed_size', - /** - * Uncompressed size of the message in bytes. - */ - MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size', -}; -exports.DbSystemValues = { - /** Some other SQL database. Fallback only. See notes. */ - OTHER_SQL: 'other_sql', - /** Microsoft SQL Server. */ - MSSQL: 'mssql', - /** MySQL. */ - MYSQL: 'mysql', - /** Oracle Database. */ - ORACLE: 'oracle', - /** IBM Db2. */ - DB2: 'db2', - /** PostgreSQL. */ - POSTGRESQL: 'postgresql', - /** Amazon Redshift. */ - REDSHIFT: 'redshift', - /** Apache Hive. */ - HIVE: 'hive', - /** Cloudscape. */ - CLOUDSCAPE: 'cloudscape', - /** HyperSQL DataBase. */ - HSQLDB: 'hsqldb', - /** Progress Database. */ - PROGRESS: 'progress', - /** SAP MaxDB. */ - MAXDB: 'maxdb', - /** SAP HANA. */ - HANADB: 'hanadb', - /** Ingres. */ - INGRES: 'ingres', - /** FirstSQL. */ - FIRSTSQL: 'firstsql', - /** EnterpriseDB. */ - EDB: 'edb', - /** InterSystems Caché. */ - CACHE: 'cache', - /** Adabas (Adaptable Database System). */ - ADABAS: 'adabas', - /** Firebird. */ - FIREBIRD: 'firebird', - /** Apache Derby. */ - DERBY: 'derby', - /** FileMaker. */ - FILEMAKER: 'filemaker', - /** Informix. */ - INFORMIX: 'informix', - /** InstantDB. */ - INSTANTDB: 'instantdb', - /** InterBase. */ - INTERBASE: 'interbase', - /** MariaDB. */ - MARIADB: 'mariadb', - /** Netezza. */ - NETEZZA: 'netezza', - /** Pervasive PSQL. */ - PERVASIVE: 'pervasive', - /** PointBase. */ - POINTBASE: 'pointbase', - /** SQLite. */ - SQLITE: 'sqlite', - /** Sybase. */ - SYBASE: 'sybase', - /** Teradata. */ - TERADATA: 'teradata', - /** Vertica. */ - VERTICA: 'vertica', - /** H2. */ - H2: 'h2', - /** ColdFusion IMQ. */ - COLDFUSION: 'coldfusion', - /** Apache Cassandra. */ - CASSANDRA: 'cassandra', - /** Apache HBase. */ - HBASE: 'hbase', - /** MongoDB. */ - MONGODB: 'mongodb', - /** Redis. */ - REDIS: 'redis', - /** Couchbase. */ - COUCHBASE: 'couchbase', - /** CouchDB. */ - COUCHDB: 'couchdb', - /** Microsoft Azure Cosmos DB. */ - COSMOSDB: 'cosmosdb', - /** Amazon DynamoDB. */ - DYNAMODB: 'dynamodb', - /** Neo4j. */ - NEO4J: 'neo4j', - /** Apache Geode. */ - GEODE: 'geode', - /** Elasticsearch. */ - ELASTICSEARCH: 'elasticsearch', - /** Memcached. */ - MEMCACHED: 'memcached', - /** CockroachDB. */ - COCKROACHDB: 'cockroachdb', -}; -exports.DbCassandraConsistencyLevelValues = { - /** all. */ - ALL: 'all', - /** each_quorum. */ - EACH_QUORUM: 'each_quorum', - /** quorum. */ - QUORUM: 'quorum', - /** local_quorum. */ - LOCAL_QUORUM: 'local_quorum', - /** one. */ - ONE: 'one', - /** two. */ - TWO: 'two', - /** three. */ - THREE: 'three', - /** local_one. */ - LOCAL_ONE: 'local_one', - /** any. */ - ANY: 'any', - /** serial. */ - SERIAL: 'serial', - /** local_serial. */ - LOCAL_SERIAL: 'local_serial', -}; -exports.FaasTriggerValues = { - /** A response to some data source operation such as a database or filesystem read/write. */ - DATASOURCE: 'datasource', - /** To provide an answer to an inbound HTTP request. */ - HTTP: 'http', - /** A function is set to be executed when messages are sent to a messaging system. */ - PUBSUB: 'pubsub', - /** A function is scheduled to be executed regularly. */ - TIMER: 'timer', - /** If none of the others apply. */ - OTHER: 'other', -}; -exports.FaasDocumentOperationValues = { - /** When a new object is created. */ - INSERT: 'insert', - /** When an object is modified. */ - EDIT: 'edit', - /** When an object is deleted. */ - DELETE: 'delete', -}; -exports.FaasInvokedProviderValues = { - /** Alibaba Cloud. */ - ALIBABA_CLOUD: 'alibaba_cloud', - /** Amazon Web Services. */ - AWS: 'aws', - /** Microsoft Azure. */ - AZURE: 'azure', - /** Google Cloud Platform. */ - GCP: 'gcp', -}; -exports.NetTransportValues = { - /** ip_tcp. */ - IP_TCP: 'ip_tcp', - /** ip_udp. */ - IP_UDP: 'ip_udp', - /** Another IP-based protocol. */ - IP: 'ip', - /** Unix Domain socket. See below. */ - UNIX: 'unix', - /** Named or anonymous pipe. See note below. */ - PIPE: 'pipe', - /** In-process communication. */ - INPROC: 'inproc', - /** Something else (non IP-based). */ - OTHER: 'other', -}; -exports.NetHostConnectionTypeValues = { - /** wifi. */ - WIFI: 'wifi', - /** wired. */ - WIRED: 'wired', - /** cell. */ - CELL: 'cell', - /** unavailable. */ - UNAVAILABLE: 'unavailable', - /** unknown. */ - UNKNOWN: 'unknown', -}; -exports.NetHostConnectionSubtypeValues = { - /** GPRS. */ - GPRS: 'gprs', - /** EDGE. */ - EDGE: 'edge', - /** UMTS. */ - UMTS: 'umts', - /** CDMA. */ - CDMA: 'cdma', - /** EVDO Rel. 0. */ - EVDO_0: 'evdo_0', - /** EVDO Rev. A. */ - EVDO_A: 'evdo_a', - /** CDMA2000 1XRTT. */ - CDMA2000_1XRTT: 'cdma2000_1xrtt', - /** HSDPA. */ - HSDPA: 'hsdpa', - /** HSUPA. */ - HSUPA: 'hsupa', - /** HSPA. */ - HSPA: 'hspa', - /** IDEN. */ - IDEN: 'iden', - /** EVDO Rev. B. */ - EVDO_B: 'evdo_b', - /** LTE. */ - LTE: 'lte', - /** EHRPD. */ - EHRPD: 'ehrpd', - /** HSPAP. */ - HSPAP: 'hspap', - /** GSM. */ - GSM: 'gsm', - /** TD-SCDMA. */ - TD_SCDMA: 'td_scdma', - /** IWLAN. */ - IWLAN: 'iwlan', - /** 5G NR (New Radio). */ - NR: 'nr', - /** 5G NRNSA (New Radio Non-Standalone). */ - NRNSA: 'nrnsa', - /** LTE CA. */ - LTE_CA: 'lte_ca', -}; exports.HttpFlavorValues = { - /** HTTP 1.0. */ - HTTP_1_0: '1.0', - /** HTTP 1.1. */ - HTTP_1_1: '1.1', - /** HTTP 2. */ - HTTP_2_0: '2.0', - /** SPDY protocol. */ - SPDY: 'SPDY', - /** QUIC protocol. */ - QUIC: 'QUIC', -}; -exports.MessagingDestinationKindValues = { - /** A message sent to a queue. */ - QUEUE: 'queue', - /** A message sent to a topic. */ - TOPIC: 'topic', -}; -exports.MessagingOperationValues = { - /** receive. */ - RECEIVE: 'receive', - /** process. */ - PROCESS: 'process', + HTTP_1_0: TMP_HTTPFLAVORVALUES_HTTP_1_0, + HTTP_1_1: TMP_HTTPFLAVORVALUES_HTTP_1_1, + HTTP_2_0: TMP_HTTPFLAVORVALUES_HTTP_2_0, + SPDY: TMP_HTTPFLAVORVALUES_SPDY, + QUIC: TMP_HTTPFLAVORVALUES_QUIC, }; +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for MessagingDestinationKindValues enum definition + * + * The kind of message destination. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE = 'queue'; +const TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC = 'topic'; +/** + * The kind of message destination. + */ +exports.MESSAGINGDESTINATIONKINDVALUES_QUEUE = TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE; +/** + * The kind of message destination. + */ +exports.MESSAGINGDESTINATIONKINDVALUES_TOPIC = TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC; +/** + * The constant map of values for MessagingDestinationKindValues. + * @deprecated Use the MESSAGINGDESTINATIONKINDVALUES_XXXXX constants rather than the MessagingDestinationKindValues.XXXXX for bundle minification. + */ +exports.MessagingDestinationKindValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE, + TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for MessagingOperationValues enum definition + * + * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_MESSAGINGOPERATIONVALUES_RECEIVE = 'receive'; +const TMP_MESSAGINGOPERATIONVALUES_PROCESS = 'process'; +/** + * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. + */ +exports.MESSAGINGOPERATIONVALUES_RECEIVE = TMP_MESSAGINGOPERATIONVALUES_RECEIVE; +/** + * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. + */ +exports.MESSAGINGOPERATIONVALUES_PROCESS = TMP_MESSAGINGOPERATIONVALUES_PROCESS; +/** + * The constant map of values for MessagingOperationValues. + * @deprecated Use the MESSAGINGOPERATIONVALUES_XXXXX constants rather than the MessagingOperationValues.XXXXX for bundle minification. + */ +exports.MessagingOperationValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_MESSAGINGOPERATIONVALUES_RECEIVE, + TMP_MESSAGINGOPERATIONVALUES_PROCESS, +]); +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for RpcGrpcStatusCodeValues enum definition + * + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_RPCGRPCSTATUSCODEVALUES_OK = 0; +const TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED = 1; +const TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN = 2; +const TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = 3; +const TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = 4; +const TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND = 5; +const TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = 6; +const TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = 7; +const TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = 8; +const TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = 9; +const TMP_RPCGRPCSTATUSCODEVALUES_ABORTED = 10; +const TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = 11; +const TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = 12; +const TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL = 13; +const TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = 14; +const TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS = 15; +const TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = 16; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_OK = TMP_RPCGRPCSTATUSCODEVALUES_OK; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_CANCELLED = TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_UNKNOWN = TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_NOT_FOUND = TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_ABORTED = TMP_RPCGRPCSTATUSCODEVALUES_ABORTED; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_INTERNAL = TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_DATA_LOSS = TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS; +/** + * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. + */ +exports.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED; +/** + * The constant map of values for RpcGrpcStatusCodeValues. + * @deprecated Use the RPCGRPCSTATUSCODEVALUES_XXXXX constants rather than the RpcGrpcStatusCodeValues.XXXXX for bundle minification. + */ exports.RpcGrpcStatusCodeValues = { - /** OK. */ - OK: 0, - /** CANCELLED. */ - CANCELLED: 1, - /** UNKNOWN. */ - UNKNOWN: 2, - /** INVALID_ARGUMENT. */ - INVALID_ARGUMENT: 3, - /** DEADLINE_EXCEEDED. */ - DEADLINE_EXCEEDED: 4, - /** NOT_FOUND. */ - NOT_FOUND: 5, - /** ALREADY_EXISTS. */ - ALREADY_EXISTS: 6, - /** PERMISSION_DENIED. */ - PERMISSION_DENIED: 7, - /** RESOURCE_EXHAUSTED. */ - RESOURCE_EXHAUSTED: 8, - /** FAILED_PRECONDITION. */ - FAILED_PRECONDITION: 9, - /** ABORTED. */ - ABORTED: 10, - /** OUT_OF_RANGE. */ - OUT_OF_RANGE: 11, - /** UNIMPLEMENTED. */ - UNIMPLEMENTED: 12, - /** INTERNAL. */ - INTERNAL: 13, - /** UNAVAILABLE. */ - UNAVAILABLE: 14, - /** DATA_LOSS. */ - DATA_LOSS: 15, - /** UNAUTHENTICATED. */ - UNAUTHENTICATED: 16, -}; -exports.MessageTypeValues = { - /** sent. */ - SENT: 'SENT', - /** received. */ - RECEIVED: 'RECEIVED', -}; + OK: TMP_RPCGRPCSTATUSCODEVALUES_OK, + CANCELLED: TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED, + UNKNOWN: TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN, + INVALID_ARGUMENT: TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT, + DEADLINE_EXCEEDED: TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED, + NOT_FOUND: TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND, + ALREADY_EXISTS: TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS, + PERMISSION_DENIED: TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED, + RESOURCE_EXHAUSTED: TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED, + FAILED_PRECONDITION: TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION, + ABORTED: TMP_RPCGRPCSTATUSCODEVALUES_ABORTED, + OUT_OF_RANGE: TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE, + UNIMPLEMENTED: TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED, + INTERNAL: TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL, + UNAVAILABLE: TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE, + DATA_LOSS: TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS, + UNAUTHENTICATED: TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED, +}; +/* ---------------------------------------------------------------------------------------------------------- + * Constant values for MessageTypeValues enum definition + * + * Whether this is a received or sent message. + * ---------------------------------------------------------------------------------------------------------- */ +// Temporary local constants to assign to the individual exports and the namespaced version +// Required to avoid the namespace exports using the unminifable export names for some package types +const TMP_MESSAGETYPEVALUES_SENT = 'SENT'; +const TMP_MESSAGETYPEVALUES_RECEIVED = 'RECEIVED'; +/** + * Whether this is a received or sent message. + */ +exports.MESSAGETYPEVALUES_SENT = TMP_MESSAGETYPEVALUES_SENT; +/** + * Whether this is a received or sent message. + */ +exports.MESSAGETYPEVALUES_RECEIVED = TMP_MESSAGETYPEVALUES_RECEIVED; +/** + * The constant map of values for MessageTypeValues. + * @deprecated Use the MESSAGETYPEVALUES_XXXXX constants rather than the MessageTypeValues.XXXXX for bundle minification. + */ +exports.MessageTypeValues = +/*#__PURE__*/ (0, utils_1.createConstMap)([ + TMP_MESSAGETYPEVALUES_SENT, + TMP_MESSAGETYPEVALUES_RECEIVED, +]); //# sourceMappingURL=SemanticAttributes.js.map /***/ }), @@ -79129,6 +83448,18 @@ function underScore(str) { module.exports = __nccwpck_require__(15360); +/***/ }), + +/***/ 96916: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// minimal library entry point. + + +module.exports = __nccwpck_require__(73242); + + /***/ }), /***/ 12134: @@ -79562,13 +83893,21 @@ var Enum = __nccwpck_require__(17732), * @ignore */ function genValuePartial_fromObject(gen, field, fieldIndex, prop) { + var defaultAlreadyEmitted = false; /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ if (field.resolvedType) { if (field.resolvedType instanceof Enum) { gen ("switch(d%s){", prop); for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) { - if (field.repeated && values[keys[i]] === field.typeDefault) gen - ("default:"); + // enum unknown values passthrough + if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen + ("default:") + ("if(typeof(d%s)===\"number\"){m%s=d%s;break}", prop, prop, prop); + if (!field.repeated) gen // fallback to default value only for + // arrays, to avoid leaving holes. + ("break"); // for non-repeated fields, just ignore + defaultAlreadyEmitted = true; + } gen ("case%j:", keys[i]) ("case %i:", values[keys[i]]) @@ -79598,7 +83937,7 @@ function genValuePartial_fromObject(gen, field, fieldIndex, prop) { break; case "uint64": isUnsigned = true; - // eslint-disable-line no-fallthrough + // eslint-disable-next-line no-fallthrough case "int64": case "sint64": case "fixed64": @@ -79615,7 +83954,7 @@ function genValuePartial_fromObject(gen, field, fieldIndex, prop) { case "bytes": gen ("if(typeof d%s===\"string\")", prop) ("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", prop, prop, prop) - ("else if(d%s.length)", prop) + ("else if(d%s.length >= 0)", prop) ("m%s=d%s", prop, prop); break; case "string": gen @@ -79700,7 +84039,7 @@ function genValuePartial_toObject(gen, field, fieldIndex, prop) { /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ if (field.resolvedType) { if (field.resolvedType instanceof Enum) gen - ("d%s=o.enums===String?types[%i].values[m%s]:m%s", prop, fieldIndex, prop, prop); + ("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", prop, fieldIndex, prop, prop, fieldIndex, prop, prop); else gen ("d%s=types[%i].toObject(m%s,o)", prop, fieldIndex, prop); } else { @@ -79712,7 +84051,7 @@ function genValuePartial_toObject(gen, field, fieldIndex, prop) { break; case "uint64": isUnsigned = true; - // eslint-disable-line no-fallthrough + // eslint-disable-next-line no-fallthrough case "int64": case "sint64": case "fixed64": @@ -79878,7 +84217,7 @@ function decoder(mtype) { var field = mtype._fieldsArray[i].resolve(), type = field.resolvedType instanceof Enum ? "int32" : field.type, ref = "m" + util.safeProp(field.name); gen - ("case %i:", field.id); + ("case %i: {", field.id); // Map fields if (field.map) { gen @@ -79949,8 +84288,9 @@ function decoder(mtype) { else gen ("%s=r.%s()", ref, type); gen - ("break"); - // Unknown fields + ("break") + ("}"); + // Unknown fields } gen ("default:") ("r.skipType(t&7)") @@ -80107,8 +84447,9 @@ var Namespace = __nccwpck_require__(76189), * @param {Object.} [options] Declared options * @param {string} [comment] The comment for this enum * @param {Object.} [comments] The value comments for this enum + * @param {Object.>|undefined} [valuesOptions] The value options for this enum */ -function Enum(name, values, options, comment, comments) { +function Enum(name, values, options, comment, comments, valuesOptions) { ReflectionObject.call(this, name, options); if (values && typeof values !== "object") @@ -80138,6 +84479,12 @@ function Enum(name, values, options, comment, comments) { */ this.comments = comments || {}; + /** + * Values options, if any + * @type {Object>|undefined} + */ + this.valuesOptions = valuesOptions; + /** * Reserved ranges, if any. * @type {Array.} @@ -80182,11 +84529,12 @@ Enum.fromJSON = function fromJSON(name, json) { Enum.prototype.toJSON = function toJSON(toJSONOptions) { var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; return util.toObject([ - "options" , this.options, - "values" , this.values, - "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, - "comment" , keepComments ? this.comment : undefined, - "comments" , keepComments ? this.comments : undefined + "options" , this.options, + "valuesOptions" , this.valuesOptions, + "values" , this.values, + "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, + "comment" , keepComments ? this.comment : undefined, + "comments" , keepComments ? this.comments : undefined ]); }; @@ -80195,11 +84543,12 @@ Enum.prototype.toJSON = function toJSON(toJSONOptions) { * @param {string} name Value name * @param {number} id Value id * @param {string} [comment] Comment, if any + * @param {Object.|undefined} [options] Options, if any * @returns {Enum} `this` * @throws {TypeError} If arguments are invalid * @throws {Error} If there is already a value with this name or id */ -Enum.prototype.add = function add(name, id, comment) { +Enum.prototype.add = function add(name, id, comment, options) { // utilized by the parser but not by .fromJSON if (!util.isString(name)) @@ -80224,6 +84573,12 @@ Enum.prototype.add = function add(name, id, comment) { } else this.valuesById[this.values[name] = id] = name; + if (options) { + if (this.valuesOptions === undefined) + this.valuesOptions = {}; + this.valuesOptions[name] = options || null; + } + this.comments[name] = comment || null; return this; }; @@ -80247,6 +84602,8 @@ Enum.prototype.remove = function remove(name) { delete this.valuesById[val]; delete this.values[name]; delete this.comments[name]; + if (this.valuesOptions) + delete this.valuesOptions[name]; return this; }; @@ -80356,13 +84713,13 @@ function Field(name, id, type, rule, extend, options, comment) { if (extend !== undefined && !util.isString(extend)) throw TypeError("extend must be a string"); - if (rule === "proto3_optional") { - rule = "optional"; - } /** * Field rule, if any. * @type {string|undefined} */ + if (rule === "proto3_optional") { + rule = "optional"; + } this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON /** @@ -80548,6 +84905,9 @@ Field.prototype.resolve = function resolve() { this.typeDefault = null; else // instanceof Enum this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined + } else if (this.options && this.options.proto3_optional) { + // proto3 scalar value marked optional; should default to null + this.typeDefault = null; } // use explicitly set default value if present @@ -81290,8 +85650,8 @@ var ReflectionObject = __nccwpck_require__(83575); ((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace"; var Field = __nccwpck_require__(48213), - OneOf = __nccwpck_require__(44408), - util = __nccwpck_require__(47174); + util = __nccwpck_require__(47174), + OneOf = __nccwpck_require__(44408); var Type, // cyclic Service, @@ -81427,9 +85787,8 @@ Object.defineProperty(Namespace.prototype, "nestedArray", { /** * Any nested object descriptor. * @typedef AnyNestedObject - * @type {IEnum|IType|IService|AnyExtensionField|INamespace} + * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf} */ -// ^ BEWARE: VSCode hangs forever when using more than 5 types (that's why AnyExtensionField exists in the first place) /** * Converts this namespace to a namespace descriptor. @@ -81502,7 +85861,7 @@ Namespace.prototype.getEnum = function getEnum(name) { */ Namespace.prototype.add = function add(object) { - if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof Enum || object instanceof Service || object instanceof Namespace || object instanceof OneOf)) + if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace)) throw TypeError("object must be a valid nested object"); if (!this.nested) @@ -82415,7 +86774,7 @@ function parse(source, root, options) { break; case "public": next(); - // eslint-disable-line no-fallthrough + // eslint-disable-next-line no-fallthrough default: whichImports = imports || (imports = []); break; @@ -82548,6 +86907,16 @@ function parse(source, root, options) { parseGroup(parent, rule); return; } + // Type names can consume multiple tokens, in multiple variants: + // package.subpackage field tokens: "package.subpackage" [TYPE NAME ENDS HERE] "field" + // package . subpackage field tokens: "package" "." "subpackage" [TYPE NAME ENDS HERE] "field" + // package. subpackage field tokens: "package." "subpackage" [TYPE NAME ENDS HERE] "field" + // package .subpackage field tokens: "package" ".subpackage" [TYPE NAME ENDS HERE] "field" + // Keep reading tokens until we get a type name with no period at the end, + // and the next token does not start with a period. + while (type.endsWith(".") || peek().startsWith(".")) { + type += next(); + } /* istanbul ignore if */ if (!typeRefRe.test(type)) @@ -82631,6 +87000,14 @@ function parse(source, root, options) { } break; + case "message": + parseType(type, token); + break; + + case "enum": + parseEnum(type, token); + break; + /* istanbul ignore next */ default: throw illegal(token); // there are no groups with proto3 semantics @@ -82731,7 +87108,14 @@ function parse(source, root, options) { skip("="); var value = parseId(next(), true), - dummy = {}; + dummy = { + options: undefined + }; + dummy.setOption = function(name, value) { + if (this.options === undefined) + this.options = {}; + this.options[name] = value; + }; ifBlock(dummy, function parseEnumValue_block(token) { /* istanbul ignore else */ @@ -82744,7 +87128,7 @@ function parse(source, root, options) { }, function parseEnumValue_line() { parseInlineOptions(dummy); // skip }); - parent.add(token, value, dummy.comment); + parent.add(token, value, dummy.comment, dummy.options); } function parseOption(parent, token) { @@ -82764,7 +87148,7 @@ function parse(source, root, options) { option = name; token = peek(); if (fqTypeRefRe.test(token)) { - propName = token.substr(1); //remove '.' before property name + propName = token.slice(1); //remove '.' before property name name += token; next(); } @@ -82775,33 +87159,60 @@ function parse(source, root, options) { } function parseOptionValue(parent, name) { - if (skip("{", true)) { // { a: "foo" b { c: "bar" } } - var result = {}; + // { a: "foo" b { c: "bar" } } + if (skip("{", true)) { + var objectResult = {}; + while (!skip("}", true)) { /* istanbul ignore if */ - if (!nameRe.test(token = next())) + if (!nameRe.test(token = next())) { throw illegal(token, "name"); + } + if (token === null) { + throw illegal(token, "end of input"); + } var value; var propName = token; + + skip(":", true); + if (peek() === "{") value = parseOptionValue(parent, name + "." + token); - else { - skip(":"); - if (peek() === "{") - value = parseOptionValue(parent, name + "." + token); - else { - value = readValue(true); - setOption(parent, name + "." + token, value); + else if (peek() === "[") { + // option (my_option) = { + // repeated_value: [ "foo", "bar" ] + // }; + value = []; + var lastValue; + if (skip("[", true)) { + do { + lastValue = readValue(true); + value.push(lastValue); + } while (skip(",", true)); + skip("]"); + if (typeof lastValue !== "undefined") { + setOption(parent, name + "." + token, lastValue); + } } + } else { + value = readValue(true); + setOption(parent, name + "." + token, value); } - var prevValue = result[propName]; + + var prevValue = objectResult[propName]; + if (prevValue) value = [].concat(prevValue).concat(value); - result[propName] = value; + + objectResult[propName] = value; + + // Semicolons and commas can be optional skip(",", true); + skip(";", true); } - return result; + + return objectResult; } var simpleValue = readValue(true); @@ -83328,9 +87739,14 @@ Reader.prototype.bytes = function read_bytes() { this.pos += length; if (Array.isArray(this.buf)) // plain array return this.buf.slice(start, end); - return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1 - ? new this.buf.constructor(0) - : this._slice.call(this.buf, start, end); + + if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 + var nativeBuffer = util.Buffer; + return nativeBuffer + ? nativeBuffer.alloc(0) + : new this.buf.constructor(0); + } + return this._slice.call(this.buf, start, end); }; /** @@ -83592,10 +88008,10 @@ Root.prototype.load = function load(filename, options, callback) { /* istanbul ignore if */ if (!callback) return; - var cb = callback; - callback = null; if (sync) throw err; + var cb = callback; + callback = null; cb(err, root); } @@ -83639,6 +88055,7 @@ Root.prototype.load = function load(filename, options, callback) { // Fetches a single file function fetch(filename, weak) { + filename = getBundledFileName(filename) || filename; // Skip if already loaded / attempted if (self.files.indexOf(filename) > -1) @@ -83767,6 +88184,10 @@ function tryHandleExtension(root, field) { var extendedType = field.parent.lookup(field.extend); if (extendedType) { var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options); + //do not allow to extend same field twice to prevent the error + if (extendedType.get(sisterField.name)) { + return true; + } sisterField.declaringField = field; field.extensionField = sisterField; extendedType.add(sisterField); @@ -83869,7 +88290,7 @@ module.exports = {}; /** * Named roots. * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). - * Can also be used manually to make roots available accross modules. + * Can also be used manually to make roots available across modules. * @name roots * @type {Object.} * @example @@ -84363,11 +88784,8 @@ function tokenize(source, alternateCommentMode) { var offset = 0, length = source.length, line = 1, - commentType = null, - commentText = null, - commentLine = 0, - commentLineEmpty = false, - commentIsLeading = false; + lastCommentLine = 0, + comments = {}; var stack = []; @@ -84420,10 +88838,11 @@ function tokenize(source, alternateCommentMode) { * @inner */ function setComment(start, end, isLeading) { - commentType = source.charAt(start++); - commentLine = line; - commentLineEmpty = false; - commentIsLeading = isLeading; + var comment = { + type: source.charAt(start++), + lineEmpty: false, + leading: isLeading, + }; var lookback; if (alternateCommentMode) { lookback = 2; // alternate comment parsing: "//" or "/*" @@ -84435,7 +88854,7 @@ function tokenize(source, alternateCommentMode) { do { if (--commentOffset < 0 || (c = source.charAt(commentOffset)) === "\n") { - commentLineEmpty = true; + comment.lineEmpty = true; break; } } while (c === " " || c === "\t"); @@ -84446,9 +88865,12 @@ function tokenize(source, alternateCommentMode) { lines[i] = lines[i] .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, "") .trim(); - commentText = lines + comment.text = lines .join("\n") .trim(); + + comments[line] = comment; + lastCommentLine = line; } function isDoubleSlashCommentLine(startOffset) { @@ -84456,9 +88878,7 @@ function tokenize(source, alternateCommentMode) { // see if remaining line matches comment pattern var lineText = source.substring(startOffset, endOffset); - // look for 1 or 2 slashes since startOffset would already point past - // the first slash that started the comment. - var isComment = /^\s*\/{1,2}/.test(lineText); + var isComment = /^\s*\/\//.test(lineText); return isComment; } @@ -84517,6 +88937,9 @@ function tokenize(source, alternateCommentMode) { ++offset; if (isDoc) { setComment(start, offset - 1, isLeadingComment); + // Trailing comment cannot not be multi-line, + // so leading comment state should be reset to handle potential next comments + isLeadingComment = true; } ++line; repeat = true; @@ -84524,7 +88947,7 @@ function tokenize(source, alternateCommentMode) { // check for double-slash comments, consolidating consecutive lines start = offset; isDoc = false; - if (isDoubleSlashCommentLine(offset)) { + if (isDoubleSlashCommentLine(offset - 1)) { isDoc = true; do { offset = findEndOfLine(offset); @@ -84532,12 +88955,17 @@ function tokenize(source, alternateCommentMode) { break; } offset++; + if (!isLeadingComment) { + // Trailing comment cannot not be multi-line + break; + } } while (isDoubleSlashCommentLine(offset)); } else { offset = Math.min(length, findEndOfLine(offset) + 1); } if (isDoc) { setComment(start, offset, isLeadingComment); + isLeadingComment = true; } line++; repeat = true; @@ -84559,6 +88987,7 @@ function tokenize(source, alternateCommentMode) { ++offset; if (isDoc) { setComment(start, offset - 2, isLeadingComment); + isLeadingComment = true; } repeat = true; } else { @@ -84634,17 +89063,22 @@ function tokenize(source, alternateCommentMode) { */ function cmnt(trailingLine) { var ret = null; + var comment; if (trailingLine === undefined) { - if (commentLine === line - 1 && (alternateCommentMode || commentType === "*" || commentLineEmpty)) { - ret = commentIsLeading ? commentText : null; + comment = comments[line - 1]; + delete comments[line - 1]; + if (comment && (alternateCommentMode || comment.type === "*" || comment.lineEmpty)) { + ret = comment.leading ? comment.text : null; } } else { /* istanbul ignore else */ - if (commentLine < trailingLine) { + if (lastCommentLine < trailingLine) { peek(); } - if (commentLine === trailingLine && !commentLineEmpty && (alternateCommentMode || commentType === "/")) { - ret = commentIsLeading ? null : commentText; + comment = comments[trailingLine]; + delete comments[trailingLine]; + if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === "/")) { + ret = comment.leading ? null : comment.text; } } return ret; @@ -85648,7 +90082,7 @@ util.decorateEnum = function decorateEnum(object) { util.setProperty = function setProperty(dst, path, value) { function setProp(dst, path, value) { var part = path.shift(); - if (part === "__proto__") { + if (part === "__proto__" || part === "prototype") { return dst; } if (path.length > 0) { @@ -86180,13 +90614,30 @@ function newError(name) { merge(this, properties); } - (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError; - - Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } }); - - CustomError.prototype.toString = function toString() { - return this.name + ": " + this.message; - }; + CustomError.prototype = Object.create(Error.prototype, { + constructor: { + value: CustomError, + writable: true, + enumerable: false, + configurable: true, + }, + name: { + get: function get() { return name; }, + set: undefined, + enumerable: false, + // configurable: false would accurately preserve the behavior of + // the original, but I'm guessing that was not intentional. + // For an actual error subclass, this property would + // be configurable. + configurable: true, + }, + toString: { + value: function value() { return this.name + ": " + this.message; }, + writable: true, + enumerable: false, + configurable: true, + }, + }); return CustomError; } @@ -86562,7 +91013,7 @@ wrappers[".google.protobuf.Any"] = { if (type) { // type_url does not accept leading "." var type_url = object["@type"].charAt(0) === "." ? - object["@type"].substr(1) : object["@type"]; + object["@type"].slice(1) : object["@type"]; // type_url prefix is optional, but path seperator is required if (type_url.indexOf("/") === -1) { type_url = "/" + type_url; @@ -86600,7 +91051,7 @@ wrappers[".google.protobuf.Any"] = { if (!(message instanceof this.ctor) && message instanceof Message) { var object = message.$type.toObject(message, options); var messageName = message.$type.fullName[0] === "." ? - message.$type.fullName.substr(1) : message.$type.fullName; + message.$type.fullName.slice(1) : message.$type.fullName; // Default to type.googleapis.com prefix if no prefix is used if (prefix === "") { prefix = googleApi; @@ -114724,59 +119175,58 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.traceOTLPFile = void 0; -const sdk_trace_base_1 = __nccwpck_require__(29253); -const core_1 = __nccwpck_require__(89736); -const exporter_trace_otlp_http_1 = __nccwpck_require__(35401); const core = __importStar(__nccwpck_require__(42186)); const fs = __importStar(__nccwpck_require__(57147)); const readline = __importStar(__nccwpck_require__(14521)); -const api = __importStar(__nccwpck_require__(65163)); +const api_1 = __nccwpck_require__(65163); +const otlp_transformer_1 = __nccwpck_require__(74357); /* istanbul ignore next */ function toSpanKind(spanKind) { switch (spanKind) { /* istanbul ignore next */ - case exporter_trace_otlp_http_1.otlpTypes.opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_CLIENT: - return api.SpanKind.CLIENT; + case otlp_transformer_1.ESpanKind.SPAN_KIND_CLIENT: + return api_1.SpanKind.CLIENT; /* istanbul ignore next */ - case exporter_trace_otlp_http_1.otlpTypes.opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_CONSUMER: - return api.SpanKind.CONSUMER; - case exporter_trace_otlp_http_1.otlpTypes.opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_INTERNAL: - return api.SpanKind.INTERNAL; + case otlp_transformer_1.ESpanKind.SPAN_KIND_CONSUMER: + return api_1.SpanKind.CONSUMER; + case otlp_transformer_1.ESpanKind.SPAN_KIND_INTERNAL: + return api_1.SpanKind.INTERNAL; /* istanbul ignore next */ - case exporter_trace_otlp_http_1.otlpTypes.opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_PRODUCER: - return api.SpanKind.PRODUCER; + case otlp_transformer_1.ESpanKind.SPAN_KIND_PRODUCER: + return api_1.SpanKind.PRODUCER; /* istanbul ignore next */ - case exporter_trace_otlp_http_1.otlpTypes.opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_SERVER: - return api.SpanKind.SERVER; + case otlp_transformer_1.ESpanKind.SPAN_KIND_SERVER: + return api_1.SpanKind.SERVER; /* istanbul ignore next */ default: - return api.SpanKind.INTERNAL; + return api_1.SpanKind.INTERNAL; } } function toLinks(links) { /* istanbul ignore if */ if (links === undefined) { - return undefined; + return []; } // TODO implement Links - return undefined; + return []; } function toAttributeValue(value) { /* istanbul ignore else */ if ("stringValue" in value) { - return value.stringValue; + /* istanbul ignore next */ + return value.stringValue ?? undefined; } else if ("arrayValue" in value) { return JSON.stringify(value.arrayValue?.values); } else if ("boolValue" in value) { - return value.boolValue; + return value.boolValue ?? undefined; } else if ("doubleValue" in value) { - return value.doubleValue; + return value.doubleValue ?? undefined; } else if ("intValue" in value) { - return value.intValue; + return value.intValue ?? undefined; } else if ("kvlistValue" in value) { return JSON.stringify(value.kvlistValue?.values.reduce((result, { key, value }) => { @@ -114796,13 +119246,20 @@ function toAttributes(attributes) { }, {}); return rv; } -function toSpan({ otlpSpan, tracer, parentSpan }) { - return new sdk_trace_base_1.Span(tracer, api.context.active(), otlpSpan.name, { - traceId: parentSpan.spanContext().traceId, - spanId: otlpSpan.spanId, - traceFlags: parentSpan.spanContext().traceFlags, - traceState: new core_1.TraceState(otlpSpan.traceState), - }, toSpanKind(otlpSpan.kind), otlpSpan.parentSpanId || parentSpan.spanContext().spanId, toLinks(otlpSpan.links), new Date(otlpSpan.startTimeUnixNano / 1000000)); +function addSpanToTracer(otlpSpan, tracer) { + const span = tracer.startSpan(otlpSpan.name, { + kind: toSpanKind(otlpSpan.kind), + attributes: toAttributes(otlpSpan.attributes), + links: toLinks(otlpSpan.links), + startTime: new Date(otlpSpan.startTimeUnixNano / 1000000), + }, api_1.context.active()); + if (otlpSpan.status) { + span.setStatus({ + code: otlpSpan.status.code, + message: otlpSpan.status.message ?? "", + }); + } + span.end(new Date(otlpSpan.endTimeUnixNano / 1000000)); } async function traceOTLPFile({ tracer, parentSpan, path, }) { const fileStream = fs.createReadStream(path); @@ -114813,24 +119270,16 @@ async function traceOTLPFile({ tracer, parentSpan, path, }) { for await (const line of rl) { if (line) { const serviceRequest = JSON.parse(line); - for (const resourceSpans of serviceRequest.resourceSpans) { - for (const libSpans of resourceSpans.instrumentationLibrarySpans) { - if (libSpans.instrumentationLibrary) { - for (const otlpSpan of libSpans.spans) { - core.debug(`Trace Test ParentSpan<${otlpSpan.parentSpanId || parentSpan.spanContext().spanId}> -> Span<${otlpSpan.spanId}> `); - const span = toSpan({ - otlpSpan, - tracer, - parentSpan, - }); - const attributes = toAttributes(otlpSpan.attributes); - if (attributes) { - span.setAttributes(attributes); - } - if (otlpSpan.status) { - span.setStatus(otlpSpan.status); - } - span.end(new Date(otlpSpan.endTimeUnixNano / 1000000)); + /* istanbul ignore next */ + for (const resourceSpans of serviceRequest.resourceSpans ?? []) { + /* istanbul ignore next */ + for (const scopeSpans of resourceSpans.scopeSpans ?? []) { + if (scopeSpans.scope) { + /* istanbul ignore next */ + for (const otlpSpan of scopeSpans.spans ?? []) { + core.debug(`Trace Test ParentSpan<${otlpSpan.parentSpanId?.toString() || + parentSpan.spanContext().spanId}> -> Span<${otlpSpan.spanId.toString()}> `); + addSpanToTracer(otlpSpan, tracer); } } } @@ -114912,10 +119361,10 @@ function createTracerProvider(otlpEndpoint, otlpHeaders, workflowRunJobs, otelSe const serviceVersion = workflowRunJobs.workflowRun.head_sha; const provider = new sdk_trace_base_1.BasicTracerProvider({ resource: new resources_1.Resource({ - [semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: serviceName, - [semantic_conventions_1.SemanticResourceAttributes.SERVICE_INSTANCE_ID]: serviceInstanceId, - [semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAMESPACE]: serviceNamespace, - [semantic_conventions_1.SemanticResourceAttributes.SERVICE_VERSION]: serviceVersion, + [semantic_conventions_1.SEMRESATTRS_SERVICE_NAME]: serviceName, + [semantic_conventions_1.SEMRESATTRS_SERVICE_INSTANCE_ID]: serviceInstanceId, + [semantic_conventions_1.SEMRESATTRS_SERVICE_NAMESPACE]: serviceNamespace, + [semantic_conventions_1.SEMRESATTRS_SERVICE_VERSION]: serviceVersion, }), }); let exporter = new sdk_trace_base_1.ConsoleSpanExporter(); @@ -114967,6 +119416,14 @@ module.exports = require("buffer"); /***/ }), +/***/ 32081: +/***/ ((module) => { + +"use strict"; +module.exports = require("child_process"); + +/***/ }), + /***/ 96206: /***/ ((module) => { @@ -116816,7 +121273,7 @@ module.exports = parseParams /***/ }), -/***/ 18482: +/***/ 52694: /***/ ((module) => { // GENERATED FILE. DO NOT EDIT. @@ -118253,38 +122710,6 @@ if (typeof define === 'function' && define.amd) define([], function() { return L else if (true) module.exports = Long; -/***/ }), - -/***/ 34823: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"nested":{"google":{"nested":{"protobuf":{"nested":{"Api":{"fields":{"name":{"type":"string","id":1},"methods":{"rule":"repeated","type":"Method","id":2},"options":{"rule":"repeated","type":"Option","id":3},"version":{"type":"string","id":4},"sourceContext":{"type":"SourceContext","id":5},"mixins":{"rule":"repeated","type":"Mixin","id":6},"syntax":{"type":"Syntax","id":7}}},"Method":{"fields":{"name":{"type":"string","id":1},"requestTypeUrl":{"type":"string","id":2},"requestStreaming":{"type":"bool","id":3},"responseTypeUrl":{"type":"string","id":4},"responseStreaming":{"type":"bool","id":5},"options":{"rule":"repeated","type":"Option","id":6},"syntax":{"type":"Syntax","id":7}}},"Mixin":{"fields":{"name":{"type":"string","id":1},"root":{"type":"string","id":2}}},"SourceContext":{"fields":{"fileName":{"type":"string","id":1}}},"Option":{"fields":{"name":{"type":"string","id":1},"value":{"type":"Any","id":2}}},"Syntax":{"values":{"SYNTAX_PROTO2":0,"SYNTAX_PROTO3":1}}}}}}}}'); - -/***/ }), - -/***/ 36968: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"nested":{"google":{"nested":{"protobuf":{"nested":{"FileDescriptorSet":{"fields":{"file":{"rule":"repeated","type":"FileDescriptorProto","id":1}}},"FileDescriptorProto":{"fields":{"name":{"type":"string","id":1},"package":{"type":"string","id":2},"dependency":{"rule":"repeated","type":"string","id":3},"publicDependency":{"rule":"repeated","type":"int32","id":10,"options":{"packed":false}},"weakDependency":{"rule":"repeated","type":"int32","id":11,"options":{"packed":false}},"messageType":{"rule":"repeated","type":"DescriptorProto","id":4},"enumType":{"rule":"repeated","type":"EnumDescriptorProto","id":5},"service":{"rule":"repeated","type":"ServiceDescriptorProto","id":6},"extension":{"rule":"repeated","type":"FieldDescriptorProto","id":7},"options":{"type":"FileOptions","id":8},"sourceCodeInfo":{"type":"SourceCodeInfo","id":9},"syntax":{"type":"string","id":12}}},"DescriptorProto":{"fields":{"name":{"type":"string","id":1},"field":{"rule":"repeated","type":"FieldDescriptorProto","id":2},"extension":{"rule":"repeated","type":"FieldDescriptorProto","id":6},"nestedType":{"rule":"repeated","type":"DescriptorProto","id":3},"enumType":{"rule":"repeated","type":"EnumDescriptorProto","id":4},"extensionRange":{"rule":"repeated","type":"ExtensionRange","id":5},"oneofDecl":{"rule":"repeated","type":"OneofDescriptorProto","id":8},"options":{"type":"MessageOptions","id":7},"reservedRange":{"rule":"repeated","type":"ReservedRange","id":9},"reservedName":{"rule":"repeated","type":"string","id":10}},"nested":{"ExtensionRange":{"fields":{"start":{"type":"int32","id":1},"end":{"type":"int32","id":2}}},"ReservedRange":{"fields":{"start":{"type":"int32","id":1},"end":{"type":"int32","id":2}}}}},"FieldDescriptorProto":{"fields":{"name":{"type":"string","id":1},"number":{"type":"int32","id":3},"label":{"type":"Label","id":4},"type":{"type":"Type","id":5},"typeName":{"type":"string","id":6},"extendee":{"type":"string","id":2},"defaultValue":{"type":"string","id":7},"oneofIndex":{"type":"int32","id":9},"jsonName":{"type":"string","id":10},"options":{"type":"FieldOptions","id":8}},"nested":{"Type":{"values":{"TYPE_DOUBLE":1,"TYPE_FLOAT":2,"TYPE_INT64":3,"TYPE_UINT64":4,"TYPE_INT32":5,"TYPE_FIXED64":6,"TYPE_FIXED32":7,"TYPE_BOOL":8,"TYPE_STRING":9,"TYPE_GROUP":10,"TYPE_MESSAGE":11,"TYPE_BYTES":12,"TYPE_UINT32":13,"TYPE_ENUM":14,"TYPE_SFIXED32":15,"TYPE_SFIXED64":16,"TYPE_SINT32":17,"TYPE_SINT64":18}},"Label":{"values":{"LABEL_OPTIONAL":1,"LABEL_REQUIRED":2,"LABEL_REPEATED":3}}}},"OneofDescriptorProto":{"fields":{"name":{"type":"string","id":1},"options":{"type":"OneofOptions","id":2}}},"EnumDescriptorProto":{"fields":{"name":{"type":"string","id":1},"value":{"rule":"repeated","type":"EnumValueDescriptorProto","id":2},"options":{"type":"EnumOptions","id":3}}},"EnumValueDescriptorProto":{"fields":{"name":{"type":"string","id":1},"number":{"type":"int32","id":2},"options":{"type":"EnumValueOptions","id":3}}},"ServiceDescriptorProto":{"fields":{"name":{"type":"string","id":1},"method":{"rule":"repeated","type":"MethodDescriptorProto","id":2},"options":{"type":"ServiceOptions","id":3}}},"MethodDescriptorProto":{"fields":{"name":{"type":"string","id":1},"inputType":{"type":"string","id":2},"outputType":{"type":"string","id":3},"options":{"type":"MethodOptions","id":4},"clientStreaming":{"type":"bool","id":5},"serverStreaming":{"type":"bool","id":6}}},"FileOptions":{"fields":{"javaPackage":{"type":"string","id":1},"javaOuterClassname":{"type":"string","id":8},"javaMultipleFiles":{"type":"bool","id":10},"javaGenerateEqualsAndHash":{"type":"bool","id":20,"options":{"deprecated":true}},"javaStringCheckUtf8":{"type":"bool","id":27},"optimizeFor":{"type":"OptimizeMode","id":9,"options":{"default":"SPEED"}},"goPackage":{"type":"string","id":11},"ccGenericServices":{"type":"bool","id":16},"javaGenericServices":{"type":"bool","id":17},"pyGenericServices":{"type":"bool","id":18},"deprecated":{"type":"bool","id":23},"ccEnableArenas":{"type":"bool","id":31},"objcClassPrefix":{"type":"string","id":36},"csharpNamespace":{"type":"string","id":37},"uninterpretedOption":{"rule":"repeated","type":"UninterpretedOption","id":999}},"extensions":[[1000,536870911]],"reserved":[[38,38]],"nested":{"OptimizeMode":{"values":{"SPEED":1,"CODE_SIZE":2,"LITE_RUNTIME":3}}}},"MessageOptions":{"fields":{"messageSetWireFormat":{"type":"bool","id":1},"noStandardDescriptorAccessor":{"type":"bool","id":2},"deprecated":{"type":"bool","id":3},"mapEntry":{"type":"bool","id":7},"uninterpretedOption":{"rule":"repeated","type":"UninterpretedOption","id":999}},"extensions":[[1000,536870911]],"reserved":[[8,8]]},"FieldOptions":{"fields":{"ctype":{"type":"CType","id":1,"options":{"default":"STRING"}},"packed":{"type":"bool","id":2},"jstype":{"type":"JSType","id":6,"options":{"default":"JS_NORMAL"}},"lazy":{"type":"bool","id":5},"deprecated":{"type":"bool","id":3},"weak":{"type":"bool","id":10},"uninterpretedOption":{"rule":"repeated","type":"UninterpretedOption","id":999}},"extensions":[[1000,536870911]],"reserved":[[4,4]],"nested":{"CType":{"values":{"STRING":0,"CORD":1,"STRING_PIECE":2}},"JSType":{"values":{"JS_NORMAL":0,"JS_STRING":1,"JS_NUMBER":2}}}},"OneofOptions":{"fields":{"uninterpretedOption":{"rule":"repeated","type":"UninterpretedOption","id":999}},"extensions":[[1000,536870911]]},"EnumOptions":{"fields":{"allowAlias":{"type":"bool","id":2},"deprecated":{"type":"bool","id":3},"uninterpretedOption":{"rule":"repeated","type":"UninterpretedOption","id":999}},"extensions":[[1000,536870911]]},"EnumValueOptions":{"fields":{"deprecated":{"type":"bool","id":1},"uninterpretedOption":{"rule":"repeated","type":"UninterpretedOption","id":999}},"extensions":[[1000,536870911]]},"ServiceOptions":{"fields":{"deprecated":{"type":"bool","id":33},"uninterpretedOption":{"rule":"repeated","type":"UninterpretedOption","id":999}},"extensions":[[1000,536870911]]},"MethodOptions":{"fields":{"deprecated":{"type":"bool","id":33},"uninterpretedOption":{"rule":"repeated","type":"UninterpretedOption","id":999}},"extensions":[[1000,536870911]]},"UninterpretedOption":{"fields":{"name":{"rule":"repeated","type":"NamePart","id":2},"identifierValue":{"type":"string","id":3},"positiveIntValue":{"type":"uint64","id":4},"negativeIntValue":{"type":"int64","id":5},"doubleValue":{"type":"double","id":6},"stringValue":{"type":"bytes","id":7},"aggregateValue":{"type":"string","id":8}},"nested":{"NamePart":{"fields":{"namePart":{"rule":"required","type":"string","id":1},"isExtension":{"rule":"required","type":"bool","id":2}}}}},"SourceCodeInfo":{"fields":{"location":{"rule":"repeated","type":"Location","id":1}},"nested":{"Location":{"fields":{"path":{"rule":"repeated","type":"int32","id":1},"span":{"rule":"repeated","type":"int32","id":2},"leadingComments":{"type":"string","id":3},"trailingComments":{"type":"string","id":4},"leadingDetachedComments":{"rule":"repeated","type":"string","id":6}}}}},"GeneratedCodeInfo":{"fields":{"annotation":{"rule":"repeated","type":"Annotation","id":1}},"nested":{"Annotation":{"fields":{"path":{"rule":"repeated","type":"int32","id":1},"sourceFile":{"type":"string","id":2},"begin":{"type":"int32","id":3},"end":{"type":"int32","id":4}}}}}}}}}}}'); - -/***/ }), - -/***/ 27668: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"nested":{"google":{"nested":{"protobuf":{"nested":{"SourceContext":{"fields":{"fileName":{"type":"string","id":1}}}}}}}}}'); - -/***/ }), - -/***/ 94961: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"nested":{"google":{"nested":{"protobuf":{"nested":{"Type":{"fields":{"name":{"type":"string","id":1},"fields":{"rule":"repeated","type":"Field","id":2},"oneofs":{"rule":"repeated","type":"string","id":3},"options":{"rule":"repeated","type":"Option","id":4},"sourceContext":{"type":"SourceContext","id":5},"syntax":{"type":"Syntax","id":6}}},"Field":{"fields":{"kind":{"type":"Kind","id":1},"cardinality":{"type":"Cardinality","id":2},"number":{"type":"int32","id":3},"name":{"type":"string","id":4},"typeUrl":{"type":"string","id":6},"oneofIndex":{"type":"int32","id":7},"packed":{"type":"bool","id":8},"options":{"rule":"repeated","type":"Option","id":9},"jsonName":{"type":"string","id":10},"defaultValue":{"type":"string","id":11}},"nested":{"Kind":{"values":{"TYPE_UNKNOWN":0,"TYPE_DOUBLE":1,"TYPE_FLOAT":2,"TYPE_INT64":3,"TYPE_UINT64":4,"TYPE_INT32":5,"TYPE_FIXED64":6,"TYPE_FIXED32":7,"TYPE_BOOL":8,"TYPE_STRING":9,"TYPE_GROUP":10,"TYPE_MESSAGE":11,"TYPE_BYTES":12,"TYPE_UINT32":13,"TYPE_ENUM":14,"TYPE_SFIXED32":15,"TYPE_SFIXED64":16,"TYPE_SINT32":17,"TYPE_SINT64":18}},"Cardinality":{"values":{"CARDINALITY_UNKNOWN":0,"CARDINALITY_OPTIONAL":1,"CARDINALITY_REQUIRED":2,"CARDINALITY_REPEATED":3}}}},"Enum":{"fields":{"name":{"type":"string","id":1},"enumvalue":{"rule":"repeated","type":"EnumValue","id":2},"options":{"rule":"repeated","type":"Option","id":3},"sourceContext":{"type":"SourceContext","id":4},"syntax":{"type":"Syntax","id":5}}},"EnumValue":{"fields":{"name":{"type":"string","id":1},"number":{"type":"int32","id":2},"options":{"rule":"repeated","type":"Option","id":3}}},"Option":{"fields":{"name":{"type":"string","id":1},"value":{"type":"Any","id":2}}},"Syntax":{"values":{"SYNTAX_PROTO2":0,"SYNTAX_PROTO3":1}},"Any":{"fields":{"type_url":{"type":"string","id":1},"value":{"type":"bytes","id":2}}},"SourceContext":{"fields":{"fileName":{"type":"string","id":1}}}}}}}}}'); - /***/ }), /***/ 56569: diff --git a/dist/index.js.map b/dist/index.js.map index 1674f1b..b00ef73 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2jBA;;;;;;;;;;;;;;;;;;;;AC3jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7tBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACx4CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3hCA;AACA;AACA;AACA;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACv2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/WA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1xBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACt3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACt3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACt3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACt3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACt3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACt3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/XA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACj1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnhDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3hCA;AACA;AACA;AACA;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1WA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzEA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/wBA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACr0BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/IA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1uEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5lBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnmEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACj7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACroBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrRA;;;;;;;;ACAA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9BA;AAEA;AACA;AACA;AACA;AA+CA;AAKA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AArBA;AAuBA;AAKA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAGA;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;AAAA;AACA;AACA;AACA;AAEA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AAEA;AACA;AACA;AAKA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAKA;AAEA;AACA;AACA;AAEA;AAKA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAxBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3MA;AACA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACLA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAEA;AAEA;AAOA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7CA;;;;;;;;;;;;ACNA;AAAA;AACA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACDA;AAUA;AAQA;AAOA;AAIA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AApIA;AA+IA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7OA;AACA;AAOA;AAWA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AA5DA;AAuEA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAQA;AACA;AAKA;AACA;AACA;AACA;AACA;AAMA;AAQA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AA/CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtHA;AACA;AAMA;AACA;AACA;AAEA;AAEA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAbA;AAeA;AACA;AACA;AAEA;AAMA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAjDA;;;;;;;;;ACpCA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACv5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BA;AACA;;;;AEDA;AACA;AACA;AACA","sources":[".././node_modules/@actions/artifact/lib/artifact-client.js",".././node_modules/@actions/artifact/lib/internal/artifact-client.js",".././node_modules/@actions/artifact/lib/internal/config-variables.js",".././node_modules/@actions/artifact/lib/internal/crc64.js",".././node_modules/@actions/artifact/lib/internal/download-http-client.js",".././node_modules/@actions/artifact/lib/internal/download-specification.js",".././node_modules/@actions/artifact/lib/internal/http-manager.js",".././node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js",".././node_modules/@actions/artifact/lib/internal/requestUtils.js",".././node_modules/@actions/artifact/lib/internal/status-reporter.js",".././node_modules/@actions/artifact/lib/internal/upload-gzip.js",".././node_modules/@actions/artifact/lib/internal/upload-http-client.js",".././node_modules/@actions/artifact/lib/internal/upload-specification.js",".././node_modules/@actions/artifact/lib/internal/utils.js",".././node_modules/@actions/core/lib/command.js",".././node_modules/@actions/core/lib/core.js",".././node_modules/@actions/core/lib/file-command.js",".././node_modules/@actions/core/lib/oidc-utils.js",".././node_modules/@actions/core/lib/path-utils.js",".././node_modules/@actions/core/lib/summary.js",".././node_modules/@actions/core/lib/utils.js",".././node_modules/@actions/github/lib/context.js",".././node_modules/@actions/github/lib/github.js",".././node_modules/@actions/github/lib/internal/utils.js",".././node_modules/@actions/github/lib/utils.js",".././node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js",".././node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js",".././node_modules/@actions/http-client/lib/auth.js",".././node_modules/@actions/http-client/lib/index.js",".././node_modules/@actions/http-client/lib/proxy.js",".././node_modules/@grpc/grpc-js/build/src/admin.js",".././node_modules/@grpc/grpc-js/build/src/backoff-timeout.js",".././node_modules/@grpc/grpc-js/build/src/call-credentials.js",".././node_modules/@grpc/grpc-js/build/src/call-interface.js",".././node_modules/@grpc/grpc-js/build/src/call-number.js",".././node_modules/@grpc/grpc-js/build/src/call.js",".././node_modules/@grpc/grpc-js/build/src/channel-credentials.js",".././node_modules/@grpc/grpc-js/build/src/channel-options.js",".././node_modules/@grpc/grpc-js/build/src/channel.js",".././node_modules/@grpc/grpc-js/build/src/channelz.js",".././node_modules/@grpc/grpc-js/build/src/client-interceptors.js",".././node_modules/@grpc/grpc-js/build/src/client.js",".././node_modules/@grpc/grpc-js/build/src/compression-algorithms.js",".././node_modules/@grpc/grpc-js/build/src/compression-filter.js",".././node_modules/@grpc/grpc-js/build/src/connectivity-state.js",".././node_modules/@grpc/grpc-js/build/src/constants.js",".././node_modules/@grpc/grpc-js/build/src/control-plane-status.js",".././node_modules/@grpc/grpc-js/build/src/deadline.js",".././node_modules/@grpc/grpc-js/build/src/duration.js",".././node_modules/@grpc/grpc-js/build/src/error.js",".././node_modules/@grpc/grpc-js/build/src/experimental.js",".././node_modules/@grpc/grpc-js/build/src/filter-stack.js",".././node_modules/@grpc/grpc-js/build/src/filter.js",".././node_modules/@grpc/grpc-js/build/src/http_proxy.js",".././node_modules/@grpc/grpc-js/build/src/index.js",".././node_modules/@grpc/grpc-js/build/src/internal-channel.js",".././node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js",".././node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js",".././node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js",".././node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js",".././node_modules/@grpc/grpc-js/build/src/load-balancer.js",".././node_modules/@grpc/grpc-js/build/src/load-balancing-call.js",".././node_modules/@grpc/grpc-js/build/src/logging.js",".././node_modules/@grpc/grpc-js/build/src/make-client.js",".././node_modules/@grpc/grpc-js/build/src/max-message-size-filter.js",".././node_modules/@grpc/grpc-js/build/src/metadata.js",".././node_modules/@grpc/grpc-js/build/src/picker.js",".././node_modules/@grpc/grpc-js/build/src/resolver-dns.js",".././node_modules/@grpc/grpc-js/build/src/resolver-ip.js",".././node_modules/@grpc/grpc-js/build/src/resolver-uds.js",".././node_modules/@grpc/grpc-js/build/src/resolver.js",".././node_modules/@grpc/grpc-js/build/src/resolving-call.js",".././node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js",".././node_modules/@grpc/grpc-js/build/src/retrying-call.js",".././node_modules/@grpc/grpc-js/build/src/server-call.js",".././node_modules/@grpc/grpc-js/build/src/server-credentials.js",".././node_modules/@grpc/grpc-js/build/src/server-interceptors.js",".././node_modules/@grpc/grpc-js/build/src/server.js",".././node_modules/@grpc/grpc-js/build/src/service-config.js",".././node_modules/@grpc/grpc-js/build/src/status-builder.js",".././node_modules/@grpc/grpc-js/build/src/stream-decoder.js",".././node_modules/@grpc/grpc-js/build/src/subchannel-address.js",".././node_modules/@grpc/grpc-js/build/src/subchannel-call.js",".././node_modules/@grpc/grpc-js/build/src/subchannel-interface.js",".././node_modules/@grpc/grpc-js/build/src/subchannel-pool.js",".././node_modules/@grpc/grpc-js/build/src/subchannel.js",".././node_modules/@grpc/grpc-js/build/src/tls-helpers.js",".././node_modules/@grpc/grpc-js/build/src/transport.js",".././node_modules/@grpc/grpc-js/build/src/uri-parser.js",".././node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/index.js",".././node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/util.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/ext/descriptor/index.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/index.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/common.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/converter.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/decoder.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/encoder.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/enum.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/field.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/index-light.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/index-minimal.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/index.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/mapfield.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/message.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/method.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/namespace.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/object.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/oneof.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/parse.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/reader.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/reader_buffer.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/root.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/roots.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/rpc.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/rpc/service.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/service.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/tokenize.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/type.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/types.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/util.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/util/longbits.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/util/minimal.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/verifier.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/wrappers.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/writer.js",".././node_modules/@grpc/grpc-js/node_modules/protobufjs/src/writer_buffer.js",".././node_modules/@grpc/proto-loader/build/src/index.js",".././node_modules/@grpc/proto-loader/build/src/util.js",".././node_modules/@js-sdsl/ordered-map/dist/cjs/index.js",".././node_modules/@octokit/auth-token/dist-node/index.js",".././node_modules/@octokit/core/dist-node/index.js",".././node_modules/@octokit/endpoint/dist-node/index.js",".././node_modules/@octokit/graphql/dist-node/index.js",".././node_modules/@octokit/request-error/dist-node/index.js",".././node_modules/@octokit/request/dist-node/index.js",".././node_modules/@opentelemetry/api/build/src/api/context.js",".././node_modules/@opentelemetry/api/build/src/api/diag.js",".././node_modules/@opentelemetry/api/build/src/api/propagation.js",".././node_modules/@opentelemetry/api/build/src/api/trace.js",".././node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js",".././node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js",".././node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js",".././node_modules/@opentelemetry/api/build/src/baggage/types.js",".././node_modules/@opentelemetry/api/build/src/baggage/utils.js",".././node_modules/@opentelemetry/api/build/src/common/Attributes.js",".././node_modules/@opentelemetry/api/build/src/common/Exception.js",".././node_modules/@opentelemetry/api/build/src/common/Time.js",".././node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js",".././node_modules/@opentelemetry/api/build/src/context/context.js",".././node_modules/@opentelemetry/api/build/src/context/types.js",".././node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js",".././node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js",".././node_modules/@opentelemetry/api/build/src/diag/index.js",".././node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js",".././node_modules/@opentelemetry/api/build/src/diag/types.js",".././node_modules/@opentelemetry/api/build/src/index.js",".././node_modules/@opentelemetry/api/build/src/internal/global-utils.js",".././node_modules/@opentelemetry/api/build/src/internal/semver.js",".././node_modules/@opentelemetry/api/build/src/platform/index.js",".././node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js",".././node_modules/@opentelemetry/api/build/src/platform/node/index.js",".././node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js",".././node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js",".././node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js",".././node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js",".././node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js",".././node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js",".././node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js",".././node_modules/@opentelemetry/api/build/src/trace/Sampler.js",".././node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js",".././node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js",".././node_modules/@opentelemetry/api/build/src/trace/attributes.js",".././node_modules/@opentelemetry/api/build/src/trace/context-utils.js",".././node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js",".././node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js",".././node_modules/@opentelemetry/api/build/src/trace/internal/utils.js",".././node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js",".././node_modules/@opentelemetry/api/build/src/trace/link.js",".././node_modules/@opentelemetry/api/build/src/trace/span.js",".././node_modules/@opentelemetry/api/build/src/trace/span_context.js",".././node_modules/@opentelemetry/api/build/src/trace/span_kind.js",".././node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js",".././node_modules/@opentelemetry/api/build/src/trace/status.js",".././node_modules/@opentelemetry/api/build/src/trace/trace_flags.js",".././node_modules/@opentelemetry/api/build/src/trace/trace_state.js",".././node_modules/@opentelemetry/api/build/src/trace/tracer.js",".././node_modules/@opentelemetry/api/build/src/trace/tracer_options.js",".././node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js",".././node_modules/@opentelemetry/api/build/src/version.js",".././node_modules/@opentelemetry/core/build/src/ExportResult.js",".././node_modules/@opentelemetry/core/build/src/baggage/constants.js",".././node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js",".././node_modules/@opentelemetry/core/build/src/baggage/utils.js",".././node_modules/@opentelemetry/core/build/src/common/attributes.js",".././node_modules/@opentelemetry/core/build/src/common/global-error-handler.js",".././node_modules/@opentelemetry/core/build/src/common/logging-error-handler.js",".././node_modules/@opentelemetry/core/build/src/common/time.js",".././node_modules/@opentelemetry/core/build/src/common/types.js",".././node_modules/@opentelemetry/core/build/src/index.js",".././node_modules/@opentelemetry/core/build/src/internal/validators.js",".././node_modules/@opentelemetry/core/build/src/platform/index.js",".././node_modules/@opentelemetry/core/build/src/platform/node/RandomIdGenerator.js",".././node_modules/@opentelemetry/core/build/src/platform/node/environment.js",".././node_modules/@opentelemetry/core/build/src/platform/node/globalThis.js",".././node_modules/@opentelemetry/core/build/src/platform/node/hex-to-base64.js",".././node_modules/@opentelemetry/core/build/src/platform/node/index.js",".././node_modules/@opentelemetry/core/build/src/platform/node/performance.js",".././node_modules/@opentelemetry/core/build/src/platform/node/sdk-info.js",".././node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js",".././node_modules/@opentelemetry/core/build/src/propagation/composite.js",".././node_modules/@opentelemetry/core/build/src/trace/IdGenerator.js",".././node_modules/@opentelemetry/core/build/src/trace/TraceState.js",".././node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.js",".././node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js",".././node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOffSampler.js",".././node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOnSampler.js",".././node_modules/@opentelemetry/core/build/src/trace/sampler/ParentBasedSampler.js",".././node_modules/@opentelemetry/core/build/src/trace/sampler/TraceIdRatioBasedSampler.js",".././node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js",".././node_modules/@opentelemetry/core/build/src/utils/callback.js",".././node_modules/@opentelemetry/core/build/src/utils/environment.js",".././node_modules/@opentelemetry/core/build/src/utils/lodash.merge.js",".././node_modules/@opentelemetry/core/build/src/utils/merge.js",".././node_modules/@opentelemetry/core/build/src/utils/promise.js",".././node_modules/@opentelemetry/core/build/src/utils/sampling.js",".././node_modules/@opentelemetry/core/build/src/utils/url.js",".././node_modules/@opentelemetry/core/build/src/utils/wrap.js",".././node_modules/@opentelemetry/core/build/src/version.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/build/src/OTLPTraceExporter.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/build/src/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/ExportResult.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/baggage/constants.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/baggage/utils.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/common/attributes.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/common/global-error-handler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/common/logging-error-handler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/common/time.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/common/types.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/internal/validators.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/platform/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/platform/node/RandomIdGenerator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/platform/node/environment.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/platform/node/globalThis.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/platform/node/hex-to-base64.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/platform/node/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/platform/node/performance.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/platform/node/sdk-info.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/propagation/composite.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/trace/IdGenerator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/trace/TraceState.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOffSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOnSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/trace/sampler/ParentBasedSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/trace/sampler/TraceIdRatioBasedSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/utils/callback.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/utils/environment.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/utils/lodash.merge.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/utils/merge.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/utils/promise.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/utils/sampling.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/utils/url.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/utils/wrap.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core/build/src/version.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/semantic-conventions/build/src/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js",".././node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/platform/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/platform/node/OTLPTraceExporter.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/platform/node/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/transform.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/types.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/ExportResult.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/baggage/constants.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/baggage/utils.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/common/attributes.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/common/global-error-handler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/common/logging-error-handler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/common/time.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/common/types.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/internal/validators.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/platform/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/platform/node/RandomIdGenerator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/platform/node/environment.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/platform/node/globalThis.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/platform/node/hex-to-base64.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/platform/node/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/platform/node/performance.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/platform/node/sdk-info.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/propagation/composite.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/trace/IdGenerator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/trace/TraceState.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOffSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOnSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/trace/sampler/ParentBasedSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/trace/sampler/TraceIdRatioBasedSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/utils/callback.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/utils/environment.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/utils/lodash.merge.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/utils/merge.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/utils/promise.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/utils/sampling.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/utils/url.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/utils/wrap.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core/build/src/version.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/semantic-conventions/build/src/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/build/src/OTLPTraceExporter.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/build/src/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/ExportResult.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/baggage/constants.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/baggage/utils.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/common/attributes.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/common/global-error-handler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/common/logging-error-handler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/common/time.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/common/types.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/internal/validators.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/platform/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/platform/node/RandomIdGenerator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/platform/node/environment.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/platform/node/globalThis.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/platform/node/hex-to-base64.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/platform/node/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/platform/node/performance.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/platform/node/sdk-info.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/propagation/composite.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/trace/IdGenerator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/trace/TraceState.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOffSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOnSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/trace/sampler/ParentBasedSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/trace/sampler/TraceIdRatioBasedSampler.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/utils/callback.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/utils/environment.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/utils/lodash.merge.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/utils/merge.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/utils/promise.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/utils/sampling.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/utils/url.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/utils/wrap.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core/build/src/version.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/semantic-conventions/build/src/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js",".././node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/OTLPExporterBase.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/browser/OTLPExporterBrowserBase.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/browser/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/browser/util.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/OTLPExporterNodeBase.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/types.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/util.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/types.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/util.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/ExportResult.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/baggage/constants.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/baggage/utils.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/common/attributes.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/common/global-error-handler.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/common/logging-error-handler.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/common/time.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/common/types.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/internal/validators.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/platform/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/RandomIdGenerator.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/environment.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/globalThis.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/hex-to-base64.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/performance.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/sdk-info.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/propagation/composite.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/trace/IdGenerator.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/trace/TraceState.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOffSampler.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOnSampler.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/trace/sampler/ParentBasedSampler.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/trace/sampler/TraceIdRatioBasedSampler.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/utils/callback.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/utils/environment.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/utils/lodash.merge.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/utils/merge.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/utils/promise.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/utils/sampling.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/utils/url.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/utils/wrap.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core/build/src/version.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/semantic-conventions/build/src/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js",".././node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/OTLPGRPCExporterNodeBase.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/index.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/types.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/util.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/ExportResult.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/baggage/constants.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/baggage/utils.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/common/attributes.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/common/global-error-handler.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/common/logging-error-handler.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/common/time.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/common/types.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/index.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/internal/validators.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/platform/index.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/RandomIdGenerator.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/environment.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/globalThis.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/hex-to-base64.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/index.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/performance.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/sdk-info.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/propagation/composite.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/trace/IdGenerator.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/trace/TraceState.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOffSampler.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOnSampler.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/trace/sampler/ParentBasedSampler.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/trace/sampler/TraceIdRatioBasedSampler.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/utils/callback.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/utils/environment.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/utils/lodash.merge.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/utils/merge.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/utils/promise.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/utils/sampling.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/utils/url.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/utils/wrap.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core/build/src/version.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/semantic-conventions/build/src/index.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js",".././node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js",".././node_modules/@opentelemetry/otlp-proto-exporter-base/build/src/OTLPProtoExporterNodeBase.js",".././node_modules/@opentelemetry/otlp-proto-exporter-base/build/src/index.js",".././node_modules/@opentelemetry/otlp-proto-exporter-base/build/src/types.js",".././node_modules/@opentelemetry/otlp-proto-exporter-base/build/src/util.js",".././node_modules/@opentelemetry/resources/build/src/Resource.js",".././node_modules/@opentelemetry/resources/build/src/config.js",".././node_modules/@opentelemetry/resources/build/src/detectors/BrowserDetector.js",".././node_modules/@opentelemetry/resources/build/src/detectors/EnvDetector.js",".././node_modules/@opentelemetry/resources/build/src/detectors/ProcessDetector.js",".././node_modules/@opentelemetry/resources/build/src/detectors/index.js",".././node_modules/@opentelemetry/resources/build/src/index.js",".././node_modules/@opentelemetry/resources/build/src/platform/index.js",".././node_modules/@opentelemetry/resources/build/src/platform/node/HostDetector.js",".././node_modules/@opentelemetry/resources/build/src/platform/node/OSDetector.js",".././node_modules/@opentelemetry/resources/build/src/platform/node/default-service-name.js",".././node_modules/@opentelemetry/resources/build/src/platform/node/detect-resources.js",".././node_modules/@opentelemetry/resources/build/src/platform/node/index.js",".././node_modules/@opentelemetry/resources/build/src/types.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/MultiSpanProcessor.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/Span.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/SpanProcessor.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/TimedEvent.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/config.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/enums.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/BatchSpanProcessorBase.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/ConsoleSpanExporter.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/InMemorySpanExporter.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/NoopSpanProcessor.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/ReadableSpan.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/SimpleSpanProcessor.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/SpanExporter.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/index.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/platform/index.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/export/BatchSpanProcessor.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/index.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/types.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/utility.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/index.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js",".././node_modules/@protobufjs/aspromise/index.js",".././node_modules/@protobufjs/base64/index.js",".././node_modules/@protobufjs/codegen/index.js",".././node_modules/@protobufjs/eventemitter/index.js",".././node_modules/@protobufjs/fetch/index.js",".././node_modules/@protobufjs/float/index.js",".././node_modules/@protobufjs/inquire/index.js",".././node_modules/@protobufjs/path/index.js",".././node_modules/@protobufjs/pool/index.js",".././node_modules/@protobufjs/utf8/index.js",".././node_modules/before-after-hook/index.js",".././node_modules/before-after-hook/lib/add.js",".././node_modules/before-after-hook/lib/register.js",".././node_modules/before-after-hook/lib/remove.js",".././node_modules/core-util-is/lib/util.js",".././node_modules/deprecation/dist-node/index.js",".././node_modules/immediate/lib/index.js",".././node_modules/inherits/inherits.js",".././node_modules/inherits/inherits_browser.js",".././node_modules/isarray/index.js",".././node_modules/jszip/lib/base64.js",".././node_modules/jszip/lib/compressedObject.js",".././node_modules/jszip/lib/compressions.js",".././node_modules/jszip/lib/crc32.js",".././node_modules/jszip/lib/defaults.js",".././node_modules/jszip/lib/external.js",".././node_modules/jszip/lib/flate.js",".././node_modules/jszip/lib/generate/ZipFileWorker.js",".././node_modules/jszip/lib/generate/index.js",".././node_modules/jszip/lib/index.js",".././node_modules/jszip/lib/load.js",".././node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js",".././node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js",".././node_modules/jszip/lib/nodejsUtils.js",".././node_modules/jszip/lib/object.js",".././node_modules/jszip/lib/reader/ArrayReader.js",".././node_modules/jszip/lib/reader/DataReader.js",".././node_modules/jszip/lib/reader/NodeBufferReader.js",".././node_modules/jszip/lib/reader/StringReader.js",".././node_modules/jszip/lib/reader/Uint8ArrayReader.js",".././node_modules/jszip/lib/reader/readerFor.js",".././node_modules/jszip/lib/signature.js",".././node_modules/jszip/lib/stream/ConvertWorker.js",".././node_modules/jszip/lib/stream/Crc32Probe.js",".././node_modules/jszip/lib/stream/DataLengthProbe.js",".././node_modules/jszip/lib/stream/DataWorker.js",".././node_modules/jszip/lib/stream/GenericWorker.js",".././node_modules/jszip/lib/stream/StreamHelper.js",".././node_modules/jszip/lib/support.js",".././node_modules/jszip/lib/utf8.js",".././node_modules/jszip/lib/utils.js",".././node_modules/jszip/lib/zipEntries.js",".././node_modules/jszip/lib/zipEntry.js",".././node_modules/jszip/lib/zipObject.js",".././node_modules/lie/lib/index.js",".././node_modules/lodash.camelcase/index.js",".././node_modules/once/once.js",".././node_modules/pako/index.js",".././node_modules/pako/lib/deflate.js",".././node_modules/pako/lib/inflate.js",".././node_modules/pako/lib/utils/common.js",".././node_modules/pako/lib/utils/strings.js",".././node_modules/pako/lib/zlib/adler32.js",".././node_modules/pako/lib/zlib/constants.js",".././node_modules/pako/lib/zlib/crc32.js",".././node_modules/pako/lib/zlib/deflate.js",".././node_modules/pako/lib/zlib/gzheader.js",".././node_modules/pako/lib/zlib/inffast.js",".././node_modules/pako/lib/zlib/inflate.js",".././node_modules/pako/lib/zlib/inftrees.js",".././node_modules/pako/lib/zlib/messages.js",".././node_modules/pako/lib/zlib/trees.js",".././node_modules/pako/lib/zlib/zstream.js",".././node_modules/process-nextick-args/index.js",".././node_modules/protobufjs/ext/descriptor/index.js",".././node_modules/protobufjs/index.js",".././node_modules/protobufjs/src/common.js",".././node_modules/protobufjs/src/converter.js",".././node_modules/protobufjs/src/decoder.js",".././node_modules/protobufjs/src/encoder.js",".././node_modules/protobufjs/src/enum.js",".././node_modules/protobufjs/src/field.js",".././node_modules/protobufjs/src/index-light.js",".././node_modules/protobufjs/src/index-minimal.js",".././node_modules/protobufjs/src/index.js",".././node_modules/protobufjs/src/mapfield.js",".././node_modules/protobufjs/src/message.js",".././node_modules/protobufjs/src/method.js",".././node_modules/protobufjs/src/namespace.js",".././node_modules/protobufjs/src/object.js",".././node_modules/protobufjs/src/oneof.js",".././node_modules/protobufjs/src/parse.js",".././node_modules/protobufjs/src/reader.js",".././node_modules/protobufjs/src/reader_buffer.js",".././node_modules/protobufjs/src/root.js",".././node_modules/protobufjs/src/roots.js",".././node_modules/protobufjs/src/rpc.js",".././node_modules/protobufjs/src/rpc/service.js",".././node_modules/protobufjs/src/service.js",".././node_modules/protobufjs/src/tokenize.js",".././node_modules/protobufjs/src/type.js",".././node_modules/protobufjs/src/types.js",".././node_modules/protobufjs/src/util.js",".././node_modules/protobufjs/src/util/longbits.js",".././node_modules/protobufjs/src/util/minimal.js",".././node_modules/protobufjs/src/verifier.js",".././node_modules/protobufjs/src/wrappers.js",".././node_modules/protobufjs/src/writer.js",".././node_modules/protobufjs/src/writer_buffer.js",".././node_modules/readable-stream/lib/_stream_duplex.js",".././node_modules/readable-stream/lib/_stream_passthrough.js",".././node_modules/readable-stream/lib/_stream_readable.js",".././node_modules/readable-stream/lib/_stream_transform.js",".././node_modules/readable-stream/lib/_stream_writable.js",".././node_modules/readable-stream/lib/internal/streams/BufferList.js",".././node_modules/readable-stream/lib/internal/streams/destroy.js",".././node_modules/readable-stream/lib/internal/streams/stream.js",".././node_modules/readable-stream/readable.js",".././node_modules/safe-buffer/index.js",".././node_modules/setimmediate/setImmediate.js",".././node_modules/string_decoder/lib/string_decoder.js",".././node_modules/tmp-promise/index.js",".././node_modules/tmp/lib/tmp.js",".././node_modules/tunnel/index.js",".././node_modules/tunnel/lib/tunnel.js",".././node_modules/undici/index.js",".././node_modules/undici/lib/agent.js",".././node_modules/undici/lib/api/abort-signal.js",".././node_modules/undici/lib/api/api-connect.js",".././node_modules/undici/lib/api/api-pipeline.js",".././node_modules/undici/lib/api/api-request.js",".././node_modules/undici/lib/api/api-stream.js",".././node_modules/undici/lib/api/api-upgrade.js",".././node_modules/undici/lib/api/index.js",".././node_modules/undici/lib/api/readable.js",".././node_modules/undici/lib/api/util.js",".././node_modules/undici/lib/balanced-pool.js",".././node_modules/undici/lib/cache/cache.js",".././node_modules/undici/lib/cache/cachestorage.js",".././node_modules/undici/lib/cache/symbols.js",".././node_modules/undici/lib/cache/util.js",".././node_modules/undici/lib/client.js",".././node_modules/undici/lib/compat/dispatcher-weakref.js",".././node_modules/undici/lib/cookies/constants.js",".././node_modules/undici/lib/cookies/index.js",".././node_modules/undici/lib/cookies/parse.js",".././node_modules/undici/lib/cookies/util.js",".././node_modules/undici/lib/core/connect.js",".././node_modules/undici/lib/core/constants.js",".././node_modules/undici/lib/core/errors.js",".././node_modules/undici/lib/core/request.js",".././node_modules/undici/lib/core/symbols.js",".././node_modules/undici/lib/core/util.js",".././node_modules/undici/lib/dispatcher-base.js",".././node_modules/undici/lib/dispatcher.js",".././node_modules/undici/lib/fetch/body.js",".././node_modules/undici/lib/fetch/constants.js",".././node_modules/undici/lib/fetch/dataURL.js",".././node_modules/undici/lib/fetch/file.js",".././node_modules/undici/lib/fetch/formdata.js",".././node_modules/undici/lib/fetch/global.js",".././node_modules/undici/lib/fetch/headers.js",".././node_modules/undici/lib/fetch/index.js",".././node_modules/undici/lib/fetch/request.js",".././node_modules/undici/lib/fetch/response.js",".././node_modules/undici/lib/fetch/symbols.js",".././node_modules/undici/lib/fetch/util.js",".././node_modules/undici/lib/fetch/webidl.js",".././node_modules/undici/lib/fileapi/encoding.js",".././node_modules/undici/lib/fileapi/filereader.js",".././node_modules/undici/lib/fileapi/progressevent.js",".././node_modules/undici/lib/fileapi/symbols.js",".././node_modules/undici/lib/fileapi/util.js",".././node_modules/undici/lib/global.js",".././node_modules/undici/lib/handler/DecoratorHandler.js",".././node_modules/undici/lib/handler/RedirectHandler.js",".././node_modules/undici/lib/handler/RetryHandler.js",".././node_modules/undici/lib/interceptor/redirectInterceptor.js",".././node_modules/undici/lib/llhttp/constants.js",".././node_modules/undici/lib/llhttp/llhttp-wasm.js",".././node_modules/undici/lib/llhttp/llhttp_simd-wasm.js",".././node_modules/undici/lib/llhttp/utils.js",".././node_modules/undici/lib/mock/mock-agent.js",".././node_modules/undici/lib/mock/mock-client.js",".././node_modules/undici/lib/mock/mock-errors.js",".././node_modules/undici/lib/mock/mock-interceptor.js",".././node_modules/undici/lib/mock/mock-pool.js",".././node_modules/undici/lib/mock/mock-symbols.js",".././node_modules/undici/lib/mock/mock-utils.js",".././node_modules/undici/lib/mock/pending-interceptors-formatter.js",".././node_modules/undici/lib/mock/pluralizer.js",".././node_modules/undici/lib/node/fixed-queue.js",".././node_modules/undici/lib/pool-base.js",".././node_modules/undici/lib/pool-stats.js",".././node_modules/undici/lib/pool.js",".././node_modules/undici/lib/proxy-agent.js",".././node_modules/undici/lib/timers.js",".././node_modules/undici/lib/websocket/connection.js",".././node_modules/undici/lib/websocket/constants.js",".././node_modules/undici/lib/websocket/events.js",".././node_modules/undici/lib/websocket/frame.js",".././node_modules/undici/lib/websocket/receiver.js",".././node_modules/undici/lib/websocket/symbols.js",".././node_modules/undici/lib/websocket/util.js",".././node_modules/undici/lib/websocket/websocket.js",".././node_modules/universal-user-agent/dist-node/index.js",".././node_modules/util-deprecate/node.js",".././node_modules/uuid/dist/index.js",".././node_modules/uuid/dist/md5.js",".././node_modules/uuid/dist/nil.js",".././node_modules/uuid/dist/parse.js",".././node_modules/uuid/dist/regex.js",".././node_modules/uuid/dist/rng.js",".././node_modules/uuid/dist/sha1.js",".././node_modules/uuid/dist/stringify.js",".././node_modules/uuid/dist/v1.js",".././node_modules/uuid/dist/v3.js",".././node_modules/uuid/dist/v35.js",".././node_modules/uuid/dist/v4.js",".././node_modules/uuid/dist/v5.js",".././node_modules/uuid/dist/validate.js",".././node_modules/uuid/dist/version.js",".././node_modules/wrappy/wrappy.js",".././src/github.ts",".././src/index.ts",".././src/runner.ts",".././src/tracing/index.ts",".././src/tracing/job.ts",".././src/tracing/step.ts",".././src/tracing/trace-otlp-file.ts",".././src/tracing/trace.ts","../external node-commonjs \"assert\"","../external node-commonjs \"async_hooks\"","../external node-commonjs \"buffer\"","../external node-commonjs \"console\"","../external node-commonjs \"crypto\"","../external node-commonjs \"diagnostics_channel\"","../external node-commonjs \"dns\"","../external node-commonjs \"events\"","../external node-commonjs \"fs\"","../external node-commonjs \"http\"","../external node-commonjs \"http2\"","../external node-commonjs \"https\"","../external node-commonjs \"net\"","../external node-commonjs \"node:events\"","../external node-commonjs \"node:stream\"","../external node-commonjs \"node:util\"","../external node-commonjs \"os\"","../external node-commonjs \"path\"","../external node-commonjs \"perf_hooks\"","../external node-commonjs \"process\"","../external node-commonjs \"querystring\"","../external node-commonjs \"readline\"","../external node-commonjs \"stream\"","../external node-commonjs \"stream/web\"","../external node-commonjs \"string_decoder\"","../external node-commonjs \"tls\"","../external node-commonjs \"url\"","../external node-commonjs \"util\"","../external node-commonjs \"util/types\"","../external node-commonjs \"worker_threads\"","../external node-commonjs \"zlib\"",".././node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js",".././node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js",".././node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js",".././node_modules/@fastify/busboy/deps/streamsearch/sbmh.js",".././node_modules/@fastify/busboy/lib/main.js",".././node_modules/@fastify/busboy/lib/types/multipart.js",".././node_modules/@fastify/busboy/lib/types/urlencoded.js",".././node_modules/@fastify/busboy/lib/utils/Decoder.js",".././node_modules/@fastify/busboy/lib/utils/basename.js",".././node_modules/@fastify/busboy/lib/utils/decodeText.js",".././node_modules/@fastify/busboy/lib/utils/getLimit.js",".././node_modules/@fastify/busboy/lib/utils/parseParams.js",".././node_modules/@grpc/grpc-js/node_modules/long/umd/index.js","../webpack/bootstrap","../webpack/runtime/compat","../webpack/before-startup","../webpack/startup","../webpack/after-startup"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = void 0;\nconst artifact_client_1 = require(\"./internal/artifact-client\");\n/**\n * Constructs an ArtifactClient\n */\nfunction create() {\n return artifact_client_1.DefaultArtifactClient.create();\n}\nexports.create = create;\n//# sourceMappingURL=artifact-client.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultArtifactClient = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst upload_specification_1 = require(\"./upload-specification\");\nconst upload_http_client_1 = require(\"./upload-http-client\");\nconst utils_1 = require(\"./utils\");\nconst path_and_artifact_name_validation_1 = require(\"./path-and-artifact-name-validation\");\nconst download_http_client_1 = require(\"./download-http-client\");\nconst download_specification_1 = require(\"./download-specification\");\nconst config_variables_1 = require(\"./config-variables\");\nconst path_1 = require(\"path\");\nclass DefaultArtifactClient {\n /**\n * Constructs a DefaultArtifactClient\n */\n static create() {\n return new DefaultArtifactClient();\n }\n /**\n * Uploads an artifact\n */\n uploadArtifact(name, files, rootDirectory, options) {\n return __awaiter(this, void 0, void 0, function* () {\n core.info(`Starting artifact upload\nFor more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`);\n (0, path_and_artifact_name_validation_1.checkArtifactName)(name);\n // Get specification for the files being uploaded\n const uploadSpecification = (0, upload_specification_1.getUploadSpecification)(name, rootDirectory, files);\n const uploadResponse = {\n artifactName: name,\n artifactItems: [],\n size: 0,\n failedItems: []\n };\n const uploadHttpClient = new upload_http_client_1.UploadHttpClient();\n if (uploadSpecification.length === 0) {\n core.warning(`No files found that can be uploaded`);\n }\n else {\n // Create an entry for the artifact in the file container\n const response = yield uploadHttpClient.createArtifactInFileContainer(name, options);\n if (!response.fileContainerResourceUrl) {\n core.debug(response.toString());\n throw new Error('No URL provided by the Artifact Service to upload an artifact to');\n }\n core.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`);\n core.info(`Container for artifact \"${name}\" successfully created. Starting upload of file(s)`);\n // Upload each of the files that were found concurrently\n const uploadResult = yield uploadHttpClient.uploadArtifactToFileContainer(response.fileContainerResourceUrl, uploadSpecification, options);\n // Update the size of the artifact to indicate we are done uploading\n // The uncompressed size is used for display when downloading a zip of the artifact from the UI\n core.info(`File upload process has finished. Finalizing the artifact upload`);\n yield uploadHttpClient.patchArtifactSize(uploadResult.totalSize, name);\n if (uploadResult.failedItems.length > 0) {\n core.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`);\n }\n else {\n core.info(`Artifact has been finalized. All files have been successfully uploaded!`);\n }\n core.info(`\nThe raw size of all the files that were specified for upload is ${uploadResult.totalSize} bytes\nThe size of all the files that were uploaded is ${uploadResult.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage\n\nNote: The size of downloaded zips can differ significantly from the reported size. For more information see: https://github.com/actions/upload-artifact#zipped-artifact-downloads \\r\\n`);\n uploadResponse.artifactItems = uploadSpecification.map(item => item.absoluteFilePath);\n uploadResponse.size = uploadResult.uploadSize;\n uploadResponse.failedItems = uploadResult.failedItems;\n }\n return uploadResponse;\n });\n }\n downloadArtifact(name, path, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const downloadHttpClient = new download_http_client_1.DownloadHttpClient();\n const artifacts = yield downloadHttpClient.listArtifacts();\n if (artifacts.count === 0) {\n throw new Error(`Unable to find any artifacts for the associated workflow`);\n }\n const artifactToDownload = artifacts.value.find(artifact => {\n return artifact.name === name;\n });\n if (!artifactToDownload) {\n throw new Error(`Unable to find an artifact with the name: ${name}`);\n }\n const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl);\n if (!path) {\n path = (0, config_variables_1.getWorkSpaceDirectory)();\n }\n path = (0, path_1.normalize)(path);\n path = (0, path_1.resolve)(path);\n // During upload, empty directories are rejected by the remote server so there should be no artifacts that consist of only empty directories\n const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false);\n if (downloadSpecification.filesToDownload.length === 0) {\n core.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`);\n }\n else {\n // Create all necessary directories recursively before starting any download\n yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure);\n core.info('Directory structure has been set up for the artifact');\n yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate);\n yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);\n }\n return {\n artifactName: name,\n downloadPath: downloadSpecification.rootDownloadLocation\n };\n });\n }\n downloadAllArtifacts(path) {\n return __awaiter(this, void 0, void 0, function* () {\n const downloadHttpClient = new download_http_client_1.DownloadHttpClient();\n const response = [];\n const artifacts = yield downloadHttpClient.listArtifacts();\n if (artifacts.count === 0) {\n core.info('Unable to find any artifacts for the associated workflow');\n return response;\n }\n if (!path) {\n path = (0, config_variables_1.getWorkSpaceDirectory)();\n }\n path = (0, path_1.normalize)(path);\n path = (0, path_1.resolve)(path);\n let downloadedArtifacts = 0;\n while (downloadedArtifacts < artifacts.count) {\n const currentArtifactToDownload = artifacts.value[downloadedArtifacts];\n downloadedArtifacts += 1;\n core.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`);\n // Get container entries for the specific artifact\n const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl);\n const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path, true);\n if (downloadSpecification.filesToDownload.length === 0) {\n core.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`);\n }\n else {\n yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure);\n yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate);\n yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);\n }\n response.push({\n artifactName: currentArtifactToDownload.name,\n downloadPath: downloadSpecification.rootDownloadLocation\n });\n }\n return response;\n });\n }\n}\nexports.DefaultArtifactClient = DefaultArtifactClient;\n//# sourceMappingURL=artifact-client.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isGhes = exports.getRetentionDays = exports.getWorkSpaceDirectory = exports.getWorkFlowRunId = exports.getRuntimeUrl = exports.getRuntimeToken = exports.getDownloadFileConcurrency = exports.getInitialRetryIntervalInMilliseconds = exports.getRetryMultiplier = exports.getRetryLimit = exports.getUploadChunkSize = exports.getUploadFileConcurrency = void 0;\n// The number of concurrent uploads that happens at the same time\nfunction getUploadFileConcurrency() {\n return 2;\n}\nexports.getUploadFileConcurrency = getUploadFileConcurrency;\n// When uploading large files that can't be uploaded with a single http call, this controls\n// the chunk size that is used during upload\nfunction getUploadChunkSize() {\n return 8 * 1024 * 1024; // 8 MB Chunks\n}\nexports.getUploadChunkSize = getUploadChunkSize;\n// The maximum number of retries that can be attempted before an upload or download fails\nfunction getRetryLimit() {\n return 5;\n}\nexports.getRetryLimit = getRetryLimit;\n// With exponential backoff, the larger the retry count, the larger the wait time before another attempt\n// The retry multiplier controls by how much the backOff time increases depending on the number of retries\nfunction getRetryMultiplier() {\n return 1.5;\n}\nexports.getRetryMultiplier = getRetryMultiplier;\n// The initial wait time if an upload or download fails and a retry is being attempted for the first time\nfunction getInitialRetryIntervalInMilliseconds() {\n return 3000;\n}\nexports.getInitialRetryIntervalInMilliseconds = getInitialRetryIntervalInMilliseconds;\n// The number of concurrent downloads that happens at the same time\nfunction getDownloadFileConcurrency() {\n return 2;\n}\nexports.getDownloadFileConcurrency = getDownloadFileConcurrency;\nfunction getRuntimeToken() {\n const token = process.env['ACTIONS_RUNTIME_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_RUNTIME_TOKEN env variable');\n }\n return token;\n}\nexports.getRuntimeToken = getRuntimeToken;\nfunction getRuntimeUrl() {\n const runtimeUrl = process.env['ACTIONS_RUNTIME_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_RUNTIME_URL env variable');\n }\n return runtimeUrl;\n}\nexports.getRuntimeUrl = getRuntimeUrl;\nfunction getWorkFlowRunId() {\n const workFlowRunId = process.env['GITHUB_RUN_ID'];\n if (!workFlowRunId) {\n throw new Error('Unable to get GITHUB_RUN_ID env variable');\n }\n return workFlowRunId;\n}\nexports.getWorkFlowRunId = getWorkFlowRunId;\nfunction getWorkSpaceDirectory() {\n const workspaceDirectory = process.env['GITHUB_WORKSPACE'];\n if (!workspaceDirectory) {\n throw new Error('Unable to get GITHUB_WORKSPACE env variable');\n }\n return workspaceDirectory;\n}\nexports.getWorkSpaceDirectory = getWorkSpaceDirectory;\nfunction getRetentionDays() {\n return process.env['GITHUB_RETENTION_DAYS'];\n}\nexports.getRetentionDays = getRetentionDays;\nfunction isGhes() {\n const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');\n return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';\n}\nexports.isGhes = isGhes;\n//# sourceMappingURL=config-variables.js.map","\"use strict\";\n/**\n * CRC64: cyclic redundancy check, 64-bits\n *\n * In order to validate that artifacts are not being corrupted over the wire, this redundancy check allows us to\n * validate that there was no corruption during transmission. The implementation here is based on Go's hash/crc64 pkg,\n * but without the slicing-by-8 optimization: https://cs.opensource.google/go/go/+/master:src/hash/crc64/crc64.go\n *\n * This implementation uses a pregenerated table based on 0x9A6C9329AC4BC9B5 as the polynomial, the same polynomial that\n * is used for Azure Storage: https://github.com/Azure/azure-storage-net/blob/cbe605f9faa01bfc3003d75fc5a16b2eaccfe102/Lib/Common/Core/Util/Crc64.cs#L27\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// when transpile target is >= ES2020 (after dropping node 12) these can be changed to bigint literals - ts(2737)\nconst PREGEN_POLY_TABLE = [\n BigInt('0x0000000000000000'),\n BigInt('0x7F6EF0C830358979'),\n BigInt('0xFEDDE190606B12F2'),\n BigInt('0x81B31158505E9B8B'),\n BigInt('0xC962E5739841B68F'),\n BigInt('0xB60C15BBA8743FF6'),\n BigInt('0x37BF04E3F82AA47D'),\n BigInt('0x48D1F42BC81F2D04'),\n BigInt('0xA61CECB46814FE75'),\n BigInt('0xD9721C7C5821770C'),\n BigInt('0x58C10D24087FEC87'),\n BigInt('0x27AFFDEC384A65FE'),\n BigInt('0x6F7E09C7F05548FA'),\n BigInt('0x1010F90FC060C183'),\n BigInt('0x91A3E857903E5A08'),\n BigInt('0xEECD189FA00BD371'),\n BigInt('0x78E0FF3B88BE6F81'),\n BigInt('0x078E0FF3B88BE6F8'),\n BigInt('0x863D1EABE8D57D73'),\n BigInt('0xF953EE63D8E0F40A'),\n BigInt('0xB1821A4810FFD90E'),\n BigInt('0xCEECEA8020CA5077'),\n BigInt('0x4F5FFBD87094CBFC'),\n BigInt('0x30310B1040A14285'),\n BigInt('0xDEFC138FE0AA91F4'),\n BigInt('0xA192E347D09F188D'),\n BigInt('0x2021F21F80C18306'),\n BigInt('0x5F4F02D7B0F40A7F'),\n BigInt('0x179EF6FC78EB277B'),\n BigInt('0x68F0063448DEAE02'),\n BigInt('0xE943176C18803589'),\n BigInt('0x962DE7A428B5BCF0'),\n BigInt('0xF1C1FE77117CDF02'),\n BigInt('0x8EAF0EBF2149567B'),\n BigInt('0x0F1C1FE77117CDF0'),\n BigInt('0x7072EF2F41224489'),\n BigInt('0x38A31B04893D698D'),\n BigInt('0x47CDEBCCB908E0F4'),\n BigInt('0xC67EFA94E9567B7F'),\n BigInt('0xB9100A5CD963F206'),\n BigInt('0x57DD12C379682177'),\n BigInt('0x28B3E20B495DA80E'),\n BigInt('0xA900F35319033385'),\n BigInt('0xD66E039B2936BAFC'),\n BigInt('0x9EBFF7B0E12997F8'),\n BigInt('0xE1D10778D11C1E81'),\n BigInt('0x606216208142850A'),\n BigInt('0x1F0CE6E8B1770C73'),\n BigInt('0x8921014C99C2B083'),\n BigInt('0xF64FF184A9F739FA'),\n BigInt('0x77FCE0DCF9A9A271'),\n BigInt('0x08921014C99C2B08'),\n BigInt('0x4043E43F0183060C'),\n BigInt('0x3F2D14F731B68F75'),\n BigInt('0xBE9E05AF61E814FE'),\n BigInt('0xC1F0F56751DD9D87'),\n BigInt('0x2F3DEDF8F1D64EF6'),\n BigInt('0x50531D30C1E3C78F'),\n BigInt('0xD1E00C6891BD5C04'),\n BigInt('0xAE8EFCA0A188D57D'),\n BigInt('0xE65F088B6997F879'),\n BigInt('0x9931F84359A27100'),\n BigInt('0x1882E91B09FCEA8B'),\n BigInt('0x67EC19D339C963F2'),\n BigInt('0xD75ADABD7A6E2D6F'),\n BigInt('0xA8342A754A5BA416'),\n BigInt('0x29873B2D1A053F9D'),\n BigInt('0x56E9CBE52A30B6E4'),\n BigInt('0x1E383FCEE22F9BE0'),\n BigInt('0x6156CF06D21A1299'),\n BigInt('0xE0E5DE5E82448912'),\n BigInt('0x9F8B2E96B271006B'),\n BigInt('0x71463609127AD31A'),\n BigInt('0x0E28C6C1224F5A63'),\n BigInt('0x8F9BD7997211C1E8'),\n BigInt('0xF0F5275142244891'),\n BigInt('0xB824D37A8A3B6595'),\n BigInt('0xC74A23B2BA0EECEC'),\n BigInt('0x46F932EAEA507767'),\n BigInt('0x3997C222DA65FE1E'),\n BigInt('0xAFBA2586F2D042EE'),\n BigInt('0xD0D4D54EC2E5CB97'),\n BigInt('0x5167C41692BB501C'),\n BigInt('0x2E0934DEA28ED965'),\n BigInt('0x66D8C0F56A91F461'),\n BigInt('0x19B6303D5AA47D18'),\n BigInt('0x980521650AFAE693'),\n BigInt('0xE76BD1AD3ACF6FEA'),\n BigInt('0x09A6C9329AC4BC9B'),\n BigInt('0x76C839FAAAF135E2'),\n BigInt('0xF77B28A2FAAFAE69'),\n BigInt('0x8815D86ACA9A2710'),\n BigInt('0xC0C42C4102850A14'),\n BigInt('0xBFAADC8932B0836D'),\n BigInt('0x3E19CDD162EE18E6'),\n BigInt('0x41773D1952DB919F'),\n BigInt('0x269B24CA6B12F26D'),\n BigInt('0x59F5D4025B277B14'),\n BigInt('0xD846C55A0B79E09F'),\n BigInt('0xA72835923B4C69E6'),\n BigInt('0xEFF9C1B9F35344E2'),\n BigInt('0x90973171C366CD9B'),\n BigInt('0x1124202993385610'),\n BigInt('0x6E4AD0E1A30DDF69'),\n BigInt('0x8087C87E03060C18'),\n BigInt('0xFFE938B633338561'),\n BigInt('0x7E5A29EE636D1EEA'),\n BigInt('0x0134D92653589793'),\n BigInt('0x49E52D0D9B47BA97'),\n BigInt('0x368BDDC5AB7233EE'),\n BigInt('0xB738CC9DFB2CA865'),\n BigInt('0xC8563C55CB19211C'),\n BigInt('0x5E7BDBF1E3AC9DEC'),\n BigInt('0x21152B39D3991495'),\n BigInt('0xA0A63A6183C78F1E'),\n BigInt('0xDFC8CAA9B3F20667'),\n BigInt('0x97193E827BED2B63'),\n BigInt('0xE877CE4A4BD8A21A'),\n BigInt('0x69C4DF121B863991'),\n BigInt('0x16AA2FDA2BB3B0E8'),\n BigInt('0xF86737458BB86399'),\n BigInt('0x8709C78DBB8DEAE0'),\n BigInt('0x06BAD6D5EBD3716B'),\n BigInt('0x79D4261DDBE6F812'),\n BigInt('0x3105D23613F9D516'),\n BigInt('0x4E6B22FE23CC5C6F'),\n BigInt('0xCFD833A67392C7E4'),\n BigInt('0xB0B6C36E43A74E9D'),\n BigInt('0x9A6C9329AC4BC9B5'),\n BigInt('0xE50263E19C7E40CC'),\n BigInt('0x64B172B9CC20DB47'),\n BigInt('0x1BDF8271FC15523E'),\n BigInt('0x530E765A340A7F3A'),\n BigInt('0x2C608692043FF643'),\n BigInt('0xADD397CA54616DC8'),\n BigInt('0xD2BD67026454E4B1'),\n BigInt('0x3C707F9DC45F37C0'),\n BigInt('0x431E8F55F46ABEB9'),\n BigInt('0xC2AD9E0DA4342532'),\n BigInt('0xBDC36EC59401AC4B'),\n BigInt('0xF5129AEE5C1E814F'),\n BigInt('0x8A7C6A266C2B0836'),\n BigInt('0x0BCF7B7E3C7593BD'),\n BigInt('0x74A18BB60C401AC4'),\n BigInt('0xE28C6C1224F5A634'),\n BigInt('0x9DE29CDA14C02F4D'),\n BigInt('0x1C518D82449EB4C6'),\n BigInt('0x633F7D4A74AB3DBF'),\n BigInt('0x2BEE8961BCB410BB'),\n BigInt('0x548079A98C8199C2'),\n BigInt('0xD53368F1DCDF0249'),\n BigInt('0xAA5D9839ECEA8B30'),\n BigInt('0x449080A64CE15841'),\n BigInt('0x3BFE706E7CD4D138'),\n BigInt('0xBA4D61362C8A4AB3'),\n BigInt('0xC52391FE1CBFC3CA'),\n BigInt('0x8DF265D5D4A0EECE'),\n BigInt('0xF29C951DE49567B7'),\n BigInt('0x732F8445B4CBFC3C'),\n BigInt('0x0C41748D84FE7545'),\n BigInt('0x6BAD6D5EBD3716B7'),\n BigInt('0x14C39D968D029FCE'),\n BigInt('0x95708CCEDD5C0445'),\n BigInt('0xEA1E7C06ED698D3C'),\n BigInt('0xA2CF882D2576A038'),\n BigInt('0xDDA178E515432941'),\n BigInt('0x5C1269BD451DB2CA'),\n BigInt('0x237C997575283BB3'),\n BigInt('0xCDB181EAD523E8C2'),\n BigInt('0xB2DF7122E51661BB'),\n BigInt('0x336C607AB548FA30'),\n BigInt('0x4C0290B2857D7349'),\n BigInt('0x04D364994D625E4D'),\n BigInt('0x7BBD94517D57D734'),\n BigInt('0xFA0E85092D094CBF'),\n BigInt('0x856075C11D3CC5C6'),\n BigInt('0x134D926535897936'),\n BigInt('0x6C2362AD05BCF04F'),\n BigInt('0xED9073F555E26BC4'),\n BigInt('0x92FE833D65D7E2BD'),\n BigInt('0xDA2F7716ADC8CFB9'),\n BigInt('0xA54187DE9DFD46C0'),\n BigInt('0x24F29686CDA3DD4B'),\n BigInt('0x5B9C664EFD965432'),\n BigInt('0xB5517ED15D9D8743'),\n BigInt('0xCA3F8E196DA80E3A'),\n BigInt('0x4B8C9F413DF695B1'),\n BigInt('0x34E26F890DC31CC8'),\n BigInt('0x7C339BA2C5DC31CC'),\n BigInt('0x035D6B6AF5E9B8B5'),\n BigInt('0x82EE7A32A5B7233E'),\n BigInt('0xFD808AFA9582AA47'),\n BigInt('0x4D364994D625E4DA'),\n BigInt('0x3258B95CE6106DA3'),\n BigInt('0xB3EBA804B64EF628'),\n BigInt('0xCC8558CC867B7F51'),\n BigInt('0x8454ACE74E645255'),\n BigInt('0xFB3A5C2F7E51DB2C'),\n BigInt('0x7A894D772E0F40A7'),\n BigInt('0x05E7BDBF1E3AC9DE'),\n BigInt('0xEB2AA520BE311AAF'),\n BigInt('0x944455E88E0493D6'),\n BigInt('0x15F744B0DE5A085D'),\n BigInt('0x6A99B478EE6F8124'),\n BigInt('0x224840532670AC20'),\n BigInt('0x5D26B09B16452559'),\n BigInt('0xDC95A1C3461BBED2'),\n BigInt('0xA3FB510B762E37AB'),\n BigInt('0x35D6B6AF5E9B8B5B'),\n BigInt('0x4AB846676EAE0222'),\n BigInt('0xCB0B573F3EF099A9'),\n BigInt('0xB465A7F70EC510D0'),\n BigInt('0xFCB453DCC6DA3DD4'),\n BigInt('0x83DAA314F6EFB4AD'),\n BigInt('0x0269B24CA6B12F26'),\n BigInt('0x7D0742849684A65F'),\n BigInt('0x93CA5A1B368F752E'),\n BigInt('0xECA4AAD306BAFC57'),\n BigInt('0x6D17BB8B56E467DC'),\n BigInt('0x12794B4366D1EEA5'),\n BigInt('0x5AA8BF68AECEC3A1'),\n BigInt('0x25C64FA09EFB4AD8'),\n BigInt('0xA4755EF8CEA5D153'),\n BigInt('0xDB1BAE30FE90582A'),\n BigInt('0xBCF7B7E3C7593BD8'),\n BigInt('0xC399472BF76CB2A1'),\n BigInt('0x422A5673A732292A'),\n BigInt('0x3D44A6BB9707A053'),\n BigInt('0x759552905F188D57'),\n BigInt('0x0AFBA2586F2D042E'),\n BigInt('0x8B48B3003F739FA5'),\n BigInt('0xF42643C80F4616DC'),\n BigInt('0x1AEB5B57AF4DC5AD'),\n BigInt('0x6585AB9F9F784CD4'),\n BigInt('0xE436BAC7CF26D75F'),\n BigInt('0x9B584A0FFF135E26'),\n BigInt('0xD389BE24370C7322'),\n BigInt('0xACE74EEC0739FA5B'),\n BigInt('0x2D545FB4576761D0'),\n BigInt('0x523AAF7C6752E8A9'),\n BigInt('0xC41748D84FE75459'),\n BigInt('0xBB79B8107FD2DD20'),\n BigInt('0x3ACAA9482F8C46AB'),\n BigInt('0x45A459801FB9CFD2'),\n BigInt('0x0D75ADABD7A6E2D6'),\n BigInt('0x721B5D63E7936BAF'),\n BigInt('0xF3A84C3BB7CDF024'),\n BigInt('0x8CC6BCF387F8795D'),\n BigInt('0x620BA46C27F3AA2C'),\n BigInt('0x1D6554A417C62355'),\n BigInt('0x9CD645FC4798B8DE'),\n BigInt('0xE3B8B53477AD31A7'),\n BigInt('0xAB69411FBFB21CA3'),\n BigInt('0xD407B1D78F8795DA'),\n BigInt('0x55B4A08FDFD90E51'),\n BigInt('0x2ADA5047EFEC8728')\n];\nclass CRC64 {\n constructor() {\n this._crc = BigInt(0);\n }\n update(data) {\n const buffer = typeof data === 'string' ? Buffer.from(data) : data;\n let crc = CRC64.flip64Bits(this._crc);\n for (const dataByte of buffer) {\n const crcByte = Number(crc & BigInt(0xff));\n crc = PREGEN_POLY_TABLE[crcByte ^ dataByte] ^ (crc >> BigInt(8));\n }\n this._crc = CRC64.flip64Bits(crc);\n }\n digest(encoding) {\n switch (encoding) {\n case 'hex':\n return this._crc.toString(16).toUpperCase();\n case 'base64':\n return this.toBuffer().toString('base64');\n default:\n return this.toBuffer();\n }\n }\n toBuffer() {\n return Buffer.from([0, 8, 16, 24, 32, 40, 48, 56].map(s => Number((this._crc >> BigInt(s)) & BigInt(0xff))));\n }\n static flip64Bits(n) {\n return (BigInt(1) << BigInt(64)) - BigInt(1) - n;\n }\n}\nexports.default = CRC64;\n//# sourceMappingURL=crc64.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DownloadHttpClient = void 0;\nconst fs = __importStar(require(\"fs\"));\nconst core = __importStar(require(\"@actions/core\"));\nconst zlib = __importStar(require(\"zlib\"));\nconst utils_1 = require(\"./utils\");\nconst url_1 = require(\"url\");\nconst status_reporter_1 = require(\"./status-reporter\");\nconst perf_hooks_1 = require(\"perf_hooks\");\nconst http_manager_1 = require(\"./http-manager\");\nconst config_variables_1 = require(\"./config-variables\");\nconst requestUtils_1 = require(\"./requestUtils\");\nclass DownloadHttpClient {\n constructor() {\n this.downloadHttpManager = new http_manager_1.HttpManager((0, config_variables_1.getDownloadFileConcurrency)(), '@actions/artifact-download');\n // downloads are usually significantly faster than uploads so display status information every second\n this.statusReporter = new status_reporter_1.StatusReporter(1000);\n }\n /**\n * Gets a list of all artifacts that are in a specific container\n */\n listArtifacts() {\n return __awaiter(this, void 0, void 0, function* () {\n const artifactUrl = (0, utils_1.getArtifactUrl)();\n // use the first client from the httpManager, `keep-alive` is not used so the connection will close immediately\n const client = this.downloadHttpManager.getClient(0);\n const headers = (0, utils_1.getDownloadHeaders)('application/json');\n const response = yield (0, requestUtils_1.retryHttpClientRequest)('List Artifacts', () => __awaiter(this, void 0, void 0, function* () { return client.get(artifactUrl, headers); }));\n const body = yield response.readBody();\n return JSON.parse(body);\n });\n }\n /**\n * Fetches a set of container items that describe the contents of an artifact\n * @param artifactName the name of the artifact\n * @param containerUrl the artifact container URL for the run\n */\n getContainerItems(artifactName, containerUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n // the itemPath search parameter controls which containers will be returned\n const resourceUrl = new url_1.URL(containerUrl);\n resourceUrl.searchParams.append('itemPath', artifactName);\n // use the first client from the httpManager, `keep-alive` is not used so the connection will close immediately\n const client = this.downloadHttpManager.getClient(0);\n const headers = (0, utils_1.getDownloadHeaders)('application/json');\n const response = yield (0, requestUtils_1.retryHttpClientRequest)('Get Container Items', () => __awaiter(this, void 0, void 0, function* () { return client.get(resourceUrl.toString(), headers); }));\n const body = yield response.readBody();\n return JSON.parse(body);\n });\n }\n /**\n * Concurrently downloads all the files that are part of an artifact\n * @param downloadItems information about what items to download and where to save them\n */\n downloadSingleArtifact(downloadItems) {\n return __awaiter(this, void 0, void 0, function* () {\n const DOWNLOAD_CONCURRENCY = (0, config_variables_1.getDownloadFileConcurrency)();\n // limit the number of files downloaded at a single time\n core.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`);\n const parallelDownloads = [...new Array(DOWNLOAD_CONCURRENCY).keys()];\n let currentFile = 0;\n let downloadedFiles = 0;\n core.info(`Total number of files that will be downloaded: ${downloadItems.length}`);\n this.statusReporter.setTotalNumberOfFilesToProcess(downloadItems.length);\n this.statusReporter.start();\n yield Promise.all(parallelDownloads.map((index) => __awaiter(this, void 0, void 0, function* () {\n while (currentFile < downloadItems.length) {\n const currentFileToDownload = downloadItems[currentFile];\n currentFile += 1;\n const startTime = perf_hooks_1.performance.now();\n yield this.downloadIndividualFile(index, currentFileToDownload.sourceLocation, currentFileToDownload.targetPath);\n if (core.isDebug()) {\n core.debug(`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish downloading`);\n }\n this.statusReporter.incrementProcessedCount();\n }\n })))\n .catch(error => {\n throw new Error(`Unable to download the artifact: ${error}`);\n })\n .finally(() => {\n this.statusReporter.stop();\n // safety dispose all connections\n this.downloadHttpManager.disposeAndReplaceAllClients();\n });\n });\n }\n /**\n * Downloads an individual file\n * @param httpClientIndex the index of the http client that is used to make all of the calls\n * @param artifactLocation origin location where a file will be downloaded from\n * @param downloadPath destination location for the file being downloaded\n */\n downloadIndividualFile(httpClientIndex, artifactLocation, downloadPath) {\n return __awaiter(this, void 0, void 0, function* () {\n let retryCount = 0;\n const retryLimit = (0, config_variables_1.getRetryLimit)();\n let destinationStream = fs.createWriteStream(downloadPath);\n const headers = (0, utils_1.getDownloadHeaders)('application/json', true, true);\n // a single GET request is used to download a file\n const makeDownloadRequest = () => __awaiter(this, void 0, void 0, function* () {\n const client = this.downloadHttpManager.getClient(httpClientIndex);\n return yield client.get(artifactLocation, headers);\n });\n // check the response headers to determine if the file was compressed using gzip\n const isGzip = (incomingHeaders) => {\n return ('content-encoding' in incomingHeaders &&\n incomingHeaders['content-encoding'] === 'gzip');\n };\n // Increments the current retry count and then checks if the retry limit has been reached\n // If there have been too many retries, fail so the download stops. If there is a retryAfterValue value provided,\n // it will be used\n const backOff = (retryAfterValue) => __awaiter(this, void 0, void 0, function* () {\n retryCount++;\n if (retryCount > retryLimit) {\n return Promise.reject(new Error(`Retry limit has been reached. Unable to download ${artifactLocation}`));\n }\n else {\n this.downloadHttpManager.disposeAndReplaceClient(httpClientIndex);\n if (retryAfterValue) {\n // Back off by waiting the specified time denoted by the retry-after header\n core.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the download`);\n yield (0, utils_1.sleep)(retryAfterValue);\n }\n else {\n // Back off using an exponential value that depends on the retry count\n const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount);\n core.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the download`);\n yield (0, utils_1.sleep)(backoffTime);\n }\n core.info(`Finished backoff for retry #${retryCount}, continuing with download`);\n }\n });\n const isAllBytesReceived = (expected, received) => {\n // be lenient, if any input is missing, assume success, i.e. not truncated\n if (!expected ||\n !received ||\n process.env['ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION']) {\n core.info('Skipping download validation.');\n return true;\n }\n return parseInt(expected) === received;\n };\n const resetDestinationStream = (fileDownloadPath) => __awaiter(this, void 0, void 0, function* () {\n destinationStream.close();\n // await until file is created at downloadpath; node15 and up fs.createWriteStream had not created a file yet\n yield new Promise(resolve => {\n destinationStream.on('close', resolve);\n if (destinationStream.writableFinished) {\n resolve();\n }\n });\n yield (0, utils_1.rmFile)(fileDownloadPath);\n destinationStream = fs.createWriteStream(fileDownloadPath);\n });\n // keep trying to download a file until a retry limit has been reached\n while (retryCount <= retryLimit) {\n let response;\n try {\n response = yield makeDownloadRequest();\n }\n catch (error) {\n // if an error is caught, it is usually indicative of a timeout so retry the download\n core.info('An error occurred while attempting to download a file');\n // eslint-disable-next-line no-console\n console.log(error);\n // increment the retryCount and use exponential backoff to wait before making the next request\n yield backOff();\n continue;\n }\n let forceRetry = false;\n if ((0, utils_1.isSuccessStatusCode)(response.message.statusCode)) {\n // The body contains the contents of the file however calling response.readBody() causes all the content to be converted to a string\n // which can cause some gzip encoded data to be lost\n // Instead of using response.readBody(), response.message is a readableStream that can be directly used to get the raw body contents\n try {\n const isGzipped = isGzip(response.message.headers);\n yield this.pipeResponseToFile(response, destinationStream, isGzipped);\n if (isGzipped ||\n isAllBytesReceived(response.message.headers['content-length'], yield (0, utils_1.getFileSize)(downloadPath))) {\n return;\n }\n else {\n forceRetry = true;\n }\n }\n catch (error) {\n // retry on error, most likely streams were corrupted\n forceRetry = true;\n }\n }\n if (forceRetry || (0, utils_1.isRetryableStatusCode)(response.message.statusCode)) {\n core.info(`A ${response.message.statusCode} response code has been received while attempting to download an artifact`);\n resetDestinationStream(downloadPath);\n // if a throttled status code is received, try to get the retryAfter header value, else differ to standard exponential backoff\n (0, utils_1.isThrottledStatusCode)(response.message.statusCode)\n ? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers))\n : yield backOff();\n }\n else {\n // Some unexpected response code, fail immediately and stop the download\n (0, utils_1.displayHttpDiagnostics)(response);\n return Promise.reject(new Error(`Unexpected http ${response.message.statusCode} during download for ${artifactLocation}`));\n }\n }\n });\n }\n /**\n * Pipes the response from downloading an individual file to the appropriate destination stream while decoding gzip content if necessary\n * @param response the http response received when downloading a file\n * @param destinationStream the stream where the file should be written to\n * @param isGzip a boolean denoting if the content is compressed using gzip and if we need to decode it\n */\n pipeResponseToFile(response, destinationStream, isGzip) {\n return __awaiter(this, void 0, void 0, function* () {\n yield new Promise((resolve, reject) => {\n if (isGzip) {\n const gunzip = zlib.createGunzip();\n response.message\n .on('error', error => {\n core.info(`An error occurred while attempting to read the response stream`);\n gunzip.close();\n destinationStream.close();\n reject(error);\n })\n .pipe(gunzip)\n .on('error', error => {\n core.info(`An error occurred while attempting to decompress the response stream`);\n destinationStream.close();\n reject(error);\n })\n .pipe(destinationStream)\n .on('close', () => {\n resolve();\n })\n .on('error', error => {\n core.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`);\n reject(error);\n });\n }\n else {\n response.message\n .on('error', error => {\n core.info(`An error occurred while attempting to read the response stream`);\n destinationStream.close();\n reject(error);\n })\n .pipe(destinationStream)\n .on('close', () => {\n resolve();\n })\n .on('error', error => {\n core.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`);\n reject(error);\n });\n }\n });\n return;\n });\n }\n}\nexports.DownloadHttpClient = DownloadHttpClient;\n//# sourceMappingURL=download-http-client.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDownloadSpecification = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * Creates a specification for a set of files that will be downloaded\n * @param artifactName the name of the artifact\n * @param artifactEntries a set of container entries that describe that files that make up an artifact\n * @param downloadPath the path where the artifact will be downloaded to\n * @param includeRootDirectory specifies if there should be an extra directory (denoted by the artifact name) where the artifact files should be downloaded to\n */\nfunction getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) {\n // use a set for the directory paths so that there are no duplicates\n const directories = new Set();\n const specifications = {\n rootDownloadLocation: includeRootDirectory\n ? path.join(downloadPath, artifactName)\n : downloadPath,\n directoryStructure: [],\n emptyFilesToCreate: [],\n filesToDownload: []\n };\n for (const entry of artifactEntries) {\n // Ignore artifacts in the container that don't begin with the same name\n if (entry.path.startsWith(`${artifactName}/`) ||\n entry.path.startsWith(`${artifactName}\\\\`)) {\n // normalize all separators to the local OS\n const normalizedPathEntry = path.normalize(entry.path);\n // entry.path always starts with the artifact name, if includeRootDirectory is false, remove the name from the beginning of the path\n const filePath = path.join(downloadPath, includeRootDirectory\n ? normalizedPathEntry\n : normalizedPathEntry.replace(artifactName, ''));\n // Case insensitive folder structure maintained in the backend, not every folder is created so the 'folder'\n // itemType cannot be relied upon. The file must be used to determine the directory structure\n if (entry.itemType === 'file') {\n // Get the directories that we need to create from the filePath for each individual file\n directories.add(path.dirname(filePath));\n if (entry.fileLength === 0) {\n // An empty file was uploaded, create the empty files locally so that no extra http calls are made\n specifications.emptyFilesToCreate.push(filePath);\n }\n else {\n specifications.filesToDownload.push({\n sourceLocation: entry.contentLocation,\n targetPath: filePath\n });\n }\n }\n }\n }\n specifications.directoryStructure = Array.from(directories);\n return specifications;\n}\nexports.getDownloadSpecification = getDownloadSpecification;\n//# sourceMappingURL=download-specification.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpManager = void 0;\nconst utils_1 = require(\"./utils\");\n/**\n * Used for managing http clients during either upload or download\n */\nclass HttpManager {\n constructor(clientCount, userAgent) {\n if (clientCount < 1) {\n throw new Error('There must be at least one client');\n }\n this.userAgent = userAgent;\n this.clients = new Array(clientCount).fill((0, utils_1.createHttpClient)(userAgent));\n }\n getClient(index) {\n return this.clients[index];\n }\n // client disposal is necessary if a keep-alive connection is used to properly close the connection\n // for more information see: https://github.com/actions/http-client/blob/04e5ad73cd3fd1f5610a32116b0759eddf6570d2/index.ts#L292\n disposeAndReplaceClient(index) {\n this.clients[index].dispose();\n this.clients[index] = (0, utils_1.createHttpClient)(this.userAgent);\n }\n disposeAndReplaceAllClients() {\n for (const [index] of this.clients.entries()) {\n this.disposeAndReplaceClient(index);\n }\n }\n}\nexports.HttpManager = HttpManager;\n//# sourceMappingURL=http-manager.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkArtifactFilePath = exports.checkArtifactName = void 0;\nconst core_1 = require(\"@actions/core\");\n/**\n * Invalid characters that cannot be in the artifact name or an uploaded file. Will be rejected\n * from the server if attempted to be sent over. These characters are not allowed due to limitations with certain\n * file systems such as NTFS. To maintain platform-agnostic behavior, all characters that are not supported by an\n * individual filesystem/platform will not be supported on all fileSystems/platforms\n *\n * FilePaths can include characters such as \\ and / which are not permitted in the artifact name alone\n */\nconst invalidArtifactFilePathCharacters = new Map([\n ['\"', ' Double quote \"'],\n [':', ' Colon :'],\n ['<', ' Less than <'],\n ['>', ' Greater than >'],\n ['|', ' Vertical bar |'],\n ['*', ' Asterisk *'],\n ['?', ' Question mark ?'],\n ['\\r', ' Carriage return \\\\r'],\n ['\\n', ' Line feed \\\\n']\n]);\nconst invalidArtifactNameCharacters = new Map([\n ...invalidArtifactFilePathCharacters,\n ['\\\\', ' Backslash \\\\'],\n ['/', ' Forward slash /']\n]);\n/**\n * Scans the name of the artifact to make sure there are no illegal characters\n */\nfunction checkArtifactName(name) {\n if (!name) {\n throw new Error(`Artifact name: ${name}, is incorrectly provided`);\n }\n for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactNameCharacters) {\n if (name.includes(invalidCharacterKey)) {\n throw new Error(`Artifact name is not valid: ${name}. Contains the following character: ${errorMessageForCharacter}\n \nInvalid characters include: ${Array.from(invalidArtifactNameCharacters.values()).toString()}\n \nThese characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);\n }\n }\n (0, core_1.info)(`Artifact name is valid!`);\n}\nexports.checkArtifactName = checkArtifactName;\n/**\n * Scans the name of the filePath used to make sure there are no illegal characters\n */\nfunction checkArtifactFilePath(path) {\n if (!path) {\n throw new Error(`Artifact path: ${path}, is incorrectly provided`);\n }\n for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) {\n if (path.includes(invalidCharacterKey)) {\n throw new Error(`Artifact path is not valid: ${path}. Contains the following character: ${errorMessageForCharacter}\n \nInvalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()}\n \nThe following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.\n `);\n }\n }\n}\nexports.checkArtifactFilePath = checkArtifactFilePath;\n//# sourceMappingURL=path-and-artifact-name-validation.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryHttpClientRequest = exports.retry = void 0;\nconst utils_1 = require(\"./utils\");\nconst core = __importStar(require(\"@actions/core\"));\nconst config_variables_1 = require(\"./config-variables\");\nfunction retry(name, operation, customErrorMessages, maxAttempts) {\n return __awaiter(this, void 0, void 0, function* () {\n let response = undefined;\n let statusCode = undefined;\n let isRetryable = false;\n let errorMessage = '';\n let customErrorInformation = undefined;\n let attempt = 1;\n while (attempt <= maxAttempts) {\n try {\n response = yield operation();\n statusCode = response.message.statusCode;\n if ((0, utils_1.isSuccessStatusCode)(statusCode)) {\n return response;\n }\n // Extra error information that we want to display if a particular response code is hit\n if (statusCode) {\n customErrorInformation = customErrorMessages.get(statusCode);\n }\n isRetryable = (0, utils_1.isRetryableStatusCode)(statusCode);\n errorMessage = `Artifact service responded with ${statusCode}`;\n }\n catch (error) {\n isRetryable = true;\n errorMessage = error.message;\n }\n if (!isRetryable) {\n core.info(`${name} - Error is not retryable`);\n if (response) {\n (0, utils_1.displayHttpDiagnostics)(response);\n }\n break;\n }\n core.info(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`);\n yield (0, utils_1.sleep)((0, utils_1.getExponentialRetryTimeInMilliseconds)(attempt));\n attempt++;\n }\n if (response) {\n (0, utils_1.displayHttpDiagnostics)(response);\n }\n if (customErrorInformation) {\n throw Error(`${name} failed: ${customErrorInformation}`);\n }\n throw Error(`${name} failed: ${errorMessage}`);\n });\n}\nexports.retry = retry;\nfunction retryHttpClientRequest(name, method, customErrorMessages = new Map(), maxAttempts = (0, config_variables_1.getRetryLimit)()) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield retry(name, method, customErrorMessages, maxAttempts);\n });\n}\nexports.retryHttpClientRequest = retryHttpClientRequest;\n//# sourceMappingURL=requestUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StatusReporter = void 0;\nconst core_1 = require(\"@actions/core\");\n/**\n * Status Reporter that displays information about the progress/status of an artifact that is being uploaded or downloaded\n *\n * Variable display time that can be adjusted using the displayFrequencyInMilliseconds variable\n * The total status of the upload/download gets displayed according to this value\n * If there is a large file that is being uploaded, extra information about the individual status can also be displayed using the updateLargeFileStatus function\n */\nclass StatusReporter {\n constructor(displayFrequencyInMilliseconds) {\n this.totalNumberOfFilesToProcess = 0;\n this.processedCount = 0;\n this.largeFiles = new Map();\n this.totalFileStatus = undefined;\n this.displayFrequencyInMilliseconds = displayFrequencyInMilliseconds;\n }\n setTotalNumberOfFilesToProcess(fileTotal) {\n this.totalNumberOfFilesToProcess = fileTotal;\n this.processedCount = 0;\n }\n start() {\n // displays information about the total upload/download status\n this.totalFileStatus = setInterval(() => {\n // display 1 decimal place without any rounding\n const percentage = this.formatPercentage(this.processedCount, this.totalNumberOfFilesToProcess);\n (0, core_1.info)(`Total file count: ${this.totalNumberOfFilesToProcess} ---- Processed file #${this.processedCount} (${percentage.slice(0, percentage.indexOf('.') + 2)}%)`);\n }, this.displayFrequencyInMilliseconds);\n }\n // if there is a large file that is being uploaded in chunks, this is used to display extra information about the status of the upload\n updateLargeFileStatus(fileName, chunkStartIndex, chunkEndIndex, totalUploadFileSize) {\n // display 1 decimal place without any rounding\n const percentage = this.formatPercentage(chunkEndIndex, totalUploadFileSize);\n (0, core_1.info)(`Uploaded ${fileName} (${percentage.slice(0, percentage.indexOf('.') + 2)}%) bytes ${chunkStartIndex}:${chunkEndIndex}`);\n }\n stop() {\n if (this.totalFileStatus) {\n clearInterval(this.totalFileStatus);\n }\n }\n incrementProcessedCount() {\n this.processedCount++;\n }\n formatPercentage(numerator, denominator) {\n // toFixed() rounds, so use extra precision to display accurate information even though 4 decimal places are not displayed\n return ((numerator / denominator) * 100).toFixed(4).toString();\n }\n}\nexports.StatusReporter = StatusReporter;\n//# sourceMappingURL=status-reporter.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createGZipFileInBuffer = exports.createGZipFileOnDisk = void 0;\nconst fs = __importStar(require(\"fs\"));\nconst zlib = __importStar(require(\"zlib\"));\nconst util_1 = require(\"util\");\nconst stat = (0, util_1.promisify)(fs.stat);\n/**\n * GZipping certain files that are already compressed will likely not yield further size reductions. Creating large temporary gzip\n * files then will just waste a lot of time before ultimately being discarded (especially for very large files).\n * If any of these types of files are encountered then on-disk gzip creation will be skipped and the original file will be uploaded as-is\n */\nconst gzipExemptFileExtensions = [\n '.gz',\n '.gzip',\n '.tgz',\n '.taz',\n '.Z',\n '.taZ',\n '.bz2',\n '.tbz',\n '.tbz2',\n '.tz2',\n '.lz',\n '.lzma',\n '.tlz',\n '.lzo',\n '.xz',\n '.txz',\n '.zst',\n '.zstd',\n '.tzst',\n '.zip',\n '.7z' // 7ZIP\n];\n/**\n * Creates a Gzip compressed file of an original file at the provided temporary filepath location\n * @param {string} originalFilePath filepath of whatever will be compressed. The original file will be unmodified\n * @param {string} tempFilePath the location of where the Gzip file will be created\n * @returns the size of gzip file that gets created\n */\nfunction createGZipFileOnDisk(originalFilePath, tempFilePath) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const gzipExemptExtension of gzipExemptFileExtensions) {\n if (originalFilePath.endsWith(gzipExemptExtension)) {\n // return a really large number so that the original file gets uploaded\n return Number.MAX_SAFE_INTEGER;\n }\n }\n return new Promise((resolve, reject) => {\n const inputStream = fs.createReadStream(originalFilePath);\n const gzip = zlib.createGzip();\n const outputStream = fs.createWriteStream(tempFilePath);\n inputStream.pipe(gzip).pipe(outputStream);\n outputStream.on('finish', () => __awaiter(this, void 0, void 0, function* () {\n // wait for stream to finish before calculating the size which is needed as part of the Content-Length header when starting an upload\n const size = (yield stat(tempFilePath)).size;\n resolve(size);\n }));\n outputStream.on('error', error => {\n // eslint-disable-next-line no-console\n console.log(error);\n reject(error);\n });\n });\n });\n}\nexports.createGZipFileOnDisk = createGZipFileOnDisk;\n/**\n * Creates a GZip file in memory using a buffer. Should be used for smaller files to reduce disk I/O\n * @param originalFilePath the path to the original file that is being GZipped\n * @returns a buffer with the GZip file\n */\nfunction createGZipFileInBuffer(originalFilePath) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n var _a, e_1, _b, _c;\n const inputStream = fs.createReadStream(originalFilePath);\n const gzip = zlib.createGzip();\n inputStream.pipe(gzip);\n // read stream into buffer, using experimental async iterators see https://github.com/nodejs/readable-stream/issues/403#issuecomment-479069043\n const chunks = [];\n try {\n for (var _d = true, gzip_1 = __asyncValues(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a;) {\n _c = gzip_1_1.value;\n _d = false;\n try {\n const chunk = _c;\n chunks.push(chunk);\n }\n finally {\n _d = true;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (!_d && !_a && (_b = gzip_1.return)) yield _b.call(gzip_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n resolve(Buffer.concat(chunks));\n }));\n });\n}\nexports.createGZipFileInBuffer = createGZipFileInBuffer;\n//# sourceMappingURL=upload-gzip.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UploadHttpClient = void 0;\nconst fs = __importStar(require(\"fs\"));\nconst core = __importStar(require(\"@actions/core\"));\nconst tmp = __importStar(require(\"tmp-promise\"));\nconst stream = __importStar(require(\"stream\"));\nconst utils_1 = require(\"./utils\");\nconst config_variables_1 = require(\"./config-variables\");\nconst util_1 = require(\"util\");\nconst url_1 = require(\"url\");\nconst perf_hooks_1 = require(\"perf_hooks\");\nconst status_reporter_1 = require(\"./status-reporter\");\nconst http_client_1 = require(\"@actions/http-client\");\nconst http_manager_1 = require(\"./http-manager\");\nconst upload_gzip_1 = require(\"./upload-gzip\");\nconst requestUtils_1 = require(\"./requestUtils\");\nconst stat = (0, util_1.promisify)(fs.stat);\nclass UploadHttpClient {\n constructor() {\n this.uploadHttpManager = new http_manager_1.HttpManager((0, config_variables_1.getUploadFileConcurrency)(), '@actions/artifact-upload');\n this.statusReporter = new status_reporter_1.StatusReporter(10000);\n }\n /**\n * Creates a file container for the new artifact in the remote blob storage/file service\n * @param {string} artifactName Name of the artifact being created\n * @returns The response from the Artifact Service if the file container was successfully created\n */\n createArtifactInFileContainer(artifactName, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const parameters = {\n Type: 'actions_storage',\n Name: artifactName\n };\n // calculate retention period\n if (options && options.retentionDays) {\n const maxRetentionStr = (0, config_variables_1.getRetentionDays)();\n parameters.RetentionDays = (0, utils_1.getProperRetention)(options.retentionDays, maxRetentionStr);\n }\n const data = JSON.stringify(parameters, null, 2);\n const artifactUrl = (0, utils_1.getArtifactUrl)();\n // use the first client from the httpManager, `keep-alive` is not used so the connection will close immediately\n const client = this.uploadHttpManager.getClient(0);\n const headers = (0, utils_1.getUploadHeaders)('application/json', false);\n // Extra information to display when a particular HTTP code is returned\n // If a 403 is returned when trying to create a file container, the customer has exceeded\n // their storage quota so no new artifact containers can be created\n const customErrorMessages = new Map([\n [\n http_client_1.HttpCodes.Forbidden,\n (0, config_variables_1.isGhes)()\n ? 'Please reference [Enabling GitHub Actions for GitHub Enterprise Server](https://docs.github.com/en/enterprise-server@3.8/admin/github-actions/enabling-github-actions-for-github-enterprise-server) to ensure Actions storage is configured correctly.'\n : 'Artifact storage quota has been hit. Unable to upload any new artifacts'\n ],\n [\n http_client_1.HttpCodes.BadRequest,\n `The artifact name ${artifactName} is not valid. Request URL ${artifactUrl}`\n ]\n ]);\n const response = yield (0, requestUtils_1.retryHttpClientRequest)('Create Artifact Container', () => __awaiter(this, void 0, void 0, function* () { return client.post(artifactUrl, data, headers); }), customErrorMessages);\n const body = yield response.readBody();\n return JSON.parse(body);\n });\n }\n /**\n * Concurrently upload all of the files in chunks\n * @param {string} uploadUrl Base Url for the artifact that was created\n * @param {SearchResult[]} filesToUpload A list of information about the files being uploaded\n * @returns The size of all the files uploaded in bytes\n */\n uploadArtifactToFileContainer(uploadUrl, filesToUpload, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const FILE_CONCURRENCY = (0, config_variables_1.getUploadFileConcurrency)();\n const MAX_CHUNK_SIZE = (0, config_variables_1.getUploadChunkSize)();\n core.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`);\n const parameters = [];\n // by default, file uploads will continue if there is an error unless specified differently in the options\n let continueOnError = true;\n if (options) {\n if (options.continueOnError === false) {\n continueOnError = false;\n }\n }\n // prepare the necessary parameters to upload all the files\n for (const file of filesToUpload) {\n const resourceUrl = new url_1.URL(uploadUrl);\n resourceUrl.searchParams.append('itemPath', file.uploadFilePath);\n parameters.push({\n file: file.absoluteFilePath,\n resourceUrl: resourceUrl.toString(),\n maxChunkSize: MAX_CHUNK_SIZE,\n continueOnError\n });\n }\n const parallelUploads = [...new Array(FILE_CONCURRENCY).keys()];\n const failedItemsToReport = [];\n let currentFile = 0;\n let completedFiles = 0;\n let uploadFileSize = 0;\n let totalFileSize = 0;\n let abortPendingFileUploads = false;\n this.statusReporter.setTotalNumberOfFilesToProcess(filesToUpload.length);\n this.statusReporter.start();\n // only allow a certain amount of files to be uploaded at once, this is done to reduce potential errors\n yield Promise.all(parallelUploads.map((index) => __awaiter(this, void 0, void 0, function* () {\n while (currentFile < filesToUpload.length) {\n const currentFileParameters = parameters[currentFile];\n currentFile += 1;\n if (abortPendingFileUploads) {\n failedItemsToReport.push(currentFileParameters.file);\n continue;\n }\n const startTime = perf_hooks_1.performance.now();\n const uploadFileResult = yield this.uploadFileAsync(index, currentFileParameters);\n if (core.isDebug()) {\n core.debug(`File: ${++completedFiles}/${filesToUpload.length}. ${currentFileParameters.file} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish upload`);\n }\n uploadFileSize += uploadFileResult.successfulUploadSize;\n totalFileSize += uploadFileResult.totalSize;\n if (uploadFileResult.isSuccess === false) {\n failedItemsToReport.push(currentFileParameters.file);\n if (!continueOnError) {\n // fail fast\n core.error(`aborting artifact upload`);\n abortPendingFileUploads = true;\n }\n }\n this.statusReporter.incrementProcessedCount();\n }\n })));\n this.statusReporter.stop();\n // done uploading, safety dispose all connections\n this.uploadHttpManager.disposeAndReplaceAllClients();\n core.info(`Total size of all the files uploaded is ${uploadFileSize} bytes`);\n return {\n uploadSize: uploadFileSize,\n totalSize: totalFileSize,\n failedItems: failedItemsToReport\n };\n });\n }\n /**\n * Asynchronously uploads a file. The file is compressed and uploaded using GZip if it is determined to save space.\n * If the upload file is bigger than the max chunk size it will be uploaded via multiple calls\n * @param {number} httpClientIndex The index of the httpClient that is being used to make all of the calls\n * @param {UploadFileParameters} parameters Information about the file that needs to be uploaded\n * @returns The size of the file that was uploaded in bytes along with any failed uploads\n */\n uploadFileAsync(httpClientIndex, parameters) {\n return __awaiter(this, void 0, void 0, function* () {\n const fileStat = yield stat(parameters.file);\n const totalFileSize = fileStat.size;\n const isFIFO = fileStat.isFIFO();\n let offset = 0;\n let isUploadSuccessful = true;\n let failedChunkSizes = 0;\n let uploadFileSize = 0;\n let isGzip = true;\n // the file that is being uploaded is less than 64k in size to increase throughput and to minimize disk I/O\n // for creating a new GZip file, an in-memory buffer is used for compression\n // with named pipes the file size is reported as zero in that case don't read the file in memory\n if (!isFIFO && totalFileSize < 65536) {\n core.debug(`${parameters.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`);\n const buffer = yield (0, upload_gzip_1.createGZipFileInBuffer)(parameters.file);\n // An open stream is needed in the event of a failure and we need to retry. If a NodeJS.ReadableStream is directly passed in,\n // it will not properly get reset to the start of the stream if a chunk upload needs to be retried\n let openUploadStream;\n if (totalFileSize < buffer.byteLength) {\n // compression did not help with reducing the size, use a readable stream from the original file for upload\n core.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`);\n openUploadStream = () => fs.createReadStream(parameters.file);\n isGzip = false;\n uploadFileSize = totalFileSize;\n }\n else {\n // create a readable stream using a PassThrough stream that is both readable and writable\n core.debug(`A gzip file created for ${parameters.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`);\n openUploadStream = () => {\n const passThrough = new stream.PassThrough();\n passThrough.end(buffer);\n return passThrough;\n };\n uploadFileSize = buffer.byteLength;\n }\n const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, openUploadStream, 0, uploadFileSize - 1, uploadFileSize, isGzip, totalFileSize);\n if (!result) {\n // chunk failed to upload\n isUploadSuccessful = false;\n failedChunkSizes += uploadFileSize;\n core.warning(`Aborting upload for ${parameters.file} due to failure`);\n }\n return {\n isSuccess: isUploadSuccessful,\n successfulUploadSize: uploadFileSize - failedChunkSizes,\n totalSize: totalFileSize\n };\n }\n else {\n // the file that is being uploaded is greater than 64k in size, a temporary file gets created on disk using the\n // npm tmp-promise package and this file gets used to create a GZipped file\n const tempFile = yield tmp.file();\n core.debug(`${parameters.file} is greater than 64k in size. Creating a gzip file on-disk ${tempFile.path} to potentially reduce the upload size`);\n // create a GZip file of the original file being uploaded, the original file should not be modified in any way\n uploadFileSize = yield (0, upload_gzip_1.createGZipFileOnDisk)(parameters.file, tempFile.path);\n let uploadFilePath = tempFile.path;\n // compression did not help with size reduction, use the original file for upload and delete the temp GZip file\n // for named pipes totalFileSize is zero, this assumes compression did help\n if (!isFIFO && totalFileSize < uploadFileSize) {\n core.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`);\n uploadFileSize = totalFileSize;\n uploadFilePath = parameters.file;\n isGzip = false;\n }\n else {\n core.debug(`The gzip file created for ${parameters.file} is smaller than the original file. The file will be uploaded using gzip.`);\n }\n let abortFileUpload = false;\n // upload only a single chunk at a time\n while (offset < uploadFileSize) {\n const chunkSize = Math.min(uploadFileSize - offset, parameters.maxChunkSize);\n const startChunkIndex = offset;\n const endChunkIndex = offset + chunkSize - 1;\n offset += parameters.maxChunkSize;\n if (abortFileUpload) {\n // if we don't want to continue in the event of an error, any pending upload chunks will be marked as failed\n failedChunkSizes += chunkSize;\n continue;\n }\n const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs.createReadStream(uploadFilePath, {\n start: startChunkIndex,\n end: endChunkIndex,\n autoClose: false\n }), startChunkIndex, endChunkIndex, uploadFileSize, isGzip, totalFileSize);\n if (!result) {\n // Chunk failed to upload, report as failed and do not continue uploading any more chunks for the file. It is possible that part of a chunk was\n // successfully uploaded so the server may report a different size for what was uploaded\n isUploadSuccessful = false;\n failedChunkSizes += chunkSize;\n core.warning(`Aborting upload for ${parameters.file} due to failure`);\n abortFileUpload = true;\n }\n else {\n // if an individual file is greater than 8MB (1024*1024*8) in size, display extra information about the upload status\n if (uploadFileSize > 8388608) {\n this.statusReporter.updateLargeFileStatus(parameters.file, startChunkIndex, endChunkIndex, uploadFileSize);\n }\n }\n }\n // Delete the temporary file that was created as part of the upload. If the temp file does not get manually deleted by\n // calling cleanup, it gets removed when the node process exits. For more info see: https://www.npmjs.com/package/tmp-promise#about\n core.debug(`deleting temporary gzip file ${tempFile.path}`);\n yield tempFile.cleanup();\n return {\n isSuccess: isUploadSuccessful,\n successfulUploadSize: uploadFileSize - failedChunkSizes,\n totalSize: totalFileSize\n };\n }\n });\n }\n /**\n * Uploads a chunk of an individual file to the specified resourceUrl. If the upload fails and the status code\n * indicates a retryable status, we try to upload the chunk as well\n * @param {number} httpClientIndex The index of the httpClient being used to make all the necessary calls\n * @param {string} resourceUrl Url of the resource that the chunk will be uploaded to\n * @param {NodeJS.ReadableStream} openStream Stream of the file that will be uploaded\n * @param {number} start Starting byte index of file that the chunk belongs to\n * @param {number} end Ending byte index of file that the chunk belongs to\n * @param {number} uploadFileSize Total size of the file in bytes that is being uploaded\n * @param {boolean} isGzip Denotes if we are uploading a Gzip compressed stream\n * @param {number} totalFileSize Original total size of the file that is being uploaded\n * @returns if the chunk was successfully uploaded\n */\n uploadChunk(httpClientIndex, resourceUrl, openStream, start, end, uploadFileSize, isGzip, totalFileSize) {\n return __awaiter(this, void 0, void 0, function* () {\n // open a new stream and read it to compute the digest\n const digest = yield (0, utils_1.digestForStream)(openStream());\n // prepare all the necessary headers before making any http call\n const headers = (0, utils_1.getUploadHeaders)('application/octet-stream', true, isGzip, totalFileSize, end - start + 1, (0, utils_1.getContentRange)(start, end, uploadFileSize), digest);\n const uploadChunkRequest = () => __awaiter(this, void 0, void 0, function* () {\n const client = this.uploadHttpManager.getClient(httpClientIndex);\n return yield client.sendStream('PUT', resourceUrl, openStream(), headers);\n });\n let retryCount = 0;\n const retryLimit = (0, config_variables_1.getRetryLimit)();\n // Increments the current retry count and then checks if the retry limit has been reached\n // If there have been too many retries, fail so the download stops\n const incrementAndCheckRetryLimit = (response) => {\n retryCount++;\n if (retryCount > retryLimit) {\n if (response) {\n (0, utils_1.displayHttpDiagnostics)(response);\n }\n core.info(`Retry limit has been reached for chunk at offset ${start} to ${resourceUrl}`);\n return true;\n }\n return false;\n };\n const backOff = (retryAfterValue) => __awaiter(this, void 0, void 0, function* () {\n this.uploadHttpManager.disposeAndReplaceClient(httpClientIndex);\n if (retryAfterValue) {\n core.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`);\n yield (0, utils_1.sleep)(retryAfterValue);\n }\n else {\n const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount);\n core.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the upload at offset ${start}`);\n yield (0, utils_1.sleep)(backoffTime);\n }\n core.info(`Finished backoff for retry #${retryCount}, continuing with upload`);\n return;\n });\n // allow for failed chunks to be retried multiple times\n while (retryCount <= retryLimit) {\n let response;\n try {\n response = yield uploadChunkRequest();\n }\n catch (error) {\n // if an error is caught, it is usually indicative of a timeout so retry the upload\n core.info(`An error has been caught http-client index ${httpClientIndex}, retrying the upload`);\n // eslint-disable-next-line no-console\n console.log(error);\n if (incrementAndCheckRetryLimit()) {\n return false;\n }\n yield backOff();\n continue;\n }\n // Always read the body of the response. There is potential for a resource leak if the body is not read which will\n // result in the connection remaining open along with unintended consequences when trying to dispose of the client\n yield response.readBody();\n if ((0, utils_1.isSuccessStatusCode)(response.message.statusCode)) {\n return true;\n }\n else if ((0, utils_1.isRetryableStatusCode)(response.message.statusCode)) {\n core.info(`A ${response.message.statusCode} status code has been received, will attempt to retry the upload`);\n if (incrementAndCheckRetryLimit(response)) {\n return false;\n }\n (0, utils_1.isThrottledStatusCode)(response.message.statusCode)\n ? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers))\n : yield backOff();\n }\n else {\n core.error(`Unexpected response. Unable to upload chunk to ${resourceUrl}`);\n (0, utils_1.displayHttpDiagnostics)(response);\n return false;\n }\n }\n return false;\n });\n }\n /**\n * Updates the size of the artifact from -1 which was initially set when the container was first created for the artifact.\n * Updating the size indicates that we are done uploading all the contents of the artifact\n */\n patchArtifactSize(size, artifactName) {\n return __awaiter(this, void 0, void 0, function* () {\n const resourceUrl = new url_1.URL((0, utils_1.getArtifactUrl)());\n resourceUrl.searchParams.append('artifactName', artifactName);\n const parameters = { Size: size };\n const data = JSON.stringify(parameters, null, 2);\n core.debug(`URL is ${resourceUrl.toString()}`);\n // use the first client from the httpManager, `keep-alive` is not used so the connection will close immediately\n const client = this.uploadHttpManager.getClient(0);\n const headers = (0, utils_1.getUploadHeaders)('application/json', false);\n // Extra information to display when a particular HTTP code is returned\n const customErrorMessages = new Map([\n [\n http_client_1.HttpCodes.NotFound,\n `An Artifact with the name ${artifactName} was not found`\n ]\n ]);\n // TODO retry for all possible response codes, the artifact upload is pretty much complete so it at all costs we should try to finish this\n const response = yield (0, requestUtils_1.retryHttpClientRequest)('Finalize artifact upload', () => __awaiter(this, void 0, void 0, function* () { return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages);\n yield response.readBody();\n core.debug(`Artifact ${artifactName} has been successfully uploaded, total size in bytes: ${size}`);\n });\n }\n}\nexports.UploadHttpClient = UploadHttpClient;\n//# sourceMappingURL=upload-http-client.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUploadSpecification = void 0;\nconst fs = __importStar(require(\"fs\"));\nconst core_1 = require(\"@actions/core\");\nconst path_1 = require(\"path\");\nconst path_and_artifact_name_validation_1 = require(\"./path-and-artifact-name-validation\");\n/**\n * Creates a specification that describes how each file that is part of the artifact will be uploaded\n * @param artifactName the name of the artifact being uploaded. Used during upload to denote where the artifact is stored on the server\n * @param rootDirectory an absolute file path that denotes the path that should be removed from the beginning of each artifact file\n * @param artifactFiles a list of absolute file paths that denote what should be uploaded as part of the artifact\n */\nfunction getUploadSpecification(artifactName, rootDirectory, artifactFiles) {\n // artifact name was checked earlier on, no need to check again\n const specifications = [];\n if (!fs.existsSync(rootDirectory)) {\n throw new Error(`Provided rootDirectory ${rootDirectory} does not exist`);\n }\n if (!fs.statSync(rootDirectory).isDirectory()) {\n throw new Error(`Provided rootDirectory ${rootDirectory} is not a valid directory`);\n }\n // Normalize and resolve, this allows for either absolute or relative paths to be used\n rootDirectory = (0, path_1.normalize)(rootDirectory);\n rootDirectory = (0, path_1.resolve)(rootDirectory);\n /*\n Example to demonstrate behavior\n \n Input:\n artifactName: my-artifact\n rootDirectory: '/home/user/files/plz-upload'\n artifactFiles: [\n '/home/user/files/plz-upload/file1.txt',\n '/home/user/files/plz-upload/file2.txt',\n '/home/user/files/plz-upload/dir/file3.txt'\n ]\n \n Output:\n specifications: [\n ['/home/user/files/plz-upload/file1.txt', 'my-artifact/file1.txt'],\n ['/home/user/files/plz-upload/file1.txt', 'my-artifact/file2.txt'],\n ['/home/user/files/plz-upload/file1.txt', 'my-artifact/dir/file3.txt']\n ]\n */\n for (let file of artifactFiles) {\n if (!fs.existsSync(file)) {\n throw new Error(`File ${file} does not exist`);\n }\n if (!fs.statSync(file).isDirectory()) {\n // Normalize and resolve, this allows for either absolute or relative paths to be used\n file = (0, path_1.normalize)(file);\n file = (0, path_1.resolve)(file);\n if (!file.startsWith(rootDirectory)) {\n throw new Error(`The rootDirectory: ${rootDirectory} is not a parent directory of the file: ${file}`);\n }\n // Check for forbidden characters in file paths that will be rejected during upload\n const uploadPath = file.replace(rootDirectory, '');\n (0, path_and_artifact_name_validation_1.checkArtifactFilePath)(uploadPath);\n /*\n uploadFilePath denotes where the file will be uploaded in the file container on the server. During a run, if multiple artifacts are uploaded, they will all\n be saved in the same container. The artifact name is used as the root directory in the container to separate and distinguish uploaded artifacts\n \n path.join handles all the following cases and would return 'artifact-name/file-to-upload.txt\n join('artifact-name/', 'file-to-upload.txt')\n join('artifact-name/', '/file-to-upload.txt')\n join('artifact-name', 'file-to-upload.txt')\n join('artifact-name', '/file-to-upload.txt')\n */\n specifications.push({\n absoluteFilePath: file,\n uploadFilePath: (0, path_1.join)(artifactName, uploadPath)\n });\n }\n else {\n // Directories are rejected by the server during upload\n (0, core_1.debug)(`Removing ${file} from rawSearchResults because it is a directory`);\n }\n }\n return specifications;\n}\nexports.getUploadSpecification = getUploadSpecification;\n//# sourceMappingURL=upload-specification.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.digestForStream = exports.sleep = exports.getProperRetention = exports.rmFile = exports.getFileSize = exports.createEmptyFilesForArtifact = exports.createDirectoriesForArtifact = exports.displayHttpDiagnostics = exports.getArtifactUrl = exports.createHttpClient = exports.getUploadHeaders = exports.getDownloadHeaders = exports.getContentRange = exports.tryGetRetryAfterValueTimeInMilliseconds = exports.isThrottledStatusCode = exports.isRetryableStatusCode = exports.isForbiddenStatusCode = exports.isSuccessStatusCode = exports.getApiVersion = exports.parseEnvNumber = exports.getExponentialRetryTimeInMilliseconds = void 0;\nconst crypto_1 = __importDefault(require(\"crypto\"));\nconst fs_1 = require(\"fs\");\nconst core_1 = require(\"@actions/core\");\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst config_variables_1 = require(\"./config-variables\");\nconst crc64_1 = __importDefault(require(\"./crc64\"));\n/**\n * Returns a retry time in milliseconds that exponentially gets larger\n * depending on the amount of retries that have been attempted\n */\nfunction getExponentialRetryTimeInMilliseconds(retryCount) {\n if (retryCount < 0) {\n throw new Error('RetryCount should not be negative');\n }\n else if (retryCount === 0) {\n return (0, config_variables_1.getInitialRetryIntervalInMilliseconds)();\n }\n const minTime = (0, config_variables_1.getInitialRetryIntervalInMilliseconds)() * (0, config_variables_1.getRetryMultiplier)() * retryCount;\n const maxTime = minTime * (0, config_variables_1.getRetryMultiplier)();\n // returns a random number between the minTime (inclusive) and the maxTime (exclusive)\n return Math.trunc(Math.random() * (maxTime - minTime) + minTime);\n}\nexports.getExponentialRetryTimeInMilliseconds = getExponentialRetryTimeInMilliseconds;\n/**\n * Parses a env variable that is a number\n */\nfunction parseEnvNumber(key) {\n const value = Number(process.env[key]);\n if (Number.isNaN(value) || value < 0) {\n return undefined;\n }\n return value;\n}\nexports.parseEnvNumber = parseEnvNumber;\n/**\n * Various utility functions to help with the necessary API calls\n */\nfunction getApiVersion() {\n return '6.0-preview';\n}\nexports.getApiVersion = getApiVersion;\nfunction isSuccessStatusCode(statusCode) {\n if (!statusCode) {\n return false;\n }\n return statusCode >= 200 && statusCode < 300;\n}\nexports.isSuccessStatusCode = isSuccessStatusCode;\nfunction isForbiddenStatusCode(statusCode) {\n if (!statusCode) {\n return false;\n }\n return statusCode === http_client_1.HttpCodes.Forbidden;\n}\nexports.isForbiddenStatusCode = isForbiddenStatusCode;\nfunction isRetryableStatusCode(statusCode) {\n if (!statusCode) {\n return false;\n }\n const retryableStatusCodes = [\n http_client_1.HttpCodes.BadGateway,\n http_client_1.HttpCodes.GatewayTimeout,\n http_client_1.HttpCodes.InternalServerError,\n http_client_1.HttpCodes.ServiceUnavailable,\n http_client_1.HttpCodes.TooManyRequests,\n 413 // Payload Too Large\n ];\n return retryableStatusCodes.includes(statusCode);\n}\nexports.isRetryableStatusCode = isRetryableStatusCode;\nfunction isThrottledStatusCode(statusCode) {\n if (!statusCode) {\n return false;\n }\n return statusCode === http_client_1.HttpCodes.TooManyRequests;\n}\nexports.isThrottledStatusCode = isThrottledStatusCode;\n/**\n * Attempts to get the retry-after value from a set of http headers. The retry time\n * is originally denoted in seconds, so if present, it is converted to milliseconds\n * @param headers all the headers received when making an http call\n */\nfunction tryGetRetryAfterValueTimeInMilliseconds(headers) {\n if (headers['retry-after']) {\n const retryTime = Number(headers['retry-after']);\n if (!isNaN(retryTime)) {\n (0, core_1.info)(`Retry-After header is present with a value of ${retryTime}`);\n return retryTime * 1000;\n }\n (0, core_1.info)(`Returned retry-after header value: ${retryTime} is non-numeric and cannot be used`);\n return undefined;\n }\n (0, core_1.info)(`No retry-after header was found. Dumping all headers for diagnostic purposes`);\n // eslint-disable-next-line no-console\n console.log(headers);\n return undefined;\n}\nexports.tryGetRetryAfterValueTimeInMilliseconds = tryGetRetryAfterValueTimeInMilliseconds;\nfunction getContentRange(start, end, total) {\n // Format: `bytes start-end/fileSize\n // start and end are inclusive\n // For a 200 byte chunk starting at byte 0:\n // Content-Range: bytes 0-199/200\n return `bytes ${start}-${end}/${total}`;\n}\nexports.getContentRange = getContentRange;\n/**\n * Sets all the necessary headers when downloading an artifact\n * @param {string} contentType the type of content being uploaded\n * @param {boolean} isKeepAlive is the same connection being used to make multiple calls\n * @param {boolean} acceptGzip can we accept a gzip encoded response\n * @param {string} acceptType the type of content that we can accept\n * @returns appropriate headers to make a specific http call during artifact download\n */\nfunction getDownloadHeaders(contentType, isKeepAlive, acceptGzip) {\n const requestOptions = {};\n if (contentType) {\n requestOptions['Content-Type'] = contentType;\n }\n if (isKeepAlive) {\n requestOptions['Connection'] = 'Keep-Alive';\n // keep alive for at least 10 seconds before closing the connection\n requestOptions['Keep-Alive'] = '10';\n }\n if (acceptGzip) {\n // if we are expecting a response with gzip encoding, it should be using an octet-stream in the accept header\n requestOptions['Accept-Encoding'] = 'gzip';\n requestOptions['Accept'] = `application/octet-stream;api-version=${getApiVersion()}`;\n }\n else {\n // default to application/json if we are not working with gzip content\n requestOptions['Accept'] = `application/json;api-version=${getApiVersion()}`;\n }\n return requestOptions;\n}\nexports.getDownloadHeaders = getDownloadHeaders;\n/**\n * Sets all the necessary headers when uploading an artifact\n * @param {string} contentType the type of content being uploaded\n * @param {boolean} isKeepAlive is the same connection being used to make multiple calls\n * @param {boolean} isGzip is the connection being used to upload GZip compressed content\n * @param {number} uncompressedLength the original size of the content if something is being uploaded that has been compressed\n * @param {number} contentLength the length of the content that is being uploaded\n * @param {string} contentRange the range of the content that is being uploaded\n * @returns appropriate headers to make a specific http call during artifact upload\n */\nfunction getUploadHeaders(contentType, isKeepAlive, isGzip, uncompressedLength, contentLength, contentRange, digest) {\n const requestOptions = {};\n requestOptions['Accept'] = `application/json;api-version=${getApiVersion()}`;\n if (contentType) {\n requestOptions['Content-Type'] = contentType;\n }\n if (isKeepAlive) {\n requestOptions['Connection'] = 'Keep-Alive';\n // keep alive for at least 10 seconds before closing the connection\n requestOptions['Keep-Alive'] = '10';\n }\n if (isGzip) {\n requestOptions['Content-Encoding'] = 'gzip';\n requestOptions['x-tfs-filelength'] = uncompressedLength;\n }\n if (contentLength) {\n requestOptions['Content-Length'] = contentLength;\n }\n if (contentRange) {\n requestOptions['Content-Range'] = contentRange;\n }\n if (digest) {\n requestOptions['x-actions-results-crc64'] = digest.crc64;\n requestOptions['x-actions-results-md5'] = digest.md5;\n }\n return requestOptions;\n}\nexports.getUploadHeaders = getUploadHeaders;\nfunction createHttpClient(userAgent) {\n return new http_client_1.HttpClient(userAgent, [\n new auth_1.BearerCredentialHandler((0, config_variables_1.getRuntimeToken)())\n ]);\n}\nexports.createHttpClient = createHttpClient;\nfunction getArtifactUrl() {\n const artifactUrl = `${(0, config_variables_1.getRuntimeUrl)()}_apis/pipelines/workflows/${(0, config_variables_1.getWorkFlowRunId)()}/artifacts?api-version=${getApiVersion()}`;\n (0, core_1.debug)(`Artifact Url: ${artifactUrl}`);\n return artifactUrl;\n}\nexports.getArtifactUrl = getArtifactUrl;\n/**\n * Uh oh! Something might have gone wrong during either upload or download. The IHtttpClientResponse object contains information\n * about the http call that was made by the actions http client. This information might be useful to display for diagnostic purposes, but\n * this entire object is really big and most of the information is not really useful. This function takes the response object and displays only\n * the information that we want.\n *\n * Certain information such as the TLSSocket and the Readable state are not really useful for diagnostic purposes so they can be avoided.\n * Other information such as the headers, the response code and message might be useful, so this is displayed.\n */\nfunction displayHttpDiagnostics(response) {\n (0, core_1.info)(`##### Begin Diagnostic HTTP information #####\nStatus Code: ${response.message.statusCode}\nStatus Message: ${response.message.statusMessage}\nHeader Information: ${JSON.stringify(response.message.headers, undefined, 2)}\n###### End Diagnostic HTTP information ######`);\n}\nexports.displayHttpDiagnostics = displayHttpDiagnostics;\nfunction createDirectoriesForArtifact(directories) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const directory of directories) {\n yield fs_1.promises.mkdir(directory, {\n recursive: true\n });\n }\n });\n}\nexports.createDirectoriesForArtifact = createDirectoriesForArtifact;\nfunction createEmptyFilesForArtifact(emptyFilesToCreate) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const filePath of emptyFilesToCreate) {\n yield (yield fs_1.promises.open(filePath, 'w')).close();\n }\n });\n}\nexports.createEmptyFilesForArtifact = createEmptyFilesForArtifact;\nfunction getFileSize(filePath) {\n return __awaiter(this, void 0, void 0, function* () {\n const stats = yield fs_1.promises.stat(filePath);\n (0, core_1.debug)(`${filePath} size:(${stats.size}) blksize:(${stats.blksize}) blocks:(${stats.blocks})`);\n return stats.size;\n });\n}\nexports.getFileSize = getFileSize;\nfunction rmFile(filePath) {\n return __awaiter(this, void 0, void 0, function* () {\n yield fs_1.promises.unlink(filePath);\n });\n}\nexports.rmFile = rmFile;\nfunction getProperRetention(retentionInput, retentionSetting) {\n if (retentionInput < 0) {\n throw new Error('Invalid retention, minimum value is 1.');\n }\n let retention = retentionInput;\n if (retentionSetting) {\n const maxRetention = parseInt(retentionSetting);\n if (!isNaN(maxRetention) && maxRetention < retention) {\n (0, core_1.warning)(`Retention days is greater than the max value allowed by the repository setting, reduce retention to ${maxRetention} days`);\n retention = maxRetention;\n }\n }\n return retention;\n}\nexports.getProperRetention = getProperRetention;\nfunction sleep(milliseconds) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => setTimeout(resolve, milliseconds));\n });\n}\nexports.sleep = sleep;\nfunction digestForStream(stream) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n const crc64 = new crc64_1.default();\n const md5 = crypto_1.default.createHash('md5');\n stream\n .on('data', data => {\n crc64.update(data);\n md5.update(data);\n })\n .on('end', () => resolve({\n crc64: crc64.digest('base64'),\n md5: md5.digest('base64')\n }))\n .on('error', reject);\n });\n });\n}\nexports.digestForStream = digestForStream;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise

} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nconst fs_1 = require(\"fs\");\nconst os_1 = require(\"os\");\nclass Context {\n /**\n * Hydrate the context from the environment\n */\n constructor() {\n var _a, _b, _c;\n this.payload = {};\n if (process.env.GITHUB_EVENT_PATH) {\n if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) {\n this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));\n }\n else {\n const path = process.env.GITHUB_EVENT_PATH;\n process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);\n }\n }\n this.eventName = process.env.GITHUB_EVENT_NAME;\n this.sha = process.env.GITHUB_SHA;\n this.ref = process.env.GITHUB_REF;\n this.workflow = process.env.GITHUB_WORKFLOW;\n this.action = process.env.GITHUB_ACTION;\n this.actor = process.env.GITHUB_ACTOR;\n this.job = process.env.GITHUB_JOB;\n this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);\n this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);\n this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;\n this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;\n this.graphqlUrl =\n (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;\n }\n get issue() {\n const payload = this.payload;\n return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });\n }\n get repo() {\n if (process.env.GITHUB_REPOSITORY) {\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');\n return { owner, repo };\n }\n if (this.payload.repository) {\n return {\n owner: this.payload.repository.owner.login,\n repo: this.payload.repository.name\n };\n }\n throw new Error(\"context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'\");\n }\n}\nexports.Context = Context;\n//# sourceMappingURL=context.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokit = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst utils_1 = require(\"./utils\");\nexports.context = new Context.Context();\n/**\n * Returns a hydrated octokit ready to use for GitHub Actions\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokit(token, options, ...additionalPlugins) {\n const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);\n return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options));\n}\nexports.getOctokit = getOctokit;\n//# sourceMappingURL=github.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0;\nconst httpClient = __importStar(require(\"@actions/http-client\"));\nconst undici_1 = require(\"undici\");\nfunction getAuthString(token, options) {\n if (!token && !options.auth) {\n throw new Error('Parameter token or opts.auth is required');\n }\n else if (token && options.auth) {\n throw new Error('Parameters token and opts.auth may not both be specified');\n }\n return typeof options.auth === 'string' ? options.auth : `token ${token}`;\n}\nexports.getAuthString = getAuthString;\nfunction getProxyAgent(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgent(destinationUrl);\n}\nexports.getProxyAgent = getProxyAgent;\nfunction getProxyAgentDispatcher(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgentDispatcher(destinationUrl);\n}\nexports.getProxyAgentDispatcher = getProxyAgentDispatcher;\nfunction getProxyFetch(destinationUrl) {\n const httpDispatcher = getProxyAgentDispatcher(destinationUrl);\n const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () {\n return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher }));\n });\n return proxyFetch;\n}\nexports.getProxyFetch = getProxyFetch;\nfunction getApiBaseUrl() {\n return process.env['GITHUB_API_URL'] || 'https://api.github.com';\n}\nexports.getApiBaseUrl = getApiBaseUrl;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst Utils = __importStar(require(\"./internal/utils\"));\n// octokit + plugins\nconst core_1 = require(\"@octokit/core\");\nconst plugin_rest_endpoint_methods_1 = require(\"@octokit/plugin-rest-endpoint-methods\");\nconst plugin_paginate_rest_1 = require(\"@octokit/plugin-paginate-rest\");\nexports.context = new Context.Context();\nconst baseUrl = Utils.getApiBaseUrl();\nexports.defaults = {\n baseUrl,\n request: {\n agent: Utils.getProxyAgent(baseUrl),\n fetch: Utils.getProxyFetch(baseUrl)\n }\n};\nexports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults);\n/**\n * Convience function to correctly format Octokit Options to pass into the constructor.\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokitOptions(token, options) {\n const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller\n // Auth\n const auth = Utils.getAuthString(token, opts);\n if (auth) {\n opts.auth = auth;\n }\n return opts;\n}\nexports.getOctokitOptions = getOctokitOptions;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n composePaginateRest: () => composePaginateRest,\n isPaginatingEndpoint: () => isPaginatingEndpoint,\n paginateRest: () => paginateRest,\n paginatingEndpoints: () => paginatingEndpoints\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.2.1\";\n\n// pkg/dist-src/normalize-paginated-list-response.js\nfunction normalizePaginatedListResponse(response) {\n if (!response.data) {\n return {\n ...response,\n data: []\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n\n// pkg/dist-src/iterator.js\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n url = ((normalizedResponse.headers.link || \"\").match(\n /<([^>]+)>;\\s*rel=\"next\"/\n ) || [])[1];\n return { value: normalizedResponse };\n } catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n })\n };\n}\n\n// pkg/dist-src/paginate.js\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = void 0;\n }\n return gather(\n octokit,\n [],\n iterator(octokit, route, parameters)[Symbol.asyncIterator](),\n mapFn\n );\n}\nfunction gather(octokit, results, iterator2, mapFn) {\n return iterator2.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(\n mapFn ? mapFn(result.value, done) : result.value.data\n );\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator2, mapFn);\n });\n}\n\n// pkg/dist-src/compose-paginate.js\nvar composePaginateRest = Object.assign(paginate, {\n iterator\n});\n\n// pkg/dist-src/generated/paginating-endpoints.js\nvar paginatingEndpoints = [\n \"GET /advisories\",\n \"GET /app/hook/deliveries\",\n \"GET /app/installation-requests\",\n \"GET /app/installations\",\n \"GET /assignments/{assignment_id}/accepted_assignments\",\n \"GET /classrooms\",\n \"GET /classrooms/{classroom_id}/assignments\",\n \"GET /enterprises/{enterprise}/dependabot/alerts\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/actions/variables\",\n \"GET /orgs/{org}/actions/variables/{name}/repositories\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/codespaces/secrets\",\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/copilot/billing/seats\",\n \"GET /orgs/{org}/dependabot/alerts\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/members/{username}/codespaces\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/organization-roles/{role_id}/teams\",\n \"GET /orgs/{org}/organization-roles/{role_id}/users\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/personal-access-token-requests\",\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\",\n \"GET /orgs/{org}/personal-access-tokens\",\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/properties/values\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/rulesets\",\n \"GET /orgs/{org}/rulesets/rule-suites\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/security-advisories\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\",\n \"GET /repos/{owner}/{repo}/actions/organization-variables\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/variables\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/activity\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/alerts\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/rules/branches/{branch}\",\n \"GET /repos/{owner}/{repo}/rulesets\",\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/security-advisories\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/social_accounts\",\n \"GET /user/ssh_signing_keys\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/social_accounts\",\n \"GET /users/{username}/ssh_signing_keys\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\"\n];\n\n// pkg/dist-src/paginating-endpoints.js\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\n\n// pkg/dist-src/index.js\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n composePaginateRest,\n isPaginatingEndpoint,\n paginateRest,\n paginatingEndpoints\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n legacyRestEndpointMethods: () => legacyRestEndpointMethods,\n restEndpointMethods: () => restEndpointMethods\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"10.4.1\";\n\n// pkg/dist-src/generated/endpoints.js\nvar Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\"\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\"\n ],\n createEnvironmentVariable: [\n \"POST /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n createOrgVariable: [\"POST /orgs/{org}/actions/variables\"],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\"\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\"\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\"\n ],\n createRepoVariable: [\"POST /repos/{owner}/{repo}/actions/variables\"],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\"\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\"\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\"\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n deleteEnvironmentVariable: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteOrgVariable: [\"DELETE /orgs/{org}/actions/variables/{name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n deleteRepoVariable: [\n \"DELETE /repos/{owner}/{repo}/actions/variables/{name}\"\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\"\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\"\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\"\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\"\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\"\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\"\n ],\n forceCancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel\"\n ],\n generateRunnerJitconfigForOrg: [\n \"POST /orgs/{org}/actions/runners/generate-jitconfig\"\n ],\n generateRunnerJitconfigForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig\"\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\"\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\"\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getCustomOidcSubClaimForRepo: [\n \"GET /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\"\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n getEnvironmentVariable: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\"\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\"\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\"\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getOrgVariable: [\"GET /orgs/{org}/actions/variables/{name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] }\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getRepoVariable: [\"GET /repos/{owner}/{repo}/actions/variables/{name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\"\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\"\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\"\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\"\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\"\n ],\n listEnvironmentVariables: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\"\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\"\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listOrgVariables: [\"GET /orgs/{org}/actions/variables\"],\n listRepoOrganizationSecrets: [\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\"\n ],\n listRepoOrganizationVariables: [\n \"GET /repos/{owner}/{repo}/actions/organization-variables\"\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoVariables: [\"GET /repos/{owner}/{repo}/actions/variables\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\"\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n listSelectedReposForOrgVariable: [\n \"GET /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\"\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\"\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\"\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\"\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgVariable: [\n \"DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n reviewCustomGatesForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule\"\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\"\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n setCustomOidcSubClaimForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\"\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\"\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\"\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n updateEnvironmentVariable: [\n \"PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n updateOrgVariable: [\"PATCH /orgs/{org}/actions/variables/{name}\"],\n updateRepoVariable: [\n \"PATCH /repos/{owner}/{repo}/actions/variables/{name}\"\n ]\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\"\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\"\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\"\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\"\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\"\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsDone: [\"DELETE /notifications/threads/{thread_id}\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\"\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"]\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] }\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\"\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\"\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\"\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\"\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\"\n ],\n listInstallationRequestsForAuthenticatedApp: [\n \"GET /app/installation-requests\"\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\"\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\"\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] }\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\"\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"]\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\"\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\"\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\"\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\"\n ]\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\"\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\"\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\"\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\"\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"]\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\"\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } }\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\"\n ],\n getCodeqlDatabase: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}\"\n ],\n getDefaultSetup: [\"GET /repos/{owner}/{repo}/code-scanning/default-setup\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] }\n ],\n listCodeqlDatabases: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases\"\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\"\n ],\n updateDefaultSetup: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/default-setup\"\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"]\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"]\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n checkPermissionsForDevcontainer: [\n \"GET /repos/{owner}/{repo}/codespaces/permissions_check\"\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\"\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\"\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\"\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\"\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/codespaces/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\"\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\"\n ],\n getCodespacesForUserInOrg: [\n \"GET /orgs/{org}/members/{username}/codespaces\"\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\"\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/codespaces/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/codespaces/secrets/{secret_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\"\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\"\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\"\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } }\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/codespaces/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n preFlightWithRepoForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/new\"\n ],\n publishForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/publish\"\n ],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\"\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\"\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"]\n },\n copilot: {\n addCopilotSeatsForTeams: [\n \"POST /orgs/{org}/copilot/billing/selected_teams\"\n ],\n addCopilotSeatsForUsers: [\n \"POST /orgs/{org}/copilot/billing/selected_users\"\n ],\n cancelCopilotSeatAssignmentForTeams: [\n \"DELETE /orgs/{org}/copilot/billing/selected_teams\"\n ],\n cancelCopilotSeatAssignmentForUsers: [\n \"DELETE /orgs/{org}/copilot/billing/selected_users\"\n ],\n getCopilotOrganizationDetails: [\"GET /orgs/{org}/copilot/billing\"],\n getCopilotSeatDetailsForUser: [\n \"GET /orgs/{org}/members/{username}/copilot\"\n ],\n listCopilotSeats: [\"GET /orgs/{org}/copilot/billing/seats\"]\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n getAlert: [\"GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/dependabot/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/dependabot/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/dependabot/alerts\"],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"\n ]\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\"\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\"\n ],\n exportSbom: [\"GET /repos/{owner}/{repo}/dependency-graph/sbom\"]\n },\n emojis: { get: [\"GET /emojis\"] },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"]\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"]\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"]\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] }\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\"\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] }\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] }\n ]\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n checkUserCanBeAssignedToIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}\"\n ],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\"\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\"\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\"\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\"\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\"\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ]\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"]\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } }\n ]\n },\n meta: {\n get: [\"GET /meta\"],\n getAllVersions: [\"GET /versions\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"]\n },\n migrations: {\n cancelImport: [\n \"DELETE /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import\"\n }\n ],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\"\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\"\n ],\n getCommitAuthors: [\n \"GET /repos/{owner}/{repo}/import/authors\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors\"\n }\n ],\n getImportStatus: [\n \"GET /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status\"\n }\n ],\n getLargeFiles: [\n \"GET /repos/{owner}/{repo}/import/large_files\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files\"\n }\n ],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\"\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] }\n ],\n mapCommitAuthor: [\n \"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\",\n {},\n {\n deprecated: \"octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author\"\n }\n ],\n setLfsPreference: [\n \"PATCH /repos/{owner}/{repo}/import/lfs\",\n {},\n {\n deprecated: \"octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference\"\n }\n ],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\n \"PUT /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import\"\n }\n ],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n updateImport: [\n \"PATCH /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import\"\n }\n ]\n },\n oidc: {\n getOidcCustomSubTemplateForOrg: [\n \"GET /orgs/{org}/actions/oidc/customization/sub\"\n ],\n updateOidcCustomSubTemplateForOrg: [\n \"PUT /orgs/{org}/actions/oidc/customization/sub\"\n ]\n },\n orgs: {\n addSecurityManagerTeam: [\n \"PUT /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n assignTeamToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n assignUserToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\"\n ],\n createCustomOrganizationRole: [\"POST /orgs/{org}/organization-roles\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createOrUpdateCustomProperties: [\"PATCH /orgs/{org}/properties/schema\"],\n createOrUpdateCustomPropertiesValuesForRepos: [\n \"PATCH /orgs/{org}/properties/values\"\n ],\n createOrUpdateCustomProperty: [\n \"PUT /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n delete: [\"DELETE /orgs/{org}\"],\n deleteCustomOrganizationRole: [\n \"DELETE /orgs/{org}/organization-roles/{role_id}\"\n ],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n enableOrDisableSecurityProductOnAllOrgRepos: [\n \"POST /orgs/{org}/{security_product}/{enablement}\"\n ],\n get: [\"GET /orgs/{org}\"],\n getAllCustomProperties: [\"GET /orgs/{org}/properties/schema\"],\n getCustomProperty: [\n \"GET /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getOrgRole: [\"GET /orgs/{org}/organization-roles/{role_id}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomPropertiesValuesForRepos: [\"GET /orgs/{org}/properties/values\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOrgRoleTeams: [\"GET /orgs/{org}/organization-roles/{role_id}/teams\"],\n listOrgRoleUsers: [\"GET /orgs/{org}/organization-roles/{role_id}/users\"],\n listOrgRoles: [\"GET /orgs/{org}/organization-roles\"],\n listOrganizationFineGrainedPermissions: [\n \"GET /orgs/{org}/organization-fine-grained-permissions\"\n ],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPatGrantRepositories: [\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\"\n ],\n listPatGrantRequestRepositories: [\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\"\n ],\n listPatGrantRequests: [\"GET /orgs/{org}/personal-access-token-requests\"],\n listPatGrants: [\"GET /orgs/{org}/personal-access-tokens\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listSecurityManagerTeams: [\"GET /orgs/{org}/security-managers\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n patchCustomOrganizationRole: [\n \"PATCH /orgs/{org}/organization-roles/{role_id}\"\n ],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeCustomProperty: [\n \"DELETE /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\"\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\"\n ],\n removeSecurityManagerTeam: [\n \"DELETE /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n reviewPatGrantRequest: [\n \"POST /orgs/{org}/personal-access-token-requests/{pat_request_id}\"\n ],\n reviewPatGrantRequestsInBulk: [\n \"POST /orgs/{org}/personal-access-token-requests\"\n ],\n revokeAllOrgRolesTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}\"\n ],\n revokeAllOrgRolesUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}\"\n ],\n revokeOrgRoleTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n revokeOrgRoleUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\"\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\"\n ],\n updatePatAccess: [\"POST /orgs/{org}/personal-access-tokens/{pat_id}\"],\n updatePatAccesses: [\"POST /orgs/{org}/personal-access-tokens\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"]\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\"\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\"\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] }\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\"\n ]\n }\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\"\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\"\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\"\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n listDockerMigrationConflictingPackagesForAuthenticatedUser: [\n \"GET /user/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForOrganization: [\n \"GET /orgs/{org}/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForUser: [\n \"GET /users/{username}/docker/conflicts\"\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ]\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\"\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\"\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"]\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\"\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\"\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\"\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ]\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\"\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\"\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\"\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ]\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] }\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\"\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n cancelPagesDeployment: [\n \"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel\"\n ],\n checkAutomatedSecurityFixes: [\n \"GET /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\"\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentBranchPolicy: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n createDeploymentProtectionRule: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateCustomPropertiesValues: [\n \"PATCH /repos/{owner}/{repo}/properties/values\"\n ],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createOrgRuleset: [\"POST /orgs/{org}/rulesets\"],\n createPagesDeployment: [\"POST /repos/{owner}/{repo}/pages/deployments\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createRepoRuleset: [\"POST /repos/{owner}/{repo}/rulesets\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\"\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] }\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\"\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\"\n ],\n deleteDeploymentBranchPolicy: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n deleteOrgRuleset: [\"DELETE /orgs/{org}/rulesets/{ruleset_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n deleteRepoRuleset: [\"DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\"\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n disableDeploymentProtectionRule: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n disablePrivateVulnerabilityReporting: [\n \"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] }\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n enablePrivateVulnerabilityReporting: [\n \"PUT /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\"\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n getAllDeploymentProtectionRules: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\"\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\"\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n getBranchRules: [\"GET /repos/{owner}/{repo}/rules/branches/{branch}\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\"\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getCustomDeploymentProtectionRule: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n getCustomPropertiesValues: [\"GET /repos/{owner}/{repo}/properties/values\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentBranchPolicy: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\"\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getOrgRuleSuite: [\"GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}\"],\n getOrgRuleSuites: [\"GET /orgs/{org}/rulesets/rule-suites\"],\n getOrgRuleset: [\"GET /orgs/{org}/rulesets/{ruleset_id}\"],\n getOrgRulesets: [\"GET /orgs/{org}/rulesets\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesDeployment: [\n \"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}\"\n ],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getRepoRuleSuite: [\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}\"\n ],\n getRepoRuleSuites: [\"GET /repos/{owner}/{repo}/rulesets/rule-suites\"],\n getRepoRuleset: [\"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n getRepoRulesets: [\"GET /repos/{owner}/{repo}/rulesets\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\"\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\"\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n listActivities: [\"GET /repos/{owner}/{repo}/activity\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\"\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listCustomDeploymentRuleIntegrations: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\"\n ],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentBranchPolicies: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\"\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\"\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\"\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\"\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateDeploymentBranchPolicy: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n updateOrgRuleset: [\"PUT /orgs/{org}/rulesets/{ruleset_id}\"],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n updateRepoRuleset: [\"PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] }\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" }\n ]\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"]\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ]\n },\n securityAdvisories: {\n createFork: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks\"\n ],\n createPrivateVulnerabilityReport: [\n \"POST /repos/{owner}/{repo}/security-advisories/reports\"\n ],\n createRepositoryAdvisory: [\n \"POST /repos/{owner}/{repo}/security-advisories\"\n ],\n createRepositoryAdvisoryCveRequest: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve\"\n ],\n getGlobalAdvisory: [\"GET /advisories/{ghsa_id}\"],\n getRepositoryAdvisory: [\n \"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ],\n listGlobalAdvisories: [\"GET /advisories\"],\n listOrgRepositoryAdvisories: [\"GET /orgs/{org}/security-advisories\"],\n listRepositoryAdvisories: [\"GET /repos/{owner}/{repo}/security-advisories\"],\n updateRepositoryAdvisory: [\n \"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ]\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\"\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"]\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] }\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n addSocialAccountForAuthenticatedUser: [\"POST /user/social_accounts\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] }\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] }\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n createSshSigningKeyForAuthenticatedUser: [\"POST /user/ssh_signing_keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] }\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] }\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] }\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n deleteSocialAccountForAuthenticatedUser: [\"DELETE /user/social_accounts\"],\n deleteSshSigningKeyForAuthenticatedUser: [\n \"DELETE /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] }\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] }\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n getSshSigningKeyForAuthenticatedUser: [\n \"GET /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] }\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] }\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] }\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] }\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] }\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] }\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n listSocialAccountsForAuthenticatedUser: [\"GET /user/social_accounts\"],\n listSocialAccountsForUser: [\"GET /users/{username}/social_accounts\"],\n listSshSigningKeysForAuthenticatedUser: [\"GET /user/ssh_signing_keys\"],\n listSshSigningKeysForUser: [\"GET /users/{username}/ssh_signing_keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] }\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\"\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"]\n }\n};\nvar endpoints_default = Endpoints;\n\n// pkg/dist-src/endpoints-to-methods.js\nvar endpointMethodsMap = /* @__PURE__ */ new Map();\nfor (const [scope, endpoints] of Object.entries(endpoints_default)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign(\n {\n method,\n url\n },\n defaults\n );\n if (!endpointMethodsMap.has(scope)) {\n endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());\n }\n endpointMethodsMap.get(scope).set(methodName, {\n scope,\n methodName,\n endpointDefaults,\n decorations\n });\n }\n}\nvar handler = {\n has({ scope }, methodName) {\n return endpointMethodsMap.get(scope).has(methodName);\n },\n getOwnPropertyDescriptor(target, methodName) {\n return {\n value: this.get(target, methodName),\n // ensures method is in the cache\n configurable: true,\n writable: true,\n enumerable: true\n };\n },\n defineProperty(target, methodName, descriptor) {\n Object.defineProperty(target.cache, methodName, descriptor);\n return true;\n },\n deleteProperty(target, methodName) {\n delete target.cache[methodName];\n return true;\n },\n ownKeys({ scope }) {\n return [...endpointMethodsMap.get(scope).keys()];\n },\n set(target, methodName, value) {\n return target.cache[methodName] = value;\n },\n get({ octokit, scope, cache }, methodName) {\n if (cache[methodName]) {\n return cache[methodName];\n }\n const method = endpointMethodsMap.get(scope).get(methodName);\n if (!method) {\n return void 0;\n }\n const { endpointDefaults, decorations } = method;\n if (decorations) {\n cache[methodName] = decorate(\n octokit,\n scope,\n methodName,\n endpointDefaults,\n decorations\n );\n } else {\n cache[methodName] = octokit.request.defaults(endpointDefaults);\n }\n return cache[methodName];\n }\n};\nfunction endpointsToMethods(octokit) {\n const newMethods = {};\n for (const scope of endpointMethodsMap.keys()) {\n newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n function withDecorations(...args) {\n let options = requestWithDefaults.endpoint.merge(...args);\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: void 0\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(\n `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`\n );\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n const options2 = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(\n decorations.renamedParameters\n )) {\n if (name in options2) {\n octokit.log.warn(\n `\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`\n );\n if (!(alias in options2)) {\n options2[alias] = options2[name];\n }\n delete options2[name];\n }\n }\n return requestWithDefaults(options2);\n }\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n\n// pkg/dist-src/index.js\nfunction restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n rest: api\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nfunction legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n ...api,\n rest: api\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n legacyRestEndpointMethods,\n restEndpointMethods\n});\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nconst undici_1 = require(\"undici\");\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers || (exports.Headers = Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n readBodyBuffer() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n getAgentDispatcher(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (!useProxy) {\n return;\n }\n return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (!useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if tunneling agent isn't assigned create a new agent\n if (!agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _getProxyAgentDispatcher(parsedUrl, proxyUrl) {\n let proxyAgent;\n if (this._keepAlive) {\n proxyAgent = this._proxyAgentDispatcher;\n }\n // if agent is already assigned use that agent.\n if (proxyAgent) {\n return proxyAgent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {\n token: `${proxyUrl.username}:${proxyUrl.password}`\n })));\n this._proxyAgentDispatcher = proxyAgent;\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {\n rejectUnauthorized: false\n });\n }\n return proxyAgent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new URL(proxyVar);\n }\n catch (_a) {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new URL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\n//# sourceMappingURL=proxy.js.map","\"use strict\";\n/*\n * Copyright 2021 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.addAdminServicesToServer = exports.registerAdminService = void 0;\nconst registeredAdminServices = [];\nfunction registerAdminService(getServiceDefinition, getHandlers) {\n registeredAdminServices.push({ getServiceDefinition, getHandlers });\n}\nexports.registerAdminService = registerAdminService;\nfunction addAdminServicesToServer(server) {\n for (const { getServiceDefinition, getHandlers } of registeredAdminServices) {\n server.addService(getServiceDefinition(), getHandlers());\n }\n}\nexports.addAdminServicesToServer = addAdminServicesToServer;\n//# sourceMappingURL=admin.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BackoffTimeout = void 0;\nconst INITIAL_BACKOFF_MS = 1000;\nconst BACKOFF_MULTIPLIER = 1.6;\nconst MAX_BACKOFF_MS = 120000;\nconst BACKOFF_JITTER = 0.2;\n/**\n * Get a number uniformly at random in the range [min, max)\n * @param min\n * @param max\n */\nfunction uniformRandom(min, max) {\n return Math.random() * (max - min) + min;\n}\nclass BackoffTimeout {\n constructor(callback, options) {\n this.callback = callback;\n /**\n * The delay time at the start, and after each reset.\n */\n this.initialDelay = INITIAL_BACKOFF_MS;\n /**\n * The exponential backoff multiplier.\n */\n this.multiplier = BACKOFF_MULTIPLIER;\n /**\n * The maximum delay time\n */\n this.maxDelay = MAX_BACKOFF_MS;\n /**\n * The maximum fraction by which the delay time can randomly vary after\n * applying the multiplier.\n */\n this.jitter = BACKOFF_JITTER;\n /**\n * Indicates whether the timer is currently running.\n */\n this.running = false;\n /**\n * Indicates whether the timer should keep the Node process running if no\n * other async operation is doing so.\n */\n this.hasRef = true;\n /**\n * The time that the currently running timer was started. Only valid if\n * running is true.\n */\n this.startTime = new Date();\n /**\n * The approximate time that the currently running timer will end. Only valid\n * if running is true.\n */\n this.endTime = new Date();\n if (options) {\n if (options.initialDelay) {\n this.initialDelay = options.initialDelay;\n }\n if (options.multiplier) {\n this.multiplier = options.multiplier;\n }\n if (options.jitter) {\n this.jitter = options.jitter;\n }\n if (options.maxDelay) {\n this.maxDelay = options.maxDelay;\n }\n }\n this.nextDelay = this.initialDelay;\n this.timerId = setTimeout(() => { }, 0);\n clearTimeout(this.timerId);\n }\n runTimer(delay) {\n var _a, _b;\n this.endTime = this.startTime;\n this.endTime.setMilliseconds(this.endTime.getMilliseconds() + this.nextDelay);\n clearTimeout(this.timerId);\n this.timerId = setTimeout(() => {\n this.callback();\n this.running = false;\n }, delay);\n if (!this.hasRef) {\n (_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n }\n /**\n * Call the callback after the current amount of delay time\n */\n runOnce() {\n this.running = true;\n this.startTime = new Date();\n this.runTimer(this.nextDelay);\n const nextBackoff = Math.min(this.nextDelay * this.multiplier, this.maxDelay);\n const jitterMagnitude = nextBackoff * this.jitter;\n this.nextDelay =\n nextBackoff + uniformRandom(-jitterMagnitude, jitterMagnitude);\n }\n /**\n * Stop the timer. The callback will not be called until `runOnce` is called\n * again.\n */\n stop() {\n clearTimeout(this.timerId);\n this.running = false;\n }\n /**\n * Reset the delay time to its initial value. If the timer is still running,\n * retroactively apply that reset to the current timer.\n */\n reset() {\n this.nextDelay = this.initialDelay;\n if (this.running) {\n const now = new Date();\n const newEndTime = this.startTime;\n newEndTime.setMilliseconds(newEndTime.getMilliseconds() + this.nextDelay);\n clearTimeout(this.timerId);\n if (now < newEndTime) {\n this.runTimer(newEndTime.getTime() - now.getTime());\n }\n else {\n this.running = false;\n }\n }\n }\n /**\n * Check whether the timer is currently running.\n */\n isRunning() {\n return this.running;\n }\n /**\n * Set that while the timer is running, it should keep the Node process\n * running.\n */\n ref() {\n var _a, _b;\n this.hasRef = true;\n (_b = (_a = this.timerId).ref) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n /**\n * Set that while the timer is running, it should not keep the Node process\n * running.\n */\n unref() {\n var _a, _b;\n this.hasRef = false;\n (_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n /**\n * Get the approximate timestamp of when the timer will fire. Only valid if\n * this.isRunning() is true.\n */\n getEndTime() {\n return this.endTime;\n }\n}\nexports.BackoffTimeout = BackoffTimeout;\n//# sourceMappingURL=backoff-timeout.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CallCredentials = void 0;\nconst metadata_1 = require(\"./metadata\");\nfunction isCurrentOauth2Client(client) {\n return ('getRequestHeaders' in client &&\n typeof client.getRequestHeaders === 'function');\n}\n/**\n * A class that represents a generic method of adding authentication-related\n * metadata on a per-request basis.\n */\nclass CallCredentials {\n /**\n * Creates a new CallCredentials object from a given function that generates\n * Metadata objects.\n * @param metadataGenerator A function that accepts a set of options, and\n * generates a Metadata object based on these options, which is passed back\n * to the caller via a supplied (err, metadata) callback.\n */\n static createFromMetadataGenerator(metadataGenerator) {\n return new SingleCallCredentials(metadataGenerator);\n }\n /**\n * Create a gRPC credential from a Google credential object.\n * @param googleCredentials The authentication client to use.\n * @return The resulting CallCredentials object.\n */\n static createFromGoogleCredential(googleCredentials) {\n return CallCredentials.createFromMetadataGenerator((options, callback) => {\n let getHeaders;\n if (isCurrentOauth2Client(googleCredentials)) {\n getHeaders = googleCredentials.getRequestHeaders(options.service_url);\n }\n else {\n getHeaders = new Promise((resolve, reject) => {\n googleCredentials.getRequestMetadata(options.service_url, (err, headers) => {\n if (err) {\n reject(err);\n return;\n }\n if (!headers) {\n reject(new Error('Headers not set by metadata plugin'));\n return;\n }\n resolve(headers);\n });\n });\n }\n getHeaders.then(headers => {\n const metadata = new metadata_1.Metadata();\n for (const key of Object.keys(headers)) {\n metadata.add(key, headers[key]);\n }\n callback(null, metadata);\n }, err => {\n callback(err);\n });\n });\n }\n static createEmpty() {\n return new EmptyCallCredentials();\n }\n}\nexports.CallCredentials = CallCredentials;\nclass ComposedCallCredentials extends CallCredentials {\n constructor(creds) {\n super();\n this.creds = creds;\n }\n async generateMetadata(options) {\n const base = new metadata_1.Metadata();\n const generated = await Promise.all(this.creds.map(cred => cred.generateMetadata(options)));\n for (const gen of generated) {\n base.merge(gen);\n }\n return base;\n }\n compose(other) {\n return new ComposedCallCredentials(this.creds.concat([other]));\n }\n _equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof ComposedCallCredentials) {\n return this.creds.every((value, index) => value._equals(other.creds[index]));\n }\n else {\n return false;\n }\n }\n}\nclass SingleCallCredentials extends CallCredentials {\n constructor(metadataGenerator) {\n super();\n this.metadataGenerator = metadataGenerator;\n }\n generateMetadata(options) {\n return new Promise((resolve, reject) => {\n this.metadataGenerator(options, (err, metadata) => {\n if (metadata !== undefined) {\n resolve(metadata);\n }\n else {\n reject(err);\n }\n });\n });\n }\n compose(other) {\n return new ComposedCallCredentials([this, other]);\n }\n _equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof SingleCallCredentials) {\n return this.metadataGenerator === other.metadataGenerator;\n }\n else {\n return false;\n }\n }\n}\nclass EmptyCallCredentials extends CallCredentials {\n generateMetadata(options) {\n return Promise.resolve(new metadata_1.Metadata());\n }\n compose(other) {\n return other;\n }\n _equals(other) {\n return other instanceof EmptyCallCredentials;\n }\n}\n//# sourceMappingURL=call-credentials.js.map","\"use strict\";\n/*\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InterceptingListenerImpl = exports.isInterceptingListener = void 0;\nfunction isInterceptingListener(listener) {\n return (listener.onReceiveMetadata !== undefined &&\n listener.onReceiveMetadata.length === 1);\n}\nexports.isInterceptingListener = isInterceptingListener;\nclass InterceptingListenerImpl {\n constructor(listener, nextListener) {\n this.listener = listener;\n this.nextListener = nextListener;\n this.processingMetadata = false;\n this.hasPendingMessage = false;\n this.processingMessage = false;\n this.pendingStatus = null;\n }\n processPendingMessage() {\n if (this.hasPendingMessage) {\n this.nextListener.onReceiveMessage(this.pendingMessage);\n this.pendingMessage = null;\n this.hasPendingMessage = false;\n }\n }\n processPendingStatus() {\n if (this.pendingStatus) {\n this.nextListener.onReceiveStatus(this.pendingStatus);\n }\n }\n onReceiveMetadata(metadata) {\n this.processingMetadata = true;\n this.listener.onReceiveMetadata(metadata, metadata => {\n this.processingMetadata = false;\n this.nextListener.onReceiveMetadata(metadata);\n this.processPendingMessage();\n this.processPendingStatus();\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onReceiveMessage(message) {\n /* If this listener processes messages asynchronously, the last message may\n * be reordered with respect to the status */\n this.processingMessage = true;\n this.listener.onReceiveMessage(message, msg => {\n this.processingMessage = false;\n if (this.processingMetadata) {\n this.pendingMessage = msg;\n this.hasPendingMessage = true;\n }\n else {\n this.nextListener.onReceiveMessage(msg);\n this.processPendingStatus();\n }\n });\n }\n onReceiveStatus(status) {\n this.listener.onReceiveStatus(status, processedStatus => {\n if (this.processingMetadata || this.processingMessage) {\n this.pendingStatus = processedStatus;\n }\n else {\n this.nextListener.onReceiveStatus(processedStatus);\n }\n });\n }\n}\nexports.InterceptingListenerImpl = InterceptingListenerImpl;\n//# sourceMappingURL=call-interface.js.map","\"use strict\";\n/*\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getNextCallNumber = void 0;\nlet nextCallNumber = 0;\nfunction getNextCallNumber() {\n return nextCallNumber++;\n}\nexports.getNextCallNumber = getNextCallNumber;\n//# sourceMappingURL=call-number.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClientDuplexStreamImpl = exports.ClientWritableStreamImpl = exports.ClientReadableStreamImpl = exports.ClientUnaryCallImpl = exports.callErrorFromStatus = void 0;\nconst events_1 = require(\"events\");\nconst stream_1 = require(\"stream\");\nconst constants_1 = require(\"./constants\");\n/**\n * Construct a ServiceError from a StatusObject. This function exists primarily\n * as an attempt to make the error stack trace clearly communicate that the\n * error is not necessarily a problem in gRPC itself.\n * @param status\n */\nfunction callErrorFromStatus(status, callerStack) {\n const message = `${status.code} ${constants_1.Status[status.code]}: ${status.details}`;\n const error = new Error(message);\n const stack = `${error.stack}\\nfor call at\\n${callerStack}`;\n return Object.assign(new Error(message), status, { stack });\n}\nexports.callErrorFromStatus = callErrorFromStatus;\nclass ClientUnaryCallImpl extends events_1.EventEmitter {\n constructor() {\n super();\n }\n cancel() {\n var _a;\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client');\n }\n getPeer() {\n var _a, _b;\n return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown';\n }\n}\nexports.ClientUnaryCallImpl = ClientUnaryCallImpl;\nclass ClientReadableStreamImpl extends stream_1.Readable {\n constructor(deserialize) {\n super({ objectMode: true });\n this.deserialize = deserialize;\n }\n cancel() {\n var _a;\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client');\n }\n getPeer() {\n var _a, _b;\n return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown';\n }\n _read(_size) {\n var _a;\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.startRead();\n }\n}\nexports.ClientReadableStreamImpl = ClientReadableStreamImpl;\nclass ClientWritableStreamImpl extends stream_1.Writable {\n constructor(serialize) {\n super({ objectMode: true });\n this.serialize = serialize;\n }\n cancel() {\n var _a;\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client');\n }\n getPeer() {\n var _a, _b;\n return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown';\n }\n _write(chunk, encoding, cb) {\n var _a;\n const context = {\n callback: cb,\n };\n const flags = Number(encoding);\n if (!Number.isNaN(flags)) {\n context.flags = flags;\n }\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context, chunk);\n }\n _final(cb) {\n var _a;\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.halfClose();\n cb();\n }\n}\nexports.ClientWritableStreamImpl = ClientWritableStreamImpl;\nclass ClientDuplexStreamImpl extends stream_1.Duplex {\n constructor(serialize, deserialize) {\n super({ objectMode: true });\n this.serialize = serialize;\n this.deserialize = deserialize;\n }\n cancel() {\n var _a;\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled on client');\n }\n getPeer() {\n var _a, _b;\n return (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : 'unknown';\n }\n _read(_size) {\n var _a;\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.startRead();\n }\n _write(chunk, encoding, cb) {\n var _a;\n const context = {\n callback: cb,\n };\n const flags = Number(encoding);\n if (!Number.isNaN(flags)) {\n context.flags = flags;\n }\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context, chunk);\n }\n _final(cb) {\n var _a;\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.halfClose();\n cb();\n }\n}\nexports.ClientDuplexStreamImpl = ClientDuplexStreamImpl;\n//# sourceMappingURL=call.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChannelCredentials = void 0;\nconst tls_1 = require(\"tls\");\nconst call_credentials_1 = require(\"./call-credentials\");\nconst tls_helpers_1 = require(\"./tls-helpers\");\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction verifyIsBufferOrNull(obj, friendlyName) {\n if (obj && !(obj instanceof Buffer)) {\n throw new TypeError(`${friendlyName}, if provided, must be a Buffer.`);\n }\n}\n/**\n * A class that contains credentials for communicating over a channel, as well\n * as a set of per-call credentials, which are applied to every method call made\n * over a channel initialized with an instance of this class.\n */\nclass ChannelCredentials {\n constructor(callCredentials) {\n this.callCredentials = callCredentials || call_credentials_1.CallCredentials.createEmpty();\n }\n /**\n * Gets the set of per-call credentials associated with this instance.\n */\n _getCallCredentials() {\n return this.callCredentials;\n }\n /**\n * Return a new ChannelCredentials instance with a given set of credentials.\n * The resulting instance can be used to construct a Channel that communicates\n * over TLS.\n * @param rootCerts The root certificate data.\n * @param privateKey The client certificate private key, if available.\n * @param certChain The client certificate key chain, if available.\n * @param verifyOptions Additional options to modify certificate verification\n */\n static createSsl(rootCerts, privateKey, certChain, verifyOptions) {\n var _a;\n verifyIsBufferOrNull(rootCerts, 'Root certificate');\n verifyIsBufferOrNull(privateKey, 'Private key');\n verifyIsBufferOrNull(certChain, 'Certificate chain');\n if (privateKey && !certChain) {\n throw new Error('Private key must be given with accompanying certificate chain');\n }\n if (!privateKey && certChain) {\n throw new Error('Certificate chain must be given with accompanying private key');\n }\n const secureContext = (0, tls_1.createSecureContext)({\n ca: (_a = rootCerts !== null && rootCerts !== void 0 ? rootCerts : (0, tls_helpers_1.getDefaultRootsData)()) !== null && _a !== void 0 ? _a : undefined,\n key: privateKey !== null && privateKey !== void 0 ? privateKey : undefined,\n cert: certChain !== null && certChain !== void 0 ? certChain : undefined,\n ciphers: tls_helpers_1.CIPHER_SUITES,\n });\n return new SecureChannelCredentialsImpl(secureContext, verifyOptions !== null && verifyOptions !== void 0 ? verifyOptions : {});\n }\n /**\n * Return a new ChannelCredentials instance with credentials created using\n * the provided secureContext. The resulting instances can be used to\n * construct a Channel that communicates over TLS. gRPC will not override\n * anything in the provided secureContext, so the environment variables\n * GRPC_SSL_CIPHER_SUITES and GRPC_DEFAULT_SSL_ROOTS_FILE_PATH will\n * not be applied.\n * @param secureContext The return value of tls.createSecureContext()\n * @param verifyOptions Additional options to modify certificate verification\n */\n static createFromSecureContext(secureContext, verifyOptions) {\n return new SecureChannelCredentialsImpl(secureContext, verifyOptions !== null && verifyOptions !== void 0 ? verifyOptions : {});\n }\n /**\n * Return a new ChannelCredentials instance with no credentials.\n */\n static createInsecure() {\n return new InsecureChannelCredentialsImpl();\n }\n}\nexports.ChannelCredentials = ChannelCredentials;\nclass InsecureChannelCredentialsImpl extends ChannelCredentials {\n constructor() {\n super();\n }\n compose(callCredentials) {\n throw new Error('Cannot compose insecure credentials');\n }\n _getConnectionOptions() {\n return null;\n }\n _isSecure() {\n return false;\n }\n _equals(other) {\n return other instanceof InsecureChannelCredentialsImpl;\n }\n}\nclass SecureChannelCredentialsImpl extends ChannelCredentials {\n constructor(secureContext, verifyOptions) {\n super();\n this.secureContext = secureContext;\n this.verifyOptions = verifyOptions;\n this.connectionOptions = {\n secureContext,\n };\n // Node asserts that this option is a function, so we cannot pass undefined\n if (verifyOptions === null || verifyOptions === void 0 ? void 0 : verifyOptions.checkServerIdentity) {\n this.connectionOptions.checkServerIdentity =\n verifyOptions.checkServerIdentity;\n }\n }\n compose(callCredentials) {\n const combinedCallCredentials = this.callCredentials.compose(callCredentials);\n return new ComposedChannelCredentialsImpl(this, combinedCallCredentials);\n }\n _getConnectionOptions() {\n // Copy to prevent callers from mutating this.connectionOptions\n return Object.assign({}, this.connectionOptions);\n }\n _isSecure() {\n return true;\n }\n _equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof SecureChannelCredentialsImpl) {\n return (this.secureContext === other.secureContext &&\n this.verifyOptions.checkServerIdentity ===\n other.verifyOptions.checkServerIdentity);\n }\n else {\n return false;\n }\n }\n}\nclass ComposedChannelCredentialsImpl extends ChannelCredentials {\n constructor(channelCredentials, callCreds) {\n super(callCreds);\n this.channelCredentials = channelCredentials;\n }\n compose(callCredentials) {\n const combinedCallCredentials = this.callCredentials.compose(callCredentials);\n return new ComposedChannelCredentialsImpl(this.channelCredentials, combinedCallCredentials);\n }\n _getConnectionOptions() {\n return this.channelCredentials._getConnectionOptions();\n }\n _isSecure() {\n return true;\n }\n _equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof ComposedChannelCredentialsImpl) {\n return (this.channelCredentials._equals(other.channelCredentials) &&\n this.callCredentials._equals(other.callCredentials));\n }\n else {\n return false;\n }\n }\n}\n//# sourceMappingURL=channel-credentials.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.channelOptionsEqual = exports.recognizedOptions = void 0;\n/**\n * This is for checking provided options at runtime. This is an object for\n * easier membership checking.\n */\nexports.recognizedOptions = {\n 'grpc.ssl_target_name_override': true,\n 'grpc.primary_user_agent': true,\n 'grpc.secondary_user_agent': true,\n 'grpc.default_authority': true,\n 'grpc.keepalive_time_ms': true,\n 'grpc.keepalive_timeout_ms': true,\n 'grpc.keepalive_permit_without_calls': true,\n 'grpc.service_config': true,\n 'grpc.max_concurrent_streams': true,\n 'grpc.initial_reconnect_backoff_ms': true,\n 'grpc.max_reconnect_backoff_ms': true,\n 'grpc.use_local_subchannel_pool': true,\n 'grpc.max_send_message_length': true,\n 'grpc.max_receive_message_length': true,\n 'grpc.enable_http_proxy': true,\n 'grpc.enable_channelz': true,\n 'grpc.dns_min_time_between_resolutions_ms': true,\n 'grpc.enable_retries': true,\n 'grpc.per_rpc_retry_buffer_size': true,\n 'grpc.retry_buffer_size': true,\n 'grpc.max_connection_age_ms': true,\n 'grpc.max_connection_age_grace_ms': true,\n 'grpc-node.max_session_memory': true,\n 'grpc.service_config_disable_resolution': true,\n 'grpc.client_idle_timeout_ms': true,\n 'grpc-node.tls_enable_trace': true,\n 'grpc.lb.ring_hash.ring_size_cap': true,\n};\nfunction channelOptionsEqual(options1, options2) {\n const keys1 = Object.keys(options1).sort();\n const keys2 = Object.keys(options2).sort();\n if (keys1.length !== keys2.length) {\n return false;\n }\n for (let i = 0; i < keys1.length; i += 1) {\n if (keys1[i] !== keys2[i]) {\n return false;\n }\n if (options1[keys1[i]] !== options2[keys2[i]]) {\n return false;\n }\n }\n return true;\n}\nexports.channelOptionsEqual = channelOptionsEqual;\n//# sourceMappingURL=channel-options.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChannelImplementation = void 0;\nconst channel_credentials_1 = require(\"./channel-credentials\");\nconst internal_channel_1 = require(\"./internal-channel\");\nclass ChannelImplementation {\n constructor(target, credentials, options) {\n if (typeof target !== 'string') {\n throw new TypeError('Channel target must be a string');\n }\n if (!(credentials instanceof channel_credentials_1.ChannelCredentials)) {\n throw new TypeError('Channel credentials must be a ChannelCredentials object');\n }\n if (options) {\n if (typeof options !== 'object') {\n throw new TypeError('Channel options must be an object');\n }\n }\n this.internalChannel = new internal_channel_1.InternalChannel(target, credentials, options);\n }\n close() {\n this.internalChannel.close();\n }\n getTarget() {\n return this.internalChannel.getTarget();\n }\n getConnectivityState(tryToConnect) {\n return this.internalChannel.getConnectivityState(tryToConnect);\n }\n watchConnectivityState(currentState, deadline, callback) {\n this.internalChannel.watchConnectivityState(currentState, deadline, callback);\n }\n /**\n * Get the channelz reference object for this channel. The returned value is\n * garbage if channelz is disabled for this channel.\n * @returns\n */\n getChannelzRef() {\n return this.internalChannel.getChannelzRef();\n }\n createCall(method, deadline, host, parentCall, propagateFlags) {\n if (typeof method !== 'string') {\n throw new TypeError('Channel#createCall: method must be a string');\n }\n if (!(typeof deadline === 'number' || deadline instanceof Date)) {\n throw new TypeError('Channel#createCall: deadline must be a number or Date');\n }\n return this.internalChannel.createCall(method, deadline, host, parentCall, propagateFlags);\n }\n}\nexports.ChannelImplementation = ChannelImplementation;\n//# sourceMappingURL=channel.js.map",null,"\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getInterceptingCall = exports.InterceptingCall = exports.RequesterBuilder = exports.ListenerBuilder = exports.InterceptorConfigurationError = void 0;\nconst metadata_1 = require(\"./metadata\");\nconst call_interface_1 = require(\"./call-interface\");\nconst constants_1 = require(\"./constants\");\nconst error_1 = require(\"./error\");\n/**\n * Error class associated with passing both interceptors and interceptor\n * providers to a client constructor or as call options.\n */\nclass InterceptorConfigurationError extends Error {\n constructor(message) {\n super(message);\n this.name = 'InterceptorConfigurationError';\n Error.captureStackTrace(this, InterceptorConfigurationError);\n }\n}\nexports.InterceptorConfigurationError = InterceptorConfigurationError;\nclass ListenerBuilder {\n constructor() {\n this.metadata = undefined;\n this.message = undefined;\n this.status = undefined;\n }\n withOnReceiveMetadata(onReceiveMetadata) {\n this.metadata = onReceiveMetadata;\n return this;\n }\n withOnReceiveMessage(onReceiveMessage) {\n this.message = onReceiveMessage;\n return this;\n }\n withOnReceiveStatus(onReceiveStatus) {\n this.status = onReceiveStatus;\n return this;\n }\n build() {\n return {\n onReceiveMetadata: this.metadata,\n onReceiveMessage: this.message,\n onReceiveStatus: this.status,\n };\n }\n}\nexports.ListenerBuilder = ListenerBuilder;\nclass RequesterBuilder {\n constructor() {\n this.start = undefined;\n this.message = undefined;\n this.halfClose = undefined;\n this.cancel = undefined;\n }\n withStart(start) {\n this.start = start;\n return this;\n }\n withSendMessage(sendMessage) {\n this.message = sendMessage;\n return this;\n }\n withHalfClose(halfClose) {\n this.halfClose = halfClose;\n return this;\n }\n withCancel(cancel) {\n this.cancel = cancel;\n return this;\n }\n build() {\n return {\n start: this.start,\n sendMessage: this.message,\n halfClose: this.halfClose,\n cancel: this.cancel,\n };\n }\n}\nexports.RequesterBuilder = RequesterBuilder;\n/**\n * A Listener with a default pass-through implementation of each method. Used\n * for filling out Listeners with some methods omitted.\n */\nconst defaultListener = {\n onReceiveMetadata: (metadata, next) => {\n next(metadata);\n },\n onReceiveMessage: (message, next) => {\n next(message);\n },\n onReceiveStatus: (status, next) => {\n next(status);\n },\n};\n/**\n * A Requester with a default pass-through implementation of each method. Used\n * for filling out Requesters with some methods omitted.\n */\nconst defaultRequester = {\n start: (metadata, listener, next) => {\n next(metadata, listener);\n },\n sendMessage: (message, next) => {\n next(message);\n },\n halfClose: next => {\n next();\n },\n cancel: next => {\n next();\n },\n};\nclass InterceptingCall {\n constructor(nextCall, requester) {\n var _a, _b, _c, _d;\n this.nextCall = nextCall;\n /**\n * Indicates that metadata has been passed to the requester's start\n * method but it has not been passed to the corresponding next callback\n */\n this.processingMetadata = false;\n /**\n * Message context for a pending message that is waiting for\n */\n this.pendingMessageContext = null;\n /**\n * Indicates that a message has been passed to the requester's sendMessage\n * method but it has not been passed to the corresponding next callback\n */\n this.processingMessage = false;\n /**\n * Indicates that a status was received but could not be propagated because\n * a message was still being processed.\n */\n this.pendingHalfClose = false;\n if (requester) {\n this.requester = {\n start: (_a = requester.start) !== null && _a !== void 0 ? _a : defaultRequester.start,\n sendMessage: (_b = requester.sendMessage) !== null && _b !== void 0 ? _b : defaultRequester.sendMessage,\n halfClose: (_c = requester.halfClose) !== null && _c !== void 0 ? _c : defaultRequester.halfClose,\n cancel: (_d = requester.cancel) !== null && _d !== void 0 ? _d : defaultRequester.cancel,\n };\n }\n else {\n this.requester = defaultRequester;\n }\n }\n cancelWithStatus(status, details) {\n this.requester.cancel(() => {\n this.nextCall.cancelWithStatus(status, details);\n });\n }\n getPeer() {\n return this.nextCall.getPeer();\n }\n processPendingMessage() {\n if (this.pendingMessageContext) {\n this.nextCall.sendMessageWithContext(this.pendingMessageContext, this.pendingMessage);\n this.pendingMessageContext = null;\n this.pendingMessage = null;\n }\n }\n processPendingHalfClose() {\n if (this.pendingHalfClose) {\n this.nextCall.halfClose();\n }\n }\n start(metadata, interceptingListener) {\n var _a, _b, _c, _d, _e, _f;\n const fullInterceptingListener = {\n onReceiveMetadata: (_b = (_a = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveMetadata) === null || _a === void 0 ? void 0 : _a.bind(interceptingListener)) !== null && _b !== void 0 ? _b : (metadata => { }),\n onReceiveMessage: (_d = (_c = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveMessage) === null || _c === void 0 ? void 0 : _c.bind(interceptingListener)) !== null && _d !== void 0 ? _d : (message => { }),\n onReceiveStatus: (_f = (_e = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveStatus) === null || _e === void 0 ? void 0 : _e.bind(interceptingListener)) !== null && _f !== void 0 ? _f : (status => { }),\n };\n this.processingMetadata = true;\n this.requester.start(metadata, fullInterceptingListener, (md, listener) => {\n var _a, _b, _c;\n this.processingMetadata = false;\n let finalInterceptingListener;\n if ((0, call_interface_1.isInterceptingListener)(listener)) {\n finalInterceptingListener = listener;\n }\n else {\n const fullListener = {\n onReceiveMetadata: (_a = listener.onReceiveMetadata) !== null && _a !== void 0 ? _a : defaultListener.onReceiveMetadata,\n onReceiveMessage: (_b = listener.onReceiveMessage) !== null && _b !== void 0 ? _b : defaultListener.onReceiveMessage,\n onReceiveStatus: (_c = listener.onReceiveStatus) !== null && _c !== void 0 ? _c : defaultListener.onReceiveStatus,\n };\n finalInterceptingListener = new call_interface_1.InterceptingListenerImpl(fullListener, fullInterceptingListener);\n }\n this.nextCall.start(md, finalInterceptingListener);\n this.processPendingMessage();\n this.processPendingHalfClose();\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n sendMessageWithContext(context, message) {\n this.processingMessage = true;\n this.requester.sendMessage(message, finalMessage => {\n this.processingMessage = false;\n if (this.processingMetadata) {\n this.pendingMessageContext = context;\n this.pendingMessage = message;\n }\n else {\n this.nextCall.sendMessageWithContext(context, finalMessage);\n this.processPendingHalfClose();\n }\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n sendMessage(message) {\n this.sendMessageWithContext({}, message);\n }\n startRead() {\n this.nextCall.startRead();\n }\n halfClose() {\n this.requester.halfClose(() => {\n if (this.processingMetadata || this.processingMessage) {\n this.pendingHalfClose = true;\n }\n else {\n this.nextCall.halfClose();\n }\n });\n }\n}\nexports.InterceptingCall = InterceptingCall;\nfunction getCall(channel, path, options) {\n var _a, _b;\n const deadline = (_a = options.deadline) !== null && _a !== void 0 ? _a : Infinity;\n const host = options.host;\n const parent = (_b = options.parent) !== null && _b !== void 0 ? _b : null;\n const propagateFlags = options.propagate_flags;\n const credentials = options.credentials;\n const call = channel.createCall(path, deadline, host, parent, propagateFlags);\n if (credentials) {\n call.setCredentials(credentials);\n }\n return call;\n}\n/**\n * InterceptingCall implementation that directly owns the underlying Call\n * object and handles serialization and deseraizliation.\n */\nclass BaseInterceptingCall {\n constructor(call, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n methodDefinition) {\n this.call = call;\n this.methodDefinition = methodDefinition;\n }\n cancelWithStatus(status, details) {\n this.call.cancelWithStatus(status, details);\n }\n getPeer() {\n return this.call.getPeer();\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n sendMessageWithContext(context, message) {\n let serialized;\n try {\n serialized = this.methodDefinition.requestSerialize(message);\n }\n catch (e) {\n this.call.cancelWithStatus(constants_1.Status.INTERNAL, `Request message serialization failure: ${(0, error_1.getErrorMessage)(e)}`);\n return;\n }\n this.call.sendMessageWithContext(context, serialized);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n sendMessage(message) {\n this.sendMessageWithContext({}, message);\n }\n start(metadata, interceptingListener) {\n let readError = null;\n this.call.start(metadata, {\n onReceiveMetadata: metadata => {\n var _a;\n (_a = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveMetadata) === null || _a === void 0 ? void 0 : _a.call(interceptingListener, metadata);\n },\n onReceiveMessage: message => {\n var _a;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let deserialized;\n try {\n deserialized = this.methodDefinition.responseDeserialize(message);\n }\n catch (e) {\n readError = {\n code: constants_1.Status.INTERNAL,\n details: `Response message parsing error: ${(0, error_1.getErrorMessage)(e)}`,\n metadata: new metadata_1.Metadata(),\n };\n this.call.cancelWithStatus(readError.code, readError.details);\n return;\n }\n (_a = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveMessage) === null || _a === void 0 ? void 0 : _a.call(interceptingListener, deserialized);\n },\n onReceiveStatus: status => {\n var _a, _b;\n if (readError) {\n (_a = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveStatus) === null || _a === void 0 ? void 0 : _a.call(interceptingListener, readError);\n }\n else {\n (_b = interceptingListener === null || interceptingListener === void 0 ? void 0 : interceptingListener.onReceiveStatus) === null || _b === void 0 ? void 0 : _b.call(interceptingListener, status);\n }\n },\n });\n }\n startRead() {\n this.call.startRead();\n }\n halfClose() {\n this.call.halfClose();\n }\n}\n/**\n * BaseInterceptingCall with special-cased behavior for methods with unary\n * responses.\n */\nclass BaseUnaryInterceptingCall extends BaseInterceptingCall {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constructor(call, methodDefinition) {\n super(call, methodDefinition);\n }\n start(metadata, listener) {\n var _a, _b;\n let receivedMessage = false;\n const wrapperListener = {\n onReceiveMetadata: (_b = (_a = listener === null || listener === void 0 ? void 0 : listener.onReceiveMetadata) === null || _a === void 0 ? void 0 : _a.bind(listener)) !== null && _b !== void 0 ? _b : (metadata => { }),\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onReceiveMessage: (message) => {\n var _a;\n receivedMessage = true;\n (_a = listener === null || listener === void 0 ? void 0 : listener.onReceiveMessage) === null || _a === void 0 ? void 0 : _a.call(listener, message);\n },\n onReceiveStatus: (status) => {\n var _a, _b;\n if (!receivedMessage) {\n (_a = listener === null || listener === void 0 ? void 0 : listener.onReceiveMessage) === null || _a === void 0 ? void 0 : _a.call(listener, null);\n }\n (_b = listener === null || listener === void 0 ? void 0 : listener.onReceiveStatus) === null || _b === void 0 ? void 0 : _b.call(listener, status);\n },\n };\n super.start(metadata, wrapperListener);\n this.call.startRead();\n }\n}\n/**\n * BaseInterceptingCall with special-cased behavior for methods with streaming\n * responses.\n */\nclass BaseStreamingInterceptingCall extends BaseInterceptingCall {\n}\nfunction getBottomInterceptingCall(channel, options, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nmethodDefinition) {\n const call = getCall(channel, methodDefinition.path, options);\n if (methodDefinition.responseStream) {\n return new BaseStreamingInterceptingCall(call, methodDefinition);\n }\n else {\n return new BaseUnaryInterceptingCall(call, methodDefinition);\n }\n}\nfunction getInterceptingCall(interceptorArgs, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nmethodDefinition, options, channel) {\n if (interceptorArgs.clientInterceptors.length > 0 &&\n interceptorArgs.clientInterceptorProviders.length > 0) {\n throw new InterceptorConfigurationError('Both interceptors and interceptor_providers were passed as options ' +\n 'to the client constructor. Only one of these is allowed.');\n }\n if (interceptorArgs.callInterceptors.length > 0 &&\n interceptorArgs.callInterceptorProviders.length > 0) {\n throw new InterceptorConfigurationError('Both interceptors and interceptor_providers were passed as call ' +\n 'options. Only one of these is allowed.');\n }\n let interceptors = [];\n // Interceptors passed to the call override interceptors passed to the client constructor\n if (interceptorArgs.callInterceptors.length > 0 ||\n interceptorArgs.callInterceptorProviders.length > 0) {\n interceptors = []\n .concat(interceptorArgs.callInterceptors, interceptorArgs.callInterceptorProviders.map(provider => provider(methodDefinition)))\n .filter(interceptor => interceptor);\n // Filter out falsy values when providers return nothing\n }\n else {\n interceptors = []\n .concat(interceptorArgs.clientInterceptors, interceptorArgs.clientInterceptorProviders.map(provider => provider(methodDefinition)))\n .filter(interceptor => interceptor);\n // Filter out falsy values when providers return nothing\n }\n const interceptorOptions = Object.assign({}, options, {\n method_definition: methodDefinition,\n });\n /* For each interceptor in the list, the nextCall function passed to it is\n * based on the next interceptor in the list, using a nextCall function\n * constructed with the following interceptor in the list, and so on. The\n * initialValue, which is effectively at the end of the list, is a nextCall\n * function that invokes getBottomInterceptingCall, the result of which\n * handles (de)serialization and also gets the underlying call from the\n * channel. */\n const getCall = interceptors.reduceRight((nextCall, nextInterceptor) => {\n return currentOptions => nextInterceptor(currentOptions, nextCall);\n }, (finalOptions) => getBottomInterceptingCall(channel, finalOptions, methodDefinition));\n return getCall(interceptorOptions);\n}\nexports.getInterceptingCall = getInterceptingCall;\n//# sourceMappingURL=client-interceptors.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Client = void 0;\nconst call_1 = require(\"./call\");\nconst channel_1 = require(\"./channel\");\nconst connectivity_state_1 = require(\"./connectivity-state\");\nconst constants_1 = require(\"./constants\");\nconst metadata_1 = require(\"./metadata\");\nconst client_interceptors_1 = require(\"./client-interceptors\");\nconst CHANNEL_SYMBOL = Symbol();\nconst INTERCEPTOR_SYMBOL = Symbol();\nconst INTERCEPTOR_PROVIDER_SYMBOL = Symbol();\nconst CALL_INVOCATION_TRANSFORMER_SYMBOL = Symbol();\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nfunction getErrorStackString(error) {\n var _a;\n return ((_a = error.stack) === null || _a === void 0 ? void 0 : _a.split('\\n').slice(1).join('\\n')) || 'no stack trace available';\n}\n/**\n * A generic gRPC client. Primarily useful as a base class for all generated\n * clients.\n */\nclass Client {\n constructor(address, credentials, options = {}) {\n var _a, _b;\n options = Object.assign({}, options);\n this[INTERCEPTOR_SYMBOL] = (_a = options.interceptors) !== null && _a !== void 0 ? _a : [];\n delete options.interceptors;\n this[INTERCEPTOR_PROVIDER_SYMBOL] = (_b = options.interceptor_providers) !== null && _b !== void 0 ? _b : [];\n delete options.interceptor_providers;\n if (this[INTERCEPTOR_SYMBOL].length > 0 &&\n this[INTERCEPTOR_PROVIDER_SYMBOL].length > 0) {\n throw new Error('Both interceptors and interceptor_providers were passed as options ' +\n 'to the client constructor. Only one of these is allowed.');\n }\n this[CALL_INVOCATION_TRANSFORMER_SYMBOL] =\n options.callInvocationTransformer;\n delete options.callInvocationTransformer;\n if (options.channelOverride) {\n this[CHANNEL_SYMBOL] = options.channelOverride;\n }\n else if (options.channelFactoryOverride) {\n const channelFactoryOverride = options.channelFactoryOverride;\n delete options.channelFactoryOverride;\n this[CHANNEL_SYMBOL] = channelFactoryOverride(address, credentials, options);\n }\n else {\n this[CHANNEL_SYMBOL] = new channel_1.ChannelImplementation(address, credentials, options);\n }\n }\n close() {\n this[CHANNEL_SYMBOL].close();\n }\n getChannel() {\n return this[CHANNEL_SYMBOL];\n }\n waitForReady(deadline, callback) {\n const checkState = (err) => {\n if (err) {\n callback(new Error('Failed to connect before the deadline'));\n return;\n }\n let newState;\n try {\n newState = this[CHANNEL_SYMBOL].getConnectivityState(true);\n }\n catch (e) {\n callback(new Error('The channel has been closed'));\n return;\n }\n if (newState === connectivity_state_1.ConnectivityState.READY) {\n callback();\n }\n else {\n try {\n this[CHANNEL_SYMBOL].watchConnectivityState(newState, deadline, checkState);\n }\n catch (e) {\n callback(new Error('The channel has been closed'));\n }\n }\n };\n setImmediate(checkState);\n }\n checkOptionalUnaryResponseArguments(arg1, arg2, arg3) {\n if (isFunction(arg1)) {\n return { metadata: new metadata_1.Metadata(), options: {}, callback: arg1 };\n }\n else if (isFunction(arg2)) {\n if (arg1 instanceof metadata_1.Metadata) {\n return { metadata: arg1, options: {}, callback: arg2 };\n }\n else {\n return { metadata: new metadata_1.Metadata(), options: arg1, callback: arg2 };\n }\n }\n else {\n if (!(arg1 instanceof metadata_1.Metadata &&\n arg2 instanceof Object &&\n isFunction(arg3))) {\n throw new Error('Incorrect arguments passed');\n }\n return { metadata: arg1, options: arg2, callback: arg3 };\n }\n }\n makeUnaryRequest(method, serialize, deserialize, argument, metadata, options, callback) {\n var _a, _b;\n const checkedArguments = this.checkOptionalUnaryResponseArguments(metadata, options, callback);\n const methodDefinition = {\n path: method,\n requestStream: false,\n responseStream: false,\n requestSerialize: serialize,\n responseDeserialize: deserialize,\n };\n let callProperties = {\n argument: argument,\n metadata: checkedArguments.metadata,\n call: new call_1.ClientUnaryCallImpl(),\n channel: this[CHANNEL_SYMBOL],\n methodDefinition: methodDefinition,\n callOptions: checkedArguments.options,\n callback: checkedArguments.callback,\n };\n if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) {\n callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL](callProperties);\n }\n const emitter = callProperties.call;\n const interceptorArgs = {\n clientInterceptors: this[INTERCEPTOR_SYMBOL],\n clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL],\n callInterceptors: (_a = callProperties.callOptions.interceptors) !== null && _a !== void 0 ? _a : [],\n callInterceptorProviders: (_b = callProperties.callOptions.interceptor_providers) !== null && _b !== void 0 ? _b : [],\n };\n const call = (0, client_interceptors_1.getInterceptingCall)(interceptorArgs, callProperties.methodDefinition, callProperties.callOptions, callProperties.channel);\n /* This needs to happen before the emitter is used. Unfortunately we can't\n * enforce this with the type system. We need to construct this emitter\n * before calling the CallInvocationTransformer, and we need to create the\n * call after that. */\n emitter.call = call;\n let responseMessage = null;\n let receivedStatus = false;\n let callerStackError = new Error();\n call.start(callProperties.metadata, {\n onReceiveMetadata: metadata => {\n emitter.emit('metadata', metadata);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onReceiveMessage(message) {\n if (responseMessage !== null) {\n call.cancelWithStatus(constants_1.Status.INTERNAL, 'Too many responses received');\n }\n responseMessage = message;\n },\n onReceiveStatus(status) {\n if (receivedStatus) {\n return;\n }\n receivedStatus = true;\n if (status.code === constants_1.Status.OK) {\n if (responseMessage === null) {\n const callerStack = getErrorStackString(callerStackError);\n callProperties.callback((0, call_1.callErrorFromStatus)({\n code: constants_1.Status.INTERNAL,\n details: 'No message received',\n metadata: status.metadata,\n }, callerStack));\n }\n else {\n callProperties.callback(null, responseMessage);\n }\n }\n else {\n const callerStack = getErrorStackString(callerStackError);\n callProperties.callback((0, call_1.callErrorFromStatus)(status, callerStack));\n }\n /* Avoid retaining the callerStackError object in the call context of\n * the status event handler. */\n callerStackError = null;\n emitter.emit('status', status);\n },\n });\n call.sendMessage(argument);\n call.halfClose();\n return emitter;\n }\n makeClientStreamRequest(method, serialize, deserialize, metadata, options, callback) {\n var _a, _b;\n const checkedArguments = this.checkOptionalUnaryResponseArguments(metadata, options, callback);\n const methodDefinition = {\n path: method,\n requestStream: true,\n responseStream: false,\n requestSerialize: serialize,\n responseDeserialize: deserialize,\n };\n let callProperties = {\n metadata: checkedArguments.metadata,\n call: new call_1.ClientWritableStreamImpl(serialize),\n channel: this[CHANNEL_SYMBOL],\n methodDefinition: methodDefinition,\n callOptions: checkedArguments.options,\n callback: checkedArguments.callback,\n };\n if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) {\n callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL](callProperties);\n }\n const emitter = callProperties.call;\n const interceptorArgs = {\n clientInterceptors: this[INTERCEPTOR_SYMBOL],\n clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL],\n callInterceptors: (_a = callProperties.callOptions.interceptors) !== null && _a !== void 0 ? _a : [],\n callInterceptorProviders: (_b = callProperties.callOptions.interceptor_providers) !== null && _b !== void 0 ? _b : [],\n };\n const call = (0, client_interceptors_1.getInterceptingCall)(interceptorArgs, callProperties.methodDefinition, callProperties.callOptions, callProperties.channel);\n /* This needs to happen before the emitter is used. Unfortunately we can't\n * enforce this with the type system. We need to construct this emitter\n * before calling the CallInvocationTransformer, and we need to create the\n * call after that. */\n emitter.call = call;\n let responseMessage = null;\n let receivedStatus = false;\n let callerStackError = new Error();\n call.start(callProperties.metadata, {\n onReceiveMetadata: metadata => {\n emitter.emit('metadata', metadata);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onReceiveMessage(message) {\n if (responseMessage !== null) {\n call.cancelWithStatus(constants_1.Status.INTERNAL, 'Too many responses received');\n }\n responseMessage = message;\n },\n onReceiveStatus(status) {\n if (receivedStatus) {\n return;\n }\n receivedStatus = true;\n if (status.code === constants_1.Status.OK) {\n if (responseMessage === null) {\n const callerStack = getErrorStackString(callerStackError);\n callProperties.callback((0, call_1.callErrorFromStatus)({\n code: constants_1.Status.INTERNAL,\n details: 'No message received',\n metadata: status.metadata,\n }, callerStack));\n }\n else {\n callProperties.callback(null, responseMessage);\n }\n }\n else {\n const callerStack = getErrorStackString(callerStackError);\n callProperties.callback((0, call_1.callErrorFromStatus)(status, callerStack));\n }\n /* Avoid retaining the callerStackError object in the call context of\n * the status event handler. */\n callerStackError = null;\n emitter.emit('status', status);\n },\n });\n return emitter;\n }\n checkMetadataAndOptions(arg1, arg2) {\n let metadata;\n let options;\n if (arg1 instanceof metadata_1.Metadata) {\n metadata = arg1;\n if (arg2) {\n options = arg2;\n }\n else {\n options = {};\n }\n }\n else {\n if (arg1) {\n options = arg1;\n }\n else {\n options = {};\n }\n metadata = new metadata_1.Metadata();\n }\n return { metadata, options };\n }\n makeServerStreamRequest(method, serialize, deserialize, argument, metadata, options) {\n var _a, _b;\n const checkedArguments = this.checkMetadataAndOptions(metadata, options);\n const methodDefinition = {\n path: method,\n requestStream: false,\n responseStream: true,\n requestSerialize: serialize,\n responseDeserialize: deserialize,\n };\n let callProperties = {\n argument: argument,\n metadata: checkedArguments.metadata,\n call: new call_1.ClientReadableStreamImpl(deserialize),\n channel: this[CHANNEL_SYMBOL],\n methodDefinition: methodDefinition,\n callOptions: checkedArguments.options,\n };\n if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) {\n callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL](callProperties);\n }\n const stream = callProperties.call;\n const interceptorArgs = {\n clientInterceptors: this[INTERCEPTOR_SYMBOL],\n clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL],\n callInterceptors: (_a = callProperties.callOptions.interceptors) !== null && _a !== void 0 ? _a : [],\n callInterceptorProviders: (_b = callProperties.callOptions.interceptor_providers) !== null && _b !== void 0 ? _b : [],\n };\n const call = (0, client_interceptors_1.getInterceptingCall)(interceptorArgs, callProperties.methodDefinition, callProperties.callOptions, callProperties.channel);\n /* This needs to happen before the emitter is used. Unfortunately we can't\n * enforce this with the type system. We need to construct this emitter\n * before calling the CallInvocationTransformer, and we need to create the\n * call after that. */\n stream.call = call;\n let receivedStatus = false;\n let callerStackError = new Error();\n call.start(callProperties.metadata, {\n onReceiveMetadata(metadata) {\n stream.emit('metadata', metadata);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onReceiveMessage(message) {\n stream.push(message);\n },\n onReceiveStatus(status) {\n if (receivedStatus) {\n return;\n }\n receivedStatus = true;\n stream.push(null);\n if (status.code !== constants_1.Status.OK) {\n const callerStack = getErrorStackString(callerStackError);\n stream.emit('error', (0, call_1.callErrorFromStatus)(status, callerStack));\n }\n /* Avoid retaining the callerStackError object in the call context of\n * the status event handler. */\n callerStackError = null;\n stream.emit('status', status);\n },\n });\n call.sendMessage(argument);\n call.halfClose();\n return stream;\n }\n makeBidiStreamRequest(method, serialize, deserialize, metadata, options) {\n var _a, _b;\n const checkedArguments = this.checkMetadataAndOptions(metadata, options);\n const methodDefinition = {\n path: method,\n requestStream: true,\n responseStream: true,\n requestSerialize: serialize,\n responseDeserialize: deserialize,\n };\n let callProperties = {\n metadata: checkedArguments.metadata,\n call: new call_1.ClientDuplexStreamImpl(serialize, deserialize),\n channel: this[CHANNEL_SYMBOL],\n methodDefinition: methodDefinition,\n callOptions: checkedArguments.options,\n };\n if (this[CALL_INVOCATION_TRANSFORMER_SYMBOL]) {\n callProperties = this[CALL_INVOCATION_TRANSFORMER_SYMBOL](callProperties);\n }\n const stream = callProperties.call;\n const interceptorArgs = {\n clientInterceptors: this[INTERCEPTOR_SYMBOL],\n clientInterceptorProviders: this[INTERCEPTOR_PROVIDER_SYMBOL],\n callInterceptors: (_a = callProperties.callOptions.interceptors) !== null && _a !== void 0 ? _a : [],\n callInterceptorProviders: (_b = callProperties.callOptions.interceptor_providers) !== null && _b !== void 0 ? _b : [],\n };\n const call = (0, client_interceptors_1.getInterceptingCall)(interceptorArgs, callProperties.methodDefinition, callProperties.callOptions, callProperties.channel);\n /* This needs to happen before the emitter is used. Unfortunately we can't\n * enforce this with the type system. We need to construct this emitter\n * before calling the CallInvocationTransformer, and we need to create the\n * call after that. */\n stream.call = call;\n let receivedStatus = false;\n let callerStackError = new Error();\n call.start(callProperties.metadata, {\n onReceiveMetadata(metadata) {\n stream.emit('metadata', metadata);\n },\n onReceiveMessage(message) {\n stream.push(message);\n },\n onReceiveStatus(status) {\n if (receivedStatus) {\n return;\n }\n receivedStatus = true;\n stream.push(null);\n if (status.code !== constants_1.Status.OK) {\n const callerStack = getErrorStackString(callerStackError);\n stream.emit('error', (0, call_1.callErrorFromStatus)(status, callerStack));\n }\n /* Avoid retaining the callerStackError object in the call context of\n * the status event handler. */\n callerStackError = null;\n stream.emit('status', status);\n },\n });\n return stream;\n }\n}\nexports.Client = Client;\n//# sourceMappingURL=client.js.map","\"use strict\";\n/*\n * Copyright 2021 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompressionAlgorithms = void 0;\nvar CompressionAlgorithms;\n(function (CompressionAlgorithms) {\n CompressionAlgorithms[CompressionAlgorithms[\"identity\"] = 0] = \"identity\";\n CompressionAlgorithms[CompressionAlgorithms[\"deflate\"] = 1] = \"deflate\";\n CompressionAlgorithms[CompressionAlgorithms[\"gzip\"] = 2] = \"gzip\";\n})(CompressionAlgorithms || (exports.CompressionAlgorithms = CompressionAlgorithms = {}));\n//# sourceMappingURL=compression-algorithms.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompressionFilterFactory = exports.CompressionFilter = void 0;\nconst zlib = require(\"zlib\");\nconst compression_algorithms_1 = require(\"./compression-algorithms\");\nconst constants_1 = require(\"./constants\");\nconst filter_1 = require(\"./filter\");\nconst logging = require(\"./logging\");\nconst isCompressionAlgorithmKey = (key) => {\n return (typeof key === 'number' && typeof compression_algorithms_1.CompressionAlgorithms[key] === 'string');\n};\nclass CompressionHandler {\n /**\n * @param message Raw uncompressed message bytes\n * @param compress Indicates whether the message should be compressed\n * @return Framed message, compressed if applicable\n */\n async writeMessage(message, compress) {\n let messageBuffer = message;\n if (compress) {\n messageBuffer = await this.compressMessage(messageBuffer);\n }\n const output = Buffer.allocUnsafe(messageBuffer.length + 5);\n output.writeUInt8(compress ? 1 : 0, 0);\n output.writeUInt32BE(messageBuffer.length, 1);\n messageBuffer.copy(output, 5);\n return output;\n }\n /**\n * @param data Framed message, possibly compressed\n * @return Uncompressed message\n */\n async readMessage(data) {\n const compressed = data.readUInt8(0) === 1;\n let messageBuffer = data.slice(5);\n if (compressed) {\n messageBuffer = await this.decompressMessage(messageBuffer);\n }\n return messageBuffer;\n }\n}\nclass IdentityHandler extends CompressionHandler {\n async compressMessage(message) {\n return message;\n }\n async writeMessage(message, compress) {\n const output = Buffer.allocUnsafe(message.length + 5);\n /* With \"identity\" compression, messages should always be marked as\n * uncompressed */\n output.writeUInt8(0, 0);\n output.writeUInt32BE(message.length, 1);\n message.copy(output, 5);\n return output;\n }\n decompressMessage(message) {\n return Promise.reject(new Error('Received compressed message but \"grpc-encoding\" header was identity'));\n }\n}\nclass DeflateHandler extends CompressionHandler {\n compressMessage(message) {\n return new Promise((resolve, reject) => {\n zlib.deflate(message, (err, output) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(output);\n }\n });\n });\n }\n decompressMessage(message) {\n return new Promise((resolve, reject) => {\n zlib.inflate(message, (err, output) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(output);\n }\n });\n });\n }\n}\nclass GzipHandler extends CompressionHandler {\n compressMessage(message) {\n return new Promise((resolve, reject) => {\n zlib.gzip(message, (err, output) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(output);\n }\n });\n });\n }\n decompressMessage(message) {\n return new Promise((resolve, reject) => {\n zlib.unzip(message, (err, output) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(output);\n }\n });\n });\n }\n}\nclass UnknownHandler extends CompressionHandler {\n constructor(compressionName) {\n super();\n this.compressionName = compressionName;\n }\n compressMessage(message) {\n return Promise.reject(new Error(`Received message compressed with unsupported compression method ${this.compressionName}`));\n }\n decompressMessage(message) {\n // This should be unreachable\n return Promise.reject(new Error(`Compression method not supported: ${this.compressionName}`));\n }\n}\nfunction getCompressionHandler(compressionName) {\n switch (compressionName) {\n case 'identity':\n return new IdentityHandler();\n case 'deflate':\n return new DeflateHandler();\n case 'gzip':\n return new GzipHandler();\n default:\n return new UnknownHandler(compressionName);\n }\n}\nclass CompressionFilter extends filter_1.BaseFilter {\n constructor(channelOptions, sharedFilterConfig) {\n var _a;\n super();\n this.sharedFilterConfig = sharedFilterConfig;\n this.sendCompression = new IdentityHandler();\n this.receiveCompression = new IdentityHandler();\n this.currentCompressionAlgorithm = 'identity';\n const compressionAlgorithmKey = channelOptions['grpc.default_compression_algorithm'];\n if (compressionAlgorithmKey !== undefined) {\n if (isCompressionAlgorithmKey(compressionAlgorithmKey)) {\n const clientSelectedEncoding = compression_algorithms_1.CompressionAlgorithms[compressionAlgorithmKey];\n const serverSupportedEncodings = (_a = sharedFilterConfig.serverSupportedEncodingHeader) === null || _a === void 0 ? void 0 : _a.split(',');\n /**\n * There are two possible situations here:\n * 1) We don't have any info yet from the server about what compression it supports\n * In that case we should just use what the client tells us to use\n * 2) We've previously received a response from the server including a grpc-accept-encoding header\n * In that case we only want to use the encoding chosen by the client if the server supports it\n */\n if (!serverSupportedEncodings ||\n serverSupportedEncodings.includes(clientSelectedEncoding)) {\n this.currentCompressionAlgorithm = clientSelectedEncoding;\n this.sendCompression = getCompressionHandler(this.currentCompressionAlgorithm);\n }\n }\n else {\n logging.log(constants_1.LogVerbosity.ERROR, `Invalid value provided for grpc.default_compression_algorithm option: ${compressionAlgorithmKey}`);\n }\n }\n }\n async sendMetadata(metadata) {\n const headers = await metadata;\n headers.set('grpc-accept-encoding', 'identity,deflate,gzip');\n headers.set('accept-encoding', 'identity');\n // No need to send the header if it's \"identity\" - behavior is identical; save the bandwidth\n if (this.currentCompressionAlgorithm === 'identity') {\n headers.remove('grpc-encoding');\n }\n else {\n headers.set('grpc-encoding', this.currentCompressionAlgorithm);\n }\n return headers;\n }\n receiveMetadata(metadata) {\n const receiveEncoding = metadata.get('grpc-encoding');\n if (receiveEncoding.length > 0) {\n const encoding = receiveEncoding[0];\n if (typeof encoding === 'string') {\n this.receiveCompression = getCompressionHandler(encoding);\n }\n }\n metadata.remove('grpc-encoding');\n /* Check to see if the compression we're using to send messages is supported by the server\n * If not, reset the sendCompression filter and have it use the default IdentityHandler */\n const serverSupportedEncodingsHeader = metadata.get('grpc-accept-encoding')[0];\n if (serverSupportedEncodingsHeader) {\n this.sharedFilterConfig.serverSupportedEncodingHeader =\n serverSupportedEncodingsHeader;\n const serverSupportedEncodings = serverSupportedEncodingsHeader.split(',');\n if (!serverSupportedEncodings.includes(this.currentCompressionAlgorithm)) {\n this.sendCompression = new IdentityHandler();\n this.currentCompressionAlgorithm = 'identity';\n }\n }\n metadata.remove('grpc-accept-encoding');\n return metadata;\n }\n async sendMessage(message) {\n var _a;\n /* This filter is special. The input message is the bare message bytes,\n * and the output is a framed and possibly compressed message. For this\n * reason, this filter should be at the bottom of the filter stack */\n const resolvedMessage = await message;\n let compress;\n if (this.sendCompression instanceof IdentityHandler) {\n compress = false;\n }\n else {\n compress = (((_a = resolvedMessage.flags) !== null && _a !== void 0 ? _a : 0) & 2 /* WriteFlags.NoCompress */) === 0;\n }\n return {\n message: await this.sendCompression.writeMessage(resolvedMessage.message, compress),\n flags: resolvedMessage.flags,\n };\n }\n async receiveMessage(message) {\n /* This filter is also special. The input message is framed and possibly\n * compressed, and the output message is deframed and uncompressed. So\n * this is another reason that this filter should be at the bottom of the\n * filter stack. */\n return this.receiveCompression.readMessage(await message);\n }\n}\nexports.CompressionFilter = CompressionFilter;\nclass CompressionFilterFactory {\n constructor(channel, options) {\n this.options = options;\n this.sharedFilterConfig = {};\n }\n createFilter() {\n return new CompressionFilter(this.options, this.sharedFilterConfig);\n }\n}\nexports.CompressionFilterFactory = CompressionFilterFactory;\n//# sourceMappingURL=compression-filter.js.map","\"use strict\";\n/*\n * Copyright 2021 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConnectivityState = void 0;\nvar ConnectivityState;\n(function (ConnectivityState) {\n ConnectivityState[ConnectivityState[\"IDLE\"] = 0] = \"IDLE\";\n ConnectivityState[ConnectivityState[\"CONNECTING\"] = 1] = \"CONNECTING\";\n ConnectivityState[ConnectivityState[\"READY\"] = 2] = \"READY\";\n ConnectivityState[ConnectivityState[\"TRANSIENT_FAILURE\"] = 3] = \"TRANSIENT_FAILURE\";\n ConnectivityState[ConnectivityState[\"SHUTDOWN\"] = 4] = \"SHUTDOWN\";\n})(ConnectivityState || (exports.ConnectivityState = ConnectivityState = {}));\n//# sourceMappingURL=connectivity-state.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = exports.DEFAULT_MAX_SEND_MESSAGE_LENGTH = exports.Propagate = exports.LogVerbosity = exports.Status = void 0;\nvar Status;\n(function (Status) {\n Status[Status[\"OK\"] = 0] = \"OK\";\n Status[Status[\"CANCELLED\"] = 1] = \"CANCELLED\";\n Status[Status[\"UNKNOWN\"] = 2] = \"UNKNOWN\";\n Status[Status[\"INVALID_ARGUMENT\"] = 3] = \"INVALID_ARGUMENT\";\n Status[Status[\"DEADLINE_EXCEEDED\"] = 4] = \"DEADLINE_EXCEEDED\";\n Status[Status[\"NOT_FOUND\"] = 5] = \"NOT_FOUND\";\n Status[Status[\"ALREADY_EXISTS\"] = 6] = \"ALREADY_EXISTS\";\n Status[Status[\"PERMISSION_DENIED\"] = 7] = \"PERMISSION_DENIED\";\n Status[Status[\"RESOURCE_EXHAUSTED\"] = 8] = \"RESOURCE_EXHAUSTED\";\n Status[Status[\"FAILED_PRECONDITION\"] = 9] = \"FAILED_PRECONDITION\";\n Status[Status[\"ABORTED\"] = 10] = \"ABORTED\";\n Status[Status[\"OUT_OF_RANGE\"] = 11] = \"OUT_OF_RANGE\";\n Status[Status[\"UNIMPLEMENTED\"] = 12] = \"UNIMPLEMENTED\";\n Status[Status[\"INTERNAL\"] = 13] = \"INTERNAL\";\n Status[Status[\"UNAVAILABLE\"] = 14] = \"UNAVAILABLE\";\n Status[Status[\"DATA_LOSS\"] = 15] = \"DATA_LOSS\";\n Status[Status[\"UNAUTHENTICATED\"] = 16] = \"UNAUTHENTICATED\";\n})(Status || (exports.Status = Status = {}));\nvar LogVerbosity;\n(function (LogVerbosity) {\n LogVerbosity[LogVerbosity[\"DEBUG\"] = 0] = \"DEBUG\";\n LogVerbosity[LogVerbosity[\"INFO\"] = 1] = \"INFO\";\n LogVerbosity[LogVerbosity[\"ERROR\"] = 2] = \"ERROR\";\n LogVerbosity[LogVerbosity[\"NONE\"] = 3] = \"NONE\";\n})(LogVerbosity || (exports.LogVerbosity = LogVerbosity = {}));\n/**\n * NOTE: This enum is not currently used in any implemented API in this\n * library. It is included only for type parity with the other implementation.\n */\nvar Propagate;\n(function (Propagate) {\n Propagate[Propagate[\"DEADLINE\"] = 1] = \"DEADLINE\";\n Propagate[Propagate[\"CENSUS_STATS_CONTEXT\"] = 2] = \"CENSUS_STATS_CONTEXT\";\n Propagate[Propagate[\"CENSUS_TRACING_CONTEXT\"] = 4] = \"CENSUS_TRACING_CONTEXT\";\n Propagate[Propagate[\"CANCELLATION\"] = 8] = \"CANCELLATION\";\n // https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/propagation_bits.h#L43\n Propagate[Propagate[\"DEFAULTS\"] = 65535] = \"DEFAULTS\";\n})(Propagate || (exports.Propagate = Propagate = {}));\n// -1 means unlimited\nexports.DEFAULT_MAX_SEND_MESSAGE_LENGTH = -1;\n// 4 MB default\nexports.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = 4 * 1024 * 1024;\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/*\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.restrictControlPlaneStatusCode = void 0;\nconst constants_1 = require(\"./constants\");\nconst INAPPROPRIATE_CONTROL_PLANE_CODES = [\n constants_1.Status.OK,\n constants_1.Status.INVALID_ARGUMENT,\n constants_1.Status.NOT_FOUND,\n constants_1.Status.ALREADY_EXISTS,\n constants_1.Status.FAILED_PRECONDITION,\n constants_1.Status.ABORTED,\n constants_1.Status.OUT_OF_RANGE,\n constants_1.Status.DATA_LOSS,\n];\nfunction restrictControlPlaneStatusCode(code, details) {\n if (INAPPROPRIATE_CONTROL_PLANE_CODES.includes(code)) {\n return {\n code: constants_1.Status.INTERNAL,\n details: `Invalid status from control plane: ${code} ${constants_1.Status[code]} ${details}`,\n };\n }\n else {\n return { code, details };\n }\n}\nexports.restrictControlPlaneStatusCode = restrictControlPlaneStatusCode;\n//# sourceMappingURL=control-plane-status.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatDateDifference = exports.deadlineToString = exports.getRelativeTimeout = exports.getDeadlineTimeoutString = exports.minDeadline = void 0;\nfunction minDeadline(...deadlineList) {\n let minValue = Infinity;\n for (const deadline of deadlineList) {\n const deadlineMsecs = deadline instanceof Date ? deadline.getTime() : deadline;\n if (deadlineMsecs < minValue) {\n minValue = deadlineMsecs;\n }\n }\n return minValue;\n}\nexports.minDeadline = minDeadline;\nconst units = [\n ['m', 1],\n ['S', 1000],\n ['M', 60 * 1000],\n ['H', 60 * 60 * 1000],\n];\nfunction getDeadlineTimeoutString(deadline) {\n const now = new Date().getTime();\n if (deadline instanceof Date) {\n deadline = deadline.getTime();\n }\n const timeoutMs = Math.max(deadline - now, 0);\n for (const [unit, factor] of units) {\n const amount = timeoutMs / factor;\n if (amount < 1e8) {\n return String(Math.ceil(amount)) + unit;\n }\n }\n throw new Error('Deadline is too far in the future');\n}\nexports.getDeadlineTimeoutString = getDeadlineTimeoutString;\n/**\n * See https://nodejs.org/api/timers.html#settimeoutcallback-delay-args\n * In particular, \"When delay is larger than 2147483647 or less than 1, the\n * delay will be set to 1. Non-integer delays are truncated to an integer.\"\n * This number of milliseconds is almost 25 days.\n */\nconst MAX_TIMEOUT_TIME = 2147483647;\n/**\n * Get the timeout value that should be passed to setTimeout now for the timer\n * to end at the deadline. For any deadline before now, the timer should end\n * immediately, represented by a value of 0. For any deadline more than\n * MAX_TIMEOUT_TIME milliseconds in the future, a timer cannot be set that will\n * end at that time, so it is treated as infinitely far in the future.\n * @param deadline\n * @returns\n */\nfunction getRelativeTimeout(deadline) {\n const deadlineMs = deadline instanceof Date ? deadline.getTime() : deadline;\n const now = new Date().getTime();\n const timeout = deadlineMs - now;\n if (timeout < 0) {\n return 0;\n }\n else if (timeout > MAX_TIMEOUT_TIME) {\n return Infinity;\n }\n else {\n return timeout;\n }\n}\nexports.getRelativeTimeout = getRelativeTimeout;\nfunction deadlineToString(deadline) {\n if (deadline instanceof Date) {\n return deadline.toISOString();\n }\n else {\n const dateDeadline = new Date(deadline);\n if (Number.isNaN(dateDeadline.getTime())) {\n return '' + deadline;\n }\n else {\n return dateDeadline.toISOString();\n }\n }\n}\nexports.deadlineToString = deadlineToString;\n/**\n * Calculate the difference between two dates as a number of seconds and format\n * it as a string.\n * @param startDate\n * @param endDate\n * @returns\n */\nfunction formatDateDifference(startDate, endDate) {\n return ((endDate.getTime() - startDate.getTime()) / 1000).toFixed(3) + 's';\n}\nexports.formatDateDifference = formatDateDifference;\n//# sourceMappingURL=deadline.js.map","\"use strict\";\n/*\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isDuration = exports.durationToMs = exports.msToDuration = void 0;\nfunction msToDuration(millis) {\n return {\n seconds: (millis / 1000) | 0,\n nanos: ((millis % 1000) * 1000000) | 0,\n };\n}\nexports.msToDuration = msToDuration;\nfunction durationToMs(duration) {\n return (duration.seconds * 1000 + duration.nanos / 1000000) | 0;\n}\nexports.durationToMs = durationToMs;\nfunction isDuration(value) {\n return typeof value.seconds === 'number' && typeof value.nanos === 'number';\n}\nexports.isDuration = isDuration;\n//# sourceMappingURL=duration.js.map","\"use strict\";\n/*\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getErrorCode = exports.getErrorMessage = void 0;\nfunction getErrorMessage(error) {\n if (error instanceof Error) {\n return error.message;\n }\n else {\n return String(error);\n }\n}\nexports.getErrorMessage = getErrorMessage;\nfunction getErrorCode(error) {\n if (typeof error === 'object' &&\n error !== null &&\n 'code' in error &&\n typeof error.code === 'number') {\n return error.code;\n }\n else {\n return null;\n }\n}\nexports.getErrorCode = getErrorCode;\n//# sourceMappingURL=error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseSubchannelWrapper = exports.registerAdminService = exports.FilterStackFactory = exports.BaseFilter = exports.PickResultType = exports.QueuePicker = exports.UnavailablePicker = exports.ChildLoadBalancerHandler = exports.EndpointMap = exports.endpointHasAddress = exports.endpointToString = exports.subchannelAddressToString = exports.LeafLoadBalancer = exports.isLoadBalancerNameRegistered = exports.parseLoadBalancingConfig = exports.selectLbConfigFromList = exports.registerLoadBalancerType = exports.createChildChannelControlHelper = exports.BackoffTimeout = exports.durationToMs = exports.uriToString = exports.createResolver = exports.registerResolver = exports.log = exports.trace = void 0;\nvar logging_1 = require(\"./logging\");\nObject.defineProperty(exports, \"trace\", { enumerable: true, get: function () { return logging_1.trace; } });\nObject.defineProperty(exports, \"log\", { enumerable: true, get: function () { return logging_1.log; } });\nvar resolver_1 = require(\"./resolver\");\nObject.defineProperty(exports, \"registerResolver\", { enumerable: true, get: function () { return resolver_1.registerResolver; } });\nObject.defineProperty(exports, \"createResolver\", { enumerable: true, get: function () { return resolver_1.createResolver; } });\nvar uri_parser_1 = require(\"./uri-parser\");\nObject.defineProperty(exports, \"uriToString\", { enumerable: true, get: function () { return uri_parser_1.uriToString; } });\nvar duration_1 = require(\"./duration\");\nObject.defineProperty(exports, \"durationToMs\", { enumerable: true, get: function () { return duration_1.durationToMs; } });\nvar backoff_timeout_1 = require(\"./backoff-timeout\");\nObject.defineProperty(exports, \"BackoffTimeout\", { enumerable: true, get: function () { return backoff_timeout_1.BackoffTimeout; } });\nvar load_balancer_1 = require(\"./load-balancer\");\nObject.defineProperty(exports, \"createChildChannelControlHelper\", { enumerable: true, get: function () { return load_balancer_1.createChildChannelControlHelper; } });\nObject.defineProperty(exports, \"registerLoadBalancerType\", { enumerable: true, get: function () { return load_balancer_1.registerLoadBalancerType; } });\nObject.defineProperty(exports, \"selectLbConfigFromList\", { enumerable: true, get: function () { return load_balancer_1.selectLbConfigFromList; } });\nObject.defineProperty(exports, \"parseLoadBalancingConfig\", { enumerable: true, get: function () { return load_balancer_1.parseLoadBalancingConfig; } });\nObject.defineProperty(exports, \"isLoadBalancerNameRegistered\", { enumerable: true, get: function () { return load_balancer_1.isLoadBalancerNameRegistered; } });\nvar load_balancer_pick_first_1 = require(\"./load-balancer-pick-first\");\nObject.defineProperty(exports, \"LeafLoadBalancer\", { enumerable: true, get: function () { return load_balancer_pick_first_1.LeafLoadBalancer; } });\nvar subchannel_address_1 = require(\"./subchannel-address\");\nObject.defineProperty(exports, \"subchannelAddressToString\", { enumerable: true, get: function () { return subchannel_address_1.subchannelAddressToString; } });\nObject.defineProperty(exports, \"endpointToString\", { enumerable: true, get: function () { return subchannel_address_1.endpointToString; } });\nObject.defineProperty(exports, \"endpointHasAddress\", { enumerable: true, get: function () { return subchannel_address_1.endpointHasAddress; } });\nObject.defineProperty(exports, \"EndpointMap\", { enumerable: true, get: function () { return subchannel_address_1.EndpointMap; } });\nvar load_balancer_child_handler_1 = require(\"./load-balancer-child-handler\");\nObject.defineProperty(exports, \"ChildLoadBalancerHandler\", { enumerable: true, get: function () { return load_balancer_child_handler_1.ChildLoadBalancerHandler; } });\nvar picker_1 = require(\"./picker\");\nObject.defineProperty(exports, \"UnavailablePicker\", { enumerable: true, get: function () { return picker_1.UnavailablePicker; } });\nObject.defineProperty(exports, \"QueuePicker\", { enumerable: true, get: function () { return picker_1.QueuePicker; } });\nObject.defineProperty(exports, \"PickResultType\", { enumerable: true, get: function () { return picker_1.PickResultType; } });\nvar filter_1 = require(\"./filter\");\nObject.defineProperty(exports, \"BaseFilter\", { enumerable: true, get: function () { return filter_1.BaseFilter; } });\nvar filter_stack_1 = require(\"./filter-stack\");\nObject.defineProperty(exports, \"FilterStackFactory\", { enumerable: true, get: function () { return filter_stack_1.FilterStackFactory; } });\nvar admin_1 = require(\"./admin\");\nObject.defineProperty(exports, \"registerAdminService\", { enumerable: true, get: function () { return admin_1.registerAdminService; } });\nvar subchannel_interface_1 = require(\"./subchannel-interface\");\nObject.defineProperty(exports, \"BaseSubchannelWrapper\", { enumerable: true, get: function () { return subchannel_interface_1.BaseSubchannelWrapper; } });\n//# sourceMappingURL=experimental.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FilterStackFactory = exports.FilterStack = void 0;\nclass FilterStack {\n constructor(filters) {\n this.filters = filters;\n }\n sendMetadata(metadata) {\n let result = metadata;\n for (let i = 0; i < this.filters.length; i++) {\n result = this.filters[i].sendMetadata(result);\n }\n return result;\n }\n receiveMetadata(metadata) {\n let result = metadata;\n for (let i = this.filters.length - 1; i >= 0; i--) {\n result = this.filters[i].receiveMetadata(result);\n }\n return result;\n }\n sendMessage(message) {\n let result = message;\n for (let i = 0; i < this.filters.length; i++) {\n result = this.filters[i].sendMessage(result);\n }\n return result;\n }\n receiveMessage(message) {\n let result = message;\n for (let i = this.filters.length - 1; i >= 0; i--) {\n result = this.filters[i].receiveMessage(result);\n }\n return result;\n }\n receiveTrailers(status) {\n let result = status;\n for (let i = this.filters.length - 1; i >= 0; i--) {\n result = this.filters[i].receiveTrailers(result);\n }\n return result;\n }\n push(filters) {\n this.filters.unshift(...filters);\n }\n getFilters() {\n return this.filters;\n }\n}\nexports.FilterStack = FilterStack;\nclass FilterStackFactory {\n constructor(factories) {\n this.factories = factories;\n }\n push(filterFactories) {\n this.factories.unshift(...filterFactories);\n }\n clone() {\n return new FilterStackFactory([...this.factories]);\n }\n createFilter() {\n return new FilterStack(this.factories.map(factory => factory.createFilter()));\n }\n}\nexports.FilterStackFactory = FilterStackFactory;\n//# sourceMappingURL=filter-stack.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseFilter = void 0;\nclass BaseFilter {\n async sendMetadata(metadata) {\n return metadata;\n }\n receiveMetadata(metadata) {\n return metadata;\n }\n async sendMessage(message) {\n return message;\n }\n async receiveMessage(message) {\n return message;\n }\n receiveTrailers(status) {\n return status;\n }\n}\nexports.BaseFilter = BaseFilter;\n//# sourceMappingURL=filter.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getProxiedConnection = exports.mapProxyName = void 0;\nconst logging_1 = require(\"./logging\");\nconst constants_1 = require(\"./constants\");\nconst resolver_1 = require(\"./resolver\");\nconst http = require(\"http\");\nconst tls = require(\"tls\");\nconst logging = require(\"./logging\");\nconst subchannel_address_1 = require(\"./subchannel-address\");\nconst uri_parser_1 = require(\"./uri-parser\");\nconst url_1 = require(\"url\");\nconst resolver_dns_1 = require(\"./resolver-dns\");\nconst TRACER_NAME = 'proxy';\nfunction trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);\n}\nfunction getProxyInfo() {\n let proxyEnv = '';\n let envVar = '';\n /* Prefer using 'grpc_proxy'. Fallback on 'http_proxy' if it is not set.\n * Also prefer using 'https_proxy' with fallback on 'http_proxy'. The\n * fallback behavior can be removed if there's a demand for it.\n */\n if (process.env.grpc_proxy) {\n envVar = 'grpc_proxy';\n proxyEnv = process.env.grpc_proxy;\n }\n else if (process.env.https_proxy) {\n envVar = 'https_proxy';\n proxyEnv = process.env.https_proxy;\n }\n else if (process.env.http_proxy) {\n envVar = 'http_proxy';\n proxyEnv = process.env.http_proxy;\n }\n else {\n return {};\n }\n let proxyUrl;\n try {\n proxyUrl = new url_1.URL(proxyEnv);\n }\n catch (e) {\n (0, logging_1.log)(constants_1.LogVerbosity.ERROR, `cannot parse value of \"${envVar}\" env var`);\n return {};\n }\n if (proxyUrl.protocol !== 'http:') {\n (0, logging_1.log)(constants_1.LogVerbosity.ERROR, `\"${proxyUrl.protocol}\" scheme not supported in proxy URI`);\n return {};\n }\n let userCred = null;\n if (proxyUrl.username) {\n if (proxyUrl.password) {\n (0, logging_1.log)(constants_1.LogVerbosity.INFO, 'userinfo found in proxy URI');\n userCred = `${proxyUrl.username}:${proxyUrl.password}`;\n }\n else {\n userCred = proxyUrl.username;\n }\n }\n const hostname = proxyUrl.hostname;\n let port = proxyUrl.port;\n /* The proxy URL uses the scheme \"http:\", which has a default port number of\n * 80. We need to set that explicitly here if it is omitted because otherwise\n * it will use gRPC's default port 443. */\n if (port === '') {\n port = '80';\n }\n const result = {\n address: `${hostname}:${port}`,\n };\n if (userCred) {\n result.creds = userCred;\n }\n trace('Proxy server ' + result.address + ' set by environment variable ' + envVar);\n return result;\n}\nfunction getNoProxyHostList() {\n /* Prefer using 'no_grpc_proxy'. Fallback on 'no_proxy' if it is not set. */\n let noProxyStr = process.env.no_grpc_proxy;\n let envVar = 'no_grpc_proxy';\n if (!noProxyStr) {\n noProxyStr = process.env.no_proxy;\n envVar = 'no_proxy';\n }\n if (noProxyStr) {\n trace('No proxy server list set by environment variable ' + envVar);\n return noProxyStr.split(',');\n }\n else {\n return [];\n }\n}\nfunction mapProxyName(target, options) {\n var _a;\n const noProxyResult = {\n target: target,\n extraOptions: {},\n };\n if (((_a = options['grpc.enable_http_proxy']) !== null && _a !== void 0 ? _a : 1) === 0) {\n return noProxyResult;\n }\n if (target.scheme === 'unix') {\n return noProxyResult;\n }\n const proxyInfo = getProxyInfo();\n if (!proxyInfo.address) {\n return noProxyResult;\n }\n const hostPort = (0, uri_parser_1.splitHostPort)(target.path);\n if (!hostPort) {\n return noProxyResult;\n }\n const serverHost = hostPort.host;\n for (const host of getNoProxyHostList()) {\n if (host === serverHost) {\n trace('Not using proxy for target in no_proxy list: ' + (0, uri_parser_1.uriToString)(target));\n return noProxyResult;\n }\n }\n const extraOptions = {\n 'grpc.http_connect_target': (0, uri_parser_1.uriToString)(target),\n };\n if (proxyInfo.creds) {\n extraOptions['grpc.http_connect_creds'] = proxyInfo.creds;\n }\n return {\n target: {\n scheme: 'dns',\n path: proxyInfo.address,\n },\n extraOptions: extraOptions,\n };\n}\nexports.mapProxyName = mapProxyName;\nfunction getProxiedConnection(address, channelOptions, connectionOptions) {\n var _a;\n if (!('grpc.http_connect_target' in channelOptions)) {\n return Promise.resolve({});\n }\n const realTarget = channelOptions['grpc.http_connect_target'];\n const parsedTarget = (0, uri_parser_1.parseUri)(realTarget);\n if (parsedTarget === null) {\n return Promise.resolve({});\n }\n const splitHostPost = (0, uri_parser_1.splitHostPort)(parsedTarget.path);\n if (splitHostPost === null) {\n return Promise.resolve({});\n }\n const hostPort = `${splitHostPost.host}:${(_a = splitHostPost.port) !== null && _a !== void 0 ? _a : resolver_dns_1.DEFAULT_PORT}`;\n const options = {\n method: 'CONNECT',\n path: hostPort,\n };\n const headers = {\n Host: hostPort,\n };\n // Connect to the subchannel address as a proxy\n if ((0, subchannel_address_1.isTcpSubchannelAddress)(address)) {\n options.host = address.host;\n options.port = address.port;\n }\n else {\n options.socketPath = address.path;\n }\n if ('grpc.http_connect_creds' in channelOptions) {\n headers['Proxy-Authorization'] =\n 'Basic ' +\n Buffer.from(channelOptions['grpc.http_connect_creds']).toString('base64');\n }\n options.headers = headers;\n const proxyAddressString = (0, subchannel_address_1.subchannelAddressToString)(address);\n trace('Using proxy ' + proxyAddressString + ' to connect to ' + options.path);\n return new Promise((resolve, reject) => {\n const request = http.request(options);\n request.once('connect', (res, socket, head) => {\n var _a;\n request.removeAllListeners();\n socket.removeAllListeners();\n if (res.statusCode === 200) {\n trace('Successfully connected to ' +\n options.path +\n ' through proxy ' +\n proxyAddressString);\n if ('secureContext' in connectionOptions) {\n /* The proxy is connecting to a TLS server, so upgrade this socket\n * connection to a TLS connection.\n * This is a workaround for https://github.com/nodejs/node/issues/32922\n * See https://github.com/grpc/grpc-node/pull/1369 for more info. */\n const targetPath = (0, resolver_1.getDefaultAuthority)(parsedTarget);\n const hostPort = (0, uri_parser_1.splitHostPort)(targetPath);\n const remoteHost = (_a = hostPort === null || hostPort === void 0 ? void 0 : hostPort.host) !== null && _a !== void 0 ? _a : targetPath;\n const cts = tls.connect(Object.assign({ host: remoteHost, servername: remoteHost, socket: socket }, connectionOptions), () => {\n trace('Successfully established a TLS connection to ' +\n options.path +\n ' through proxy ' +\n proxyAddressString);\n resolve({ socket: cts, realTarget: parsedTarget });\n });\n cts.on('error', (error) => {\n trace('Failed to establish a TLS connection to ' +\n options.path +\n ' through proxy ' +\n proxyAddressString +\n ' with error ' +\n error.message);\n reject();\n });\n }\n else {\n trace('Successfully established a plaintext connection to ' +\n options.path +\n ' through proxy ' +\n proxyAddressString);\n resolve({\n socket,\n realTarget: parsedTarget,\n });\n }\n }\n else {\n (0, logging_1.log)(constants_1.LogVerbosity.ERROR, 'Failed to connect to ' +\n options.path +\n ' through proxy ' +\n proxyAddressString +\n ' with status ' +\n res.statusCode);\n reject();\n }\n });\n request.once('error', err => {\n request.removeAllListeners();\n (0, logging_1.log)(constants_1.LogVerbosity.ERROR, 'Failed to connect to proxy ' +\n proxyAddressString +\n ' with error ' +\n err.message);\n reject();\n });\n request.end();\n });\n}\nexports.getProxiedConnection = getProxiedConnection;\n//# sourceMappingURL=http_proxy.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.experimental = exports.ServerInterceptingCall = exports.ResponderBuilder = exports.ServerListenerBuilder = exports.addAdminServicesToServer = exports.getChannelzHandlers = exports.getChannelzServiceDefinition = exports.InterceptorConfigurationError = exports.InterceptingCall = exports.RequesterBuilder = exports.ListenerBuilder = exports.StatusBuilder = exports.getClientChannel = exports.ServerCredentials = exports.Server = exports.setLogVerbosity = exports.setLogger = exports.load = exports.loadObject = exports.CallCredentials = exports.ChannelCredentials = exports.waitForClientReady = exports.closeClient = exports.Channel = exports.makeGenericClientConstructor = exports.makeClientConstructor = exports.loadPackageDefinition = exports.Client = exports.compressionAlgorithms = exports.propagate = exports.connectivityState = exports.status = exports.logVerbosity = exports.Metadata = exports.credentials = void 0;\nconst call_credentials_1 = require(\"./call-credentials\");\nObject.defineProperty(exports, \"CallCredentials\", { enumerable: true, get: function () { return call_credentials_1.CallCredentials; } });\nconst channel_1 = require(\"./channel\");\nObject.defineProperty(exports, \"Channel\", { enumerable: true, get: function () { return channel_1.ChannelImplementation; } });\nconst compression_algorithms_1 = require(\"./compression-algorithms\");\nObject.defineProperty(exports, \"compressionAlgorithms\", { enumerable: true, get: function () { return compression_algorithms_1.CompressionAlgorithms; } });\nconst connectivity_state_1 = require(\"./connectivity-state\");\nObject.defineProperty(exports, \"connectivityState\", { enumerable: true, get: function () { return connectivity_state_1.ConnectivityState; } });\nconst channel_credentials_1 = require(\"./channel-credentials\");\nObject.defineProperty(exports, \"ChannelCredentials\", { enumerable: true, get: function () { return channel_credentials_1.ChannelCredentials; } });\nconst client_1 = require(\"./client\");\nObject.defineProperty(exports, \"Client\", { enumerable: true, get: function () { return client_1.Client; } });\nconst constants_1 = require(\"./constants\");\nObject.defineProperty(exports, \"logVerbosity\", { enumerable: true, get: function () { return constants_1.LogVerbosity; } });\nObject.defineProperty(exports, \"status\", { enumerable: true, get: function () { return constants_1.Status; } });\nObject.defineProperty(exports, \"propagate\", { enumerable: true, get: function () { return constants_1.Propagate; } });\nconst logging = require(\"./logging\");\nconst make_client_1 = require(\"./make-client\");\nObject.defineProperty(exports, \"loadPackageDefinition\", { enumerable: true, get: function () { return make_client_1.loadPackageDefinition; } });\nObject.defineProperty(exports, \"makeClientConstructor\", { enumerable: true, get: function () { return make_client_1.makeClientConstructor; } });\nObject.defineProperty(exports, \"makeGenericClientConstructor\", { enumerable: true, get: function () { return make_client_1.makeClientConstructor; } });\nconst metadata_1 = require(\"./metadata\");\nObject.defineProperty(exports, \"Metadata\", { enumerable: true, get: function () { return metadata_1.Metadata; } });\nconst server_1 = require(\"./server\");\nObject.defineProperty(exports, \"Server\", { enumerable: true, get: function () { return server_1.Server; } });\nconst server_credentials_1 = require(\"./server-credentials\");\nObject.defineProperty(exports, \"ServerCredentials\", { enumerable: true, get: function () { return server_credentials_1.ServerCredentials; } });\nconst status_builder_1 = require(\"./status-builder\");\nObject.defineProperty(exports, \"StatusBuilder\", { enumerable: true, get: function () { return status_builder_1.StatusBuilder; } });\n/**** Client Credentials ****/\n// Using assign only copies enumerable properties, which is what we want\nexports.credentials = {\n /**\n * Combine a ChannelCredentials with any number of CallCredentials into a\n * single ChannelCredentials object.\n * @param channelCredentials The ChannelCredentials object.\n * @param callCredentials Any number of CallCredentials objects.\n * @return The resulting ChannelCredentials object.\n */\n combineChannelCredentials: (channelCredentials, ...callCredentials) => {\n return callCredentials.reduce((acc, other) => acc.compose(other), channelCredentials);\n },\n /**\n * Combine any number of CallCredentials into a single CallCredentials\n * object.\n * @param first The first CallCredentials object.\n * @param additional Any number of additional CallCredentials objects.\n * @return The resulting CallCredentials object.\n */\n combineCallCredentials: (first, ...additional) => {\n return additional.reduce((acc, other) => acc.compose(other), first);\n },\n // from channel-credentials.ts\n createInsecure: channel_credentials_1.ChannelCredentials.createInsecure,\n createSsl: channel_credentials_1.ChannelCredentials.createSsl,\n createFromSecureContext: channel_credentials_1.ChannelCredentials.createFromSecureContext,\n // from call-credentials.ts\n createFromMetadataGenerator: call_credentials_1.CallCredentials.createFromMetadataGenerator,\n createFromGoogleCredential: call_credentials_1.CallCredentials.createFromGoogleCredential,\n createEmpty: call_credentials_1.CallCredentials.createEmpty,\n};\n/**\n * Close a Client object.\n * @param client The client to close.\n */\nconst closeClient = (client) => client.close();\nexports.closeClient = closeClient;\nconst waitForClientReady = (client, deadline, callback) => client.waitForReady(deadline, callback);\nexports.waitForClientReady = waitForClientReady;\n/* eslint-enable @typescript-eslint/no-explicit-any */\n/**** Unimplemented function stubs ****/\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst loadObject = (value, options) => {\n throw new Error('Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead');\n};\nexports.loadObject = loadObject;\nconst load = (filename, format, options) => {\n throw new Error('Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead');\n};\nexports.load = load;\nconst setLogger = (logger) => {\n logging.setLogger(logger);\n};\nexports.setLogger = setLogger;\nconst setLogVerbosity = (verbosity) => {\n logging.setLoggerVerbosity(verbosity);\n};\nexports.setLogVerbosity = setLogVerbosity;\nconst getClientChannel = (client) => {\n return client_1.Client.prototype.getChannel.call(client);\n};\nexports.getClientChannel = getClientChannel;\nvar client_interceptors_1 = require(\"./client-interceptors\");\nObject.defineProperty(exports, \"ListenerBuilder\", { enumerable: true, get: function () { return client_interceptors_1.ListenerBuilder; } });\nObject.defineProperty(exports, \"RequesterBuilder\", { enumerable: true, get: function () { return client_interceptors_1.RequesterBuilder; } });\nObject.defineProperty(exports, \"InterceptingCall\", { enumerable: true, get: function () { return client_interceptors_1.InterceptingCall; } });\nObject.defineProperty(exports, \"InterceptorConfigurationError\", { enumerable: true, get: function () { return client_interceptors_1.InterceptorConfigurationError; } });\nvar channelz_1 = require(\"./channelz\");\nObject.defineProperty(exports, \"getChannelzServiceDefinition\", { enumerable: true, get: function () { return channelz_1.getChannelzServiceDefinition; } });\nObject.defineProperty(exports, \"getChannelzHandlers\", { enumerable: true, get: function () { return channelz_1.getChannelzHandlers; } });\nvar admin_1 = require(\"./admin\");\nObject.defineProperty(exports, \"addAdminServicesToServer\", { enumerable: true, get: function () { return admin_1.addAdminServicesToServer; } });\nvar server_interceptors_1 = require(\"./server-interceptors\");\nObject.defineProperty(exports, \"ServerListenerBuilder\", { enumerable: true, get: function () { return server_interceptors_1.ServerListenerBuilder; } });\nObject.defineProperty(exports, \"ResponderBuilder\", { enumerable: true, get: function () { return server_interceptors_1.ResponderBuilder; } });\nObject.defineProperty(exports, \"ServerInterceptingCall\", { enumerable: true, get: function () { return server_interceptors_1.ServerInterceptingCall; } });\nconst experimental = require(\"./experimental\");\nexports.experimental = experimental;\nconst resolver_dns = require(\"./resolver-dns\");\nconst resolver_uds = require(\"./resolver-uds\");\nconst resolver_ip = require(\"./resolver-ip\");\nconst load_balancer_pick_first = require(\"./load-balancer-pick-first\");\nconst load_balancer_round_robin = require(\"./load-balancer-round-robin\");\nconst load_balancer_outlier_detection = require(\"./load-balancer-outlier-detection\");\nconst channelz = require(\"./channelz\");\n(() => {\n resolver_dns.setup();\n resolver_uds.setup();\n resolver_ip.setup();\n load_balancer_pick_first.setup();\n load_balancer_round_robin.setup();\n load_balancer_outlier_detection.setup();\n channelz.setup();\n})();\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InternalChannel = void 0;\nconst channel_credentials_1 = require(\"./channel-credentials\");\nconst resolving_load_balancer_1 = require(\"./resolving-load-balancer\");\nconst subchannel_pool_1 = require(\"./subchannel-pool\");\nconst picker_1 = require(\"./picker\");\nconst constants_1 = require(\"./constants\");\nconst filter_stack_1 = require(\"./filter-stack\");\nconst compression_filter_1 = require(\"./compression-filter\");\nconst resolver_1 = require(\"./resolver\");\nconst logging_1 = require(\"./logging\");\nconst max_message_size_filter_1 = require(\"./max-message-size-filter\");\nconst http_proxy_1 = require(\"./http_proxy\");\nconst uri_parser_1 = require(\"./uri-parser\");\nconst connectivity_state_1 = require(\"./connectivity-state\");\nconst channelz_1 = require(\"./channelz\");\nconst load_balancing_call_1 = require(\"./load-balancing-call\");\nconst deadline_1 = require(\"./deadline\");\nconst resolving_call_1 = require(\"./resolving-call\");\nconst call_number_1 = require(\"./call-number\");\nconst control_plane_status_1 = require(\"./control-plane-status\");\nconst retrying_call_1 = require(\"./retrying-call\");\nconst subchannel_interface_1 = require(\"./subchannel-interface\");\n/**\n * See https://nodejs.org/api/timers.html#timers_setinterval_callback_delay_args\n */\nconst MAX_TIMEOUT_TIME = 2147483647;\nconst MIN_IDLE_TIMEOUT_MS = 1000;\n// 30 minutes\nconst DEFAULT_IDLE_TIMEOUT_MS = 30 * 60 * 1000;\nconst RETRY_THROTTLER_MAP = new Map();\nconst DEFAULT_RETRY_BUFFER_SIZE_BYTES = 1 << 24; // 16 MB\nconst DEFAULT_PER_RPC_RETRY_BUFFER_SIZE_BYTES = 1 << 20; // 1 MB\nclass ChannelSubchannelWrapper extends subchannel_interface_1.BaseSubchannelWrapper {\n constructor(childSubchannel, channel) {\n super(childSubchannel);\n this.channel = channel;\n this.refCount = 0;\n this.subchannelStateListener = (subchannel, previousState, newState, keepaliveTime) => {\n channel.throttleKeepalive(keepaliveTime);\n };\n childSubchannel.addConnectivityStateListener(this.subchannelStateListener);\n }\n ref() {\n this.child.ref();\n this.refCount += 1;\n }\n unref() {\n this.child.unref();\n this.refCount -= 1;\n if (this.refCount <= 0) {\n this.child.removeConnectivityStateListener(this.subchannelStateListener);\n this.channel.removeWrappedSubchannel(this);\n }\n }\n}\nclass InternalChannel {\n constructor(target, credentials, options) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n this.credentials = credentials;\n this.options = options;\n this.connectivityState = connectivity_state_1.ConnectivityState.IDLE;\n this.currentPicker = new picker_1.UnavailablePicker();\n /**\n * Calls queued up to get a call config. Should only be populated before the\n * first time the resolver returns a result, which includes the ConfigSelector.\n */\n this.configSelectionQueue = [];\n this.pickQueue = [];\n this.connectivityStateWatchers = [];\n this.configSelector = null;\n /**\n * This is the error from the name resolver if it failed most recently. It\n * is only used to end calls that start while there is no config selector\n * and the name resolver is in backoff, so it should be nulled if\n * configSelector becomes set or the channel state becomes anything other\n * than TRANSIENT_FAILURE.\n */\n this.currentResolutionError = null;\n this.wrappedSubchannels = new Set();\n this.callCount = 0;\n this.idleTimer = null;\n // Channelz info\n this.channelzEnabled = true;\n this.callTracker = new channelz_1.ChannelzCallTracker();\n this.childrenTracker = new channelz_1.ChannelzChildrenTracker();\n /**\n * Randomly generated ID to be passed to the config selector, for use by\n * ring_hash in xDS. An integer distributed approximately uniformly between\n * 0 and MAX_SAFE_INTEGER.\n */\n this.randomChannelId = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER);\n if (typeof target !== 'string') {\n throw new TypeError('Channel target must be a string');\n }\n if (!(credentials instanceof channel_credentials_1.ChannelCredentials)) {\n throw new TypeError('Channel credentials must be a ChannelCredentials object');\n }\n if (options) {\n if (typeof options !== 'object') {\n throw new TypeError('Channel options must be an object');\n }\n }\n this.originalTarget = target;\n const originalTargetUri = (0, uri_parser_1.parseUri)(target);\n if (originalTargetUri === null) {\n throw new Error(`Could not parse target name \"${target}\"`);\n }\n /* This ensures that the target has a scheme that is registered with the\n * resolver */\n const defaultSchemeMapResult = (0, resolver_1.mapUriDefaultScheme)(originalTargetUri);\n if (defaultSchemeMapResult === null) {\n throw new Error(`Could not find a default scheme for target name \"${target}\"`);\n }\n this.callRefTimer = setInterval(() => { }, MAX_TIMEOUT_TIME);\n (_b = (_a = this.callRefTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n if (this.options['grpc.enable_channelz'] === 0) {\n this.channelzEnabled = false;\n }\n this.channelzTrace = new channelz_1.ChannelzTrace();\n this.channelzRef = (0, channelz_1.registerChannelzChannel)(target, () => this.getChannelzInfo(), this.channelzEnabled);\n if (this.channelzEnabled) {\n this.channelzTrace.addTrace('CT_INFO', 'Channel created');\n }\n if (this.options['grpc.default_authority']) {\n this.defaultAuthority = this.options['grpc.default_authority'];\n }\n else {\n this.defaultAuthority = (0, resolver_1.getDefaultAuthority)(defaultSchemeMapResult);\n }\n const proxyMapResult = (0, http_proxy_1.mapProxyName)(defaultSchemeMapResult, options);\n this.target = proxyMapResult.target;\n this.options = Object.assign({}, this.options, proxyMapResult.extraOptions);\n /* The global boolean parameter to getSubchannelPool has the inverse meaning to what\n * the grpc.use_local_subchannel_pool channel option means. */\n this.subchannelPool = (0, subchannel_pool_1.getSubchannelPool)(((_c = options['grpc.use_local_subchannel_pool']) !== null && _c !== void 0 ? _c : 0) === 0);\n this.retryBufferTracker = new retrying_call_1.MessageBufferTracker((_d = options['grpc.retry_buffer_size']) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_BUFFER_SIZE_BYTES, (_e = options['grpc.per_rpc_retry_buffer_size']) !== null && _e !== void 0 ? _e : DEFAULT_PER_RPC_RETRY_BUFFER_SIZE_BYTES);\n this.keepaliveTime = (_f = options['grpc.keepalive_time_ms']) !== null && _f !== void 0 ? _f : -1;\n this.idleTimeoutMs = Math.max((_g = options['grpc.client_idle_timeout_ms']) !== null && _g !== void 0 ? _g : DEFAULT_IDLE_TIMEOUT_MS, MIN_IDLE_TIMEOUT_MS);\n const channelControlHelper = {\n createSubchannel: (subchannelAddress, subchannelArgs) => {\n const subchannel = this.subchannelPool.getOrCreateSubchannel(this.target, subchannelAddress, Object.assign({}, this.options, subchannelArgs), this.credentials);\n subchannel.throttleKeepalive(this.keepaliveTime);\n if (this.channelzEnabled) {\n this.channelzTrace.addTrace('CT_INFO', 'Created subchannel or used existing subchannel', subchannel.getChannelzRef());\n }\n const wrappedSubchannel = new ChannelSubchannelWrapper(subchannel, this);\n this.wrappedSubchannels.add(wrappedSubchannel);\n return wrappedSubchannel;\n },\n updateState: (connectivityState, picker) => {\n this.currentPicker = picker;\n const queueCopy = this.pickQueue.slice();\n this.pickQueue = [];\n if (queueCopy.length > 0) {\n this.callRefTimerUnref();\n }\n for (const call of queueCopy) {\n call.doPick();\n }\n this.updateState(connectivityState);\n },\n requestReresolution: () => {\n // This should never be called.\n throw new Error('Resolving load balancer should never call requestReresolution');\n },\n addChannelzChild: (child) => {\n if (this.channelzEnabled) {\n this.childrenTracker.refChild(child);\n }\n },\n removeChannelzChild: (child) => {\n if (this.channelzEnabled) {\n this.childrenTracker.unrefChild(child);\n }\n },\n };\n this.resolvingLoadBalancer = new resolving_load_balancer_1.ResolvingLoadBalancer(this.target, channelControlHelper, options, (serviceConfig, configSelector) => {\n if (serviceConfig.retryThrottling) {\n RETRY_THROTTLER_MAP.set(this.getTarget(), new retrying_call_1.RetryThrottler(serviceConfig.retryThrottling.maxTokens, serviceConfig.retryThrottling.tokenRatio, RETRY_THROTTLER_MAP.get(this.getTarget())));\n }\n else {\n RETRY_THROTTLER_MAP.delete(this.getTarget());\n }\n if (this.channelzEnabled) {\n this.channelzTrace.addTrace('CT_INFO', 'Address resolution succeeded');\n }\n this.configSelector = configSelector;\n this.currentResolutionError = null;\n /* We process the queue asynchronously to ensure that the corresponding\n * load balancer update has completed. */\n process.nextTick(() => {\n const localQueue = this.configSelectionQueue;\n this.configSelectionQueue = [];\n if (localQueue.length > 0) {\n this.callRefTimerUnref();\n }\n for (const call of localQueue) {\n call.getConfig();\n }\n });\n }, status => {\n if (this.channelzEnabled) {\n this.channelzTrace.addTrace('CT_WARNING', 'Address resolution failed with code ' +\n status.code +\n ' and details \"' +\n status.details +\n '\"');\n }\n if (this.configSelectionQueue.length > 0) {\n this.trace('Name resolution failed with calls queued for config selection');\n }\n if (this.configSelector === null) {\n this.currentResolutionError = Object.assign(Object.assign({}, (0, control_plane_status_1.restrictControlPlaneStatusCode)(status.code, status.details)), { metadata: status.metadata });\n }\n const localQueue = this.configSelectionQueue;\n this.configSelectionQueue = [];\n if (localQueue.length > 0) {\n this.callRefTimerUnref();\n }\n for (const call of localQueue) {\n call.reportResolverError(status);\n }\n });\n this.filterStackFactory = new filter_stack_1.FilterStackFactory([\n new max_message_size_filter_1.MaxMessageSizeFilterFactory(this.options),\n new compression_filter_1.CompressionFilterFactory(this, this.options),\n ]);\n this.trace('Channel constructed with options ' +\n JSON.stringify(options, undefined, 2));\n const error = new Error();\n (0, logging_1.trace)(constants_1.LogVerbosity.DEBUG, 'channel_stacktrace', '(' +\n this.channelzRef.id +\n ') ' +\n 'Channel constructed \\n' +\n ((_h = error.stack) === null || _h === void 0 ? void 0 : _h.substring(error.stack.indexOf('\\n') + 1)));\n this.lastActivityTimestamp = new Date();\n }\n getChannelzInfo() {\n return {\n target: this.originalTarget,\n state: this.connectivityState,\n trace: this.channelzTrace,\n callTracker: this.callTracker,\n children: this.childrenTracker.getChildLists(),\n };\n }\n trace(text, verbosityOverride) {\n (0, logging_1.trace)(verbosityOverride !== null && verbosityOverride !== void 0 ? verbosityOverride : constants_1.LogVerbosity.DEBUG, 'channel', '(' + this.channelzRef.id + ') ' + (0, uri_parser_1.uriToString)(this.target) + ' ' + text);\n }\n callRefTimerRef() {\n var _a, _b, _c, _d;\n // If the hasRef function does not exist, always run the code\n if (!((_b = (_a = this.callRefTimer).hasRef) === null || _b === void 0 ? void 0 : _b.call(_a))) {\n this.trace('callRefTimer.ref | configSelectionQueue.length=' +\n this.configSelectionQueue.length +\n ' pickQueue.length=' +\n this.pickQueue.length);\n (_d = (_c = this.callRefTimer).ref) === null || _d === void 0 ? void 0 : _d.call(_c);\n }\n }\n callRefTimerUnref() {\n var _a, _b;\n // If the hasRef function does not exist, always run the code\n if (!this.callRefTimer.hasRef || this.callRefTimer.hasRef()) {\n this.trace('callRefTimer.unref | configSelectionQueue.length=' +\n this.configSelectionQueue.length +\n ' pickQueue.length=' +\n this.pickQueue.length);\n (_b = (_a = this.callRefTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n }\n removeConnectivityStateWatcher(watcherObject) {\n const watcherIndex = this.connectivityStateWatchers.findIndex(value => value === watcherObject);\n if (watcherIndex >= 0) {\n this.connectivityStateWatchers.splice(watcherIndex, 1);\n }\n }\n updateState(newState) {\n (0, logging_1.trace)(constants_1.LogVerbosity.DEBUG, 'connectivity_state', '(' +\n this.channelzRef.id +\n ') ' +\n (0, uri_parser_1.uriToString)(this.target) +\n ' ' +\n connectivity_state_1.ConnectivityState[this.connectivityState] +\n ' -> ' +\n connectivity_state_1.ConnectivityState[newState]);\n if (this.channelzEnabled) {\n this.channelzTrace.addTrace('CT_INFO', 'Connectivity state change to ' + connectivity_state_1.ConnectivityState[newState]);\n }\n this.connectivityState = newState;\n const watchersCopy = this.connectivityStateWatchers.slice();\n for (const watcherObject of watchersCopy) {\n if (newState !== watcherObject.currentState) {\n if (watcherObject.timer) {\n clearTimeout(watcherObject.timer);\n }\n this.removeConnectivityStateWatcher(watcherObject);\n watcherObject.callback();\n }\n }\n if (newState !== connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) {\n this.currentResolutionError = null;\n }\n }\n throttleKeepalive(newKeepaliveTime) {\n if (newKeepaliveTime > this.keepaliveTime) {\n this.keepaliveTime = newKeepaliveTime;\n for (const wrappedSubchannel of this.wrappedSubchannels) {\n wrappedSubchannel.throttleKeepalive(newKeepaliveTime);\n }\n }\n }\n removeWrappedSubchannel(wrappedSubchannel) {\n this.wrappedSubchannels.delete(wrappedSubchannel);\n }\n doPick(metadata, extraPickInfo) {\n return this.currentPicker.pick({\n metadata: metadata,\n extraPickInfo: extraPickInfo,\n });\n }\n queueCallForPick(call) {\n this.pickQueue.push(call);\n this.callRefTimerRef();\n }\n getConfig(method, metadata) {\n this.resolvingLoadBalancer.exitIdle();\n if (this.configSelector) {\n return {\n type: 'SUCCESS',\n config: this.configSelector(method, metadata, this.randomChannelId),\n };\n }\n else {\n if (this.currentResolutionError) {\n return {\n type: 'ERROR',\n error: this.currentResolutionError,\n };\n }\n else {\n return {\n type: 'NONE',\n };\n }\n }\n }\n queueCallForConfig(call) {\n this.configSelectionQueue.push(call);\n this.callRefTimerRef();\n }\n enterIdle() {\n this.resolvingLoadBalancer.destroy();\n this.updateState(connectivity_state_1.ConnectivityState.IDLE);\n this.currentPicker = new picker_1.QueuePicker(this.resolvingLoadBalancer);\n if (this.idleTimer) {\n clearTimeout(this.idleTimer);\n this.idleTimer = null;\n }\n }\n startIdleTimeout(timeoutMs) {\n var _a, _b;\n this.idleTimer = setTimeout(() => {\n if (this.callCount > 0) {\n /* If there is currently a call, the channel will not go idle for a\n * period of at least idleTimeoutMs, so check again after that time.\n */\n this.startIdleTimeout(this.idleTimeoutMs);\n return;\n }\n const now = new Date();\n const timeSinceLastActivity = now.valueOf() - this.lastActivityTimestamp.valueOf();\n if (timeSinceLastActivity >= this.idleTimeoutMs) {\n this.trace('Idle timer triggered after ' +\n this.idleTimeoutMs +\n 'ms of inactivity');\n this.enterIdle();\n }\n else {\n /* Whenever the timer fires with the latest activity being too recent,\n * set the timer again for the time when the time since the last\n * activity is equal to the timeout. This should result in the timer\n * firing no more than once every idleTimeoutMs/2 on average. */\n this.startIdleTimeout(this.idleTimeoutMs - timeSinceLastActivity);\n }\n }, timeoutMs);\n (_b = (_a = this.idleTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n maybeStartIdleTimer() {\n if (this.connectivityState !== connectivity_state_1.ConnectivityState.SHUTDOWN &&\n !this.idleTimer) {\n this.startIdleTimeout(this.idleTimeoutMs);\n }\n }\n onCallStart() {\n if (this.channelzEnabled) {\n this.callTracker.addCallStarted();\n }\n this.callCount += 1;\n }\n onCallEnd(status) {\n if (this.channelzEnabled) {\n if (status.code === constants_1.Status.OK) {\n this.callTracker.addCallSucceeded();\n }\n else {\n this.callTracker.addCallFailed();\n }\n }\n this.callCount -= 1;\n this.lastActivityTimestamp = new Date();\n this.maybeStartIdleTimer();\n }\n createLoadBalancingCall(callConfig, method, host, credentials, deadline) {\n const callNumber = (0, call_number_1.getNextCallNumber)();\n this.trace('createLoadBalancingCall [' + callNumber + '] method=\"' + method + '\"');\n return new load_balancing_call_1.LoadBalancingCall(this, callConfig, method, host, credentials, deadline, callNumber);\n }\n createRetryingCall(callConfig, method, host, credentials, deadline) {\n const callNumber = (0, call_number_1.getNextCallNumber)();\n this.trace('createRetryingCall [' + callNumber + '] method=\"' + method + '\"');\n return new retrying_call_1.RetryingCall(this, callConfig, method, host, credentials, deadline, callNumber, this.retryBufferTracker, RETRY_THROTTLER_MAP.get(this.getTarget()));\n }\n createInnerCall(callConfig, method, host, credentials, deadline) {\n // Create a RetryingCall if retries are enabled\n if (this.options['grpc.enable_retries'] === 0) {\n return this.createLoadBalancingCall(callConfig, method, host, credentials, deadline);\n }\n else {\n return this.createRetryingCall(callConfig, method, host, credentials, deadline);\n }\n }\n createResolvingCall(method, deadline, host, parentCall, propagateFlags) {\n const callNumber = (0, call_number_1.getNextCallNumber)();\n this.trace('createResolvingCall [' +\n callNumber +\n '] method=\"' +\n method +\n '\", deadline=' +\n (0, deadline_1.deadlineToString)(deadline));\n const finalOptions = {\n deadline: deadline,\n flags: propagateFlags !== null && propagateFlags !== void 0 ? propagateFlags : constants_1.Propagate.DEFAULTS,\n host: host !== null && host !== void 0 ? host : this.defaultAuthority,\n parentCall: parentCall,\n };\n const call = new resolving_call_1.ResolvingCall(this, method, finalOptions, this.filterStackFactory.clone(), this.credentials._getCallCredentials(), callNumber);\n this.onCallStart();\n call.addStatusWatcher(status => {\n this.onCallEnd(status);\n });\n return call;\n }\n close() {\n this.resolvingLoadBalancer.destroy();\n this.updateState(connectivity_state_1.ConnectivityState.SHUTDOWN);\n clearInterval(this.callRefTimer);\n if (this.idleTimer) {\n clearTimeout(this.idleTimer);\n }\n if (this.channelzEnabled) {\n (0, channelz_1.unregisterChannelzRef)(this.channelzRef);\n }\n this.subchannelPool.unrefUnusedSubchannels();\n }\n getTarget() {\n return (0, uri_parser_1.uriToString)(this.target);\n }\n getConnectivityState(tryToConnect) {\n const connectivityState = this.connectivityState;\n if (tryToConnect) {\n this.resolvingLoadBalancer.exitIdle();\n this.lastActivityTimestamp = new Date();\n this.maybeStartIdleTimer();\n }\n return connectivityState;\n }\n watchConnectivityState(currentState, deadline, callback) {\n if (this.connectivityState === connectivity_state_1.ConnectivityState.SHUTDOWN) {\n throw new Error('Channel has been shut down');\n }\n let timer = null;\n if (deadline !== Infinity) {\n const deadlineDate = deadline instanceof Date ? deadline : new Date(deadline);\n const now = new Date();\n if (deadline === -Infinity || deadlineDate <= now) {\n process.nextTick(callback, new Error('Deadline passed without connectivity state change'));\n return;\n }\n timer = setTimeout(() => {\n this.removeConnectivityStateWatcher(watcherObject);\n callback(new Error('Deadline passed without connectivity state change'));\n }, deadlineDate.getTime() - now.getTime());\n }\n const watcherObject = {\n currentState,\n callback,\n timer,\n };\n this.connectivityStateWatchers.push(watcherObject);\n }\n /**\n * Get the channelz reference object for this channel. The returned value is\n * garbage if channelz is disabled for this channel.\n * @returns\n */\n getChannelzRef() {\n return this.channelzRef;\n }\n createCall(method, deadline, host, parentCall, propagateFlags) {\n if (typeof method !== 'string') {\n throw new TypeError('Channel#createCall: method must be a string');\n }\n if (!(typeof deadline === 'number' || deadline instanceof Date)) {\n throw new TypeError('Channel#createCall: deadline must be a number or Date');\n }\n if (this.connectivityState === connectivity_state_1.ConnectivityState.SHUTDOWN) {\n throw new Error('Channel has been shut down');\n }\n return this.createResolvingCall(method, deadline, host, parentCall, propagateFlags);\n }\n}\nexports.InternalChannel = InternalChannel;\n//# sourceMappingURL=internal-channel.js.map","\"use strict\";\n/*\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChildLoadBalancerHandler = void 0;\nconst load_balancer_1 = require(\"./load-balancer\");\nconst connectivity_state_1 = require(\"./connectivity-state\");\nconst TYPE_NAME = 'child_load_balancer_helper';\nclass ChildLoadBalancerHandler {\n constructor(channelControlHelper, options) {\n this.channelControlHelper = channelControlHelper;\n this.options = options;\n this.currentChild = null;\n this.pendingChild = null;\n this.latestConfig = null;\n this.ChildPolicyHelper = class {\n constructor(parent) {\n this.parent = parent;\n this.child = null;\n }\n createSubchannel(subchannelAddress, subchannelArgs) {\n return this.parent.channelControlHelper.createSubchannel(subchannelAddress, subchannelArgs);\n }\n updateState(connectivityState, picker) {\n var _a;\n if (this.calledByPendingChild()) {\n if (connectivityState === connectivity_state_1.ConnectivityState.CONNECTING) {\n return;\n }\n (_a = this.parent.currentChild) === null || _a === void 0 ? void 0 : _a.destroy();\n this.parent.currentChild = this.parent.pendingChild;\n this.parent.pendingChild = null;\n }\n else if (!this.calledByCurrentChild()) {\n return;\n }\n this.parent.channelControlHelper.updateState(connectivityState, picker);\n }\n requestReresolution() {\n var _a;\n const latestChild = (_a = this.parent.pendingChild) !== null && _a !== void 0 ? _a : this.parent.currentChild;\n if (this.child === latestChild) {\n this.parent.channelControlHelper.requestReresolution();\n }\n }\n setChild(newChild) {\n this.child = newChild;\n }\n addChannelzChild(child) {\n this.parent.channelControlHelper.addChannelzChild(child);\n }\n removeChannelzChild(child) {\n this.parent.channelControlHelper.removeChannelzChild(child);\n }\n calledByPendingChild() {\n return this.child === this.parent.pendingChild;\n }\n calledByCurrentChild() {\n return this.child === this.parent.currentChild;\n }\n };\n }\n configUpdateRequiresNewPolicyInstance(oldConfig, newConfig) {\n return oldConfig.getLoadBalancerName() !== newConfig.getLoadBalancerName();\n }\n /**\n * Prerequisites: lbConfig !== null and lbConfig.name is registered\n * @param endpointList\n * @param lbConfig\n * @param attributes\n */\n updateAddressList(endpointList, lbConfig, attributes) {\n let childToUpdate;\n if (this.currentChild === null ||\n this.latestConfig === null ||\n this.configUpdateRequiresNewPolicyInstance(this.latestConfig, lbConfig)) {\n const newHelper = new this.ChildPolicyHelper(this);\n const newChild = (0, load_balancer_1.createLoadBalancer)(lbConfig, newHelper, this.options);\n newHelper.setChild(newChild);\n if (this.currentChild === null) {\n this.currentChild = newChild;\n childToUpdate = this.currentChild;\n }\n else {\n if (this.pendingChild) {\n this.pendingChild.destroy();\n }\n this.pendingChild = newChild;\n childToUpdate = this.pendingChild;\n }\n }\n else {\n if (this.pendingChild === null) {\n childToUpdate = this.currentChild;\n }\n else {\n childToUpdate = this.pendingChild;\n }\n }\n this.latestConfig = lbConfig;\n childToUpdate.updateAddressList(endpointList, lbConfig, attributes);\n }\n exitIdle() {\n if (this.currentChild) {\n this.currentChild.exitIdle();\n if (this.pendingChild) {\n this.pendingChild.exitIdle();\n }\n }\n }\n resetBackoff() {\n if (this.currentChild) {\n this.currentChild.resetBackoff();\n if (this.pendingChild) {\n this.pendingChild.resetBackoff();\n }\n }\n }\n destroy() {\n /* Note: state updates are only propagated from the child balancer if that\n * object is equal to this.currentChild or this.pendingChild. Since this\n * function sets both of those to null, no further state updates will\n * occur after this function returns. */\n if (this.currentChild) {\n this.currentChild.destroy();\n this.currentChild = null;\n }\n if (this.pendingChild) {\n this.pendingChild.destroy();\n this.pendingChild = null;\n }\n }\n getTypeName() {\n return TYPE_NAME;\n }\n}\nexports.ChildLoadBalancerHandler = ChildLoadBalancerHandler;\n//# sourceMappingURL=load-balancer-child-handler.js.map","\"use strict\";\n/*\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setup = exports.OutlierDetectionLoadBalancer = exports.OutlierDetectionLoadBalancingConfig = void 0;\nconst connectivity_state_1 = require(\"./connectivity-state\");\nconst constants_1 = require(\"./constants\");\nconst duration_1 = require(\"./duration\");\nconst experimental_1 = require(\"./experimental\");\nconst load_balancer_1 = require(\"./load-balancer\");\nconst load_balancer_child_handler_1 = require(\"./load-balancer-child-handler\");\nconst picker_1 = require(\"./picker\");\nconst subchannel_address_1 = require(\"./subchannel-address\");\nconst subchannel_interface_1 = require(\"./subchannel-interface\");\nconst logging = require(\"./logging\");\nconst TRACER_NAME = 'outlier_detection';\nfunction trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);\n}\nconst TYPE_NAME = 'outlier_detection';\nconst OUTLIER_DETECTION_ENABLED = ((_a = process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION) !== null && _a !== void 0 ? _a : 'true') === 'true';\nconst defaultSuccessRateEjectionConfig = {\n stdev_factor: 1900,\n enforcement_percentage: 100,\n minimum_hosts: 5,\n request_volume: 100,\n};\nconst defaultFailurePercentageEjectionConfig = {\n threshold: 85,\n enforcement_percentage: 100,\n minimum_hosts: 5,\n request_volume: 50,\n};\nfunction validateFieldType(obj, fieldName, expectedType, objectName) {\n if (fieldName in obj &&\n obj[fieldName] !== undefined &&\n typeof obj[fieldName] !== expectedType) {\n const fullFieldName = objectName ? `${objectName}.${fieldName}` : fieldName;\n throw new Error(`outlier detection config ${fullFieldName} parse error: expected ${expectedType}, got ${typeof obj[fieldName]}`);\n }\n}\nfunction validatePositiveDuration(obj, fieldName, objectName) {\n const fullFieldName = objectName ? `${objectName}.${fieldName}` : fieldName;\n if (fieldName in obj && obj[fieldName] !== undefined) {\n if (!(0, duration_1.isDuration)(obj[fieldName])) {\n throw new Error(`outlier detection config ${fullFieldName} parse error: expected Duration, got ${typeof obj[fieldName]}`);\n }\n if (!(obj[fieldName].seconds >= 0 &&\n obj[fieldName].seconds <= 315576000000 &&\n obj[fieldName].nanos >= 0 &&\n obj[fieldName].nanos <= 999999999)) {\n throw new Error(`outlier detection config ${fullFieldName} parse error: values out of range for non-negative Duaration`);\n }\n }\n}\nfunction validatePercentage(obj, fieldName, objectName) {\n const fullFieldName = objectName ? `${objectName}.${fieldName}` : fieldName;\n validateFieldType(obj, fieldName, 'number', objectName);\n if (fieldName in obj &&\n obj[fieldName] !== undefined &&\n !(obj[fieldName] >= 0 && obj[fieldName] <= 100)) {\n throw new Error(`outlier detection config ${fullFieldName} parse error: value out of range for percentage (0-100)`);\n }\n}\nclass OutlierDetectionLoadBalancingConfig {\n constructor(intervalMs, baseEjectionTimeMs, maxEjectionTimeMs, maxEjectionPercent, successRateEjection, failurePercentageEjection, childPolicy) {\n this.childPolicy = childPolicy;\n if (childPolicy.getLoadBalancerName() === 'pick_first') {\n throw new Error('outlier_detection LB policy cannot have a pick_first child policy');\n }\n this.intervalMs = intervalMs !== null && intervalMs !== void 0 ? intervalMs : 10000;\n this.baseEjectionTimeMs = baseEjectionTimeMs !== null && baseEjectionTimeMs !== void 0 ? baseEjectionTimeMs : 30000;\n this.maxEjectionTimeMs = maxEjectionTimeMs !== null && maxEjectionTimeMs !== void 0 ? maxEjectionTimeMs : 300000;\n this.maxEjectionPercent = maxEjectionPercent !== null && maxEjectionPercent !== void 0 ? maxEjectionPercent : 10;\n this.successRateEjection = successRateEjection\n ? Object.assign(Object.assign({}, defaultSuccessRateEjectionConfig), successRateEjection) : null;\n this.failurePercentageEjection = failurePercentageEjection\n ? Object.assign(Object.assign({}, defaultFailurePercentageEjectionConfig), failurePercentageEjection) : null;\n }\n getLoadBalancerName() {\n return TYPE_NAME;\n }\n toJsonObject() {\n var _a, _b;\n return {\n outlier_detection: {\n interval: (0, duration_1.msToDuration)(this.intervalMs),\n base_ejection_time: (0, duration_1.msToDuration)(this.baseEjectionTimeMs),\n max_ejection_time: (0, duration_1.msToDuration)(this.maxEjectionTimeMs),\n max_ejection_percent: this.maxEjectionPercent,\n success_rate_ejection: (_a = this.successRateEjection) !== null && _a !== void 0 ? _a : undefined,\n failure_percentage_ejection: (_b = this.failurePercentageEjection) !== null && _b !== void 0 ? _b : undefined,\n child_policy: [this.childPolicy.toJsonObject()],\n },\n };\n }\n getIntervalMs() {\n return this.intervalMs;\n }\n getBaseEjectionTimeMs() {\n return this.baseEjectionTimeMs;\n }\n getMaxEjectionTimeMs() {\n return this.maxEjectionTimeMs;\n }\n getMaxEjectionPercent() {\n return this.maxEjectionPercent;\n }\n getSuccessRateEjectionConfig() {\n return this.successRateEjection;\n }\n getFailurePercentageEjectionConfig() {\n return this.failurePercentageEjection;\n }\n getChildPolicy() {\n return this.childPolicy;\n }\n static createFromJson(obj) {\n var _a;\n validatePositiveDuration(obj, 'interval');\n validatePositiveDuration(obj, 'base_ejection_time');\n validatePositiveDuration(obj, 'max_ejection_time');\n validatePercentage(obj, 'max_ejection_percent');\n if ('success_rate_ejection' in obj &&\n obj.success_rate_ejection !== undefined) {\n if (typeof obj.success_rate_ejection !== 'object') {\n throw new Error('outlier detection config success_rate_ejection must be an object');\n }\n validateFieldType(obj.success_rate_ejection, 'stdev_factor', 'number', 'success_rate_ejection');\n validatePercentage(obj.success_rate_ejection, 'enforcement_percentage', 'success_rate_ejection');\n validateFieldType(obj.success_rate_ejection, 'minimum_hosts', 'number', 'success_rate_ejection');\n validateFieldType(obj.success_rate_ejection, 'request_volume', 'number', 'success_rate_ejection');\n }\n if ('failure_percentage_ejection' in obj &&\n obj.failure_percentage_ejection !== undefined) {\n if (typeof obj.failure_percentage_ejection !== 'object') {\n throw new Error('outlier detection config failure_percentage_ejection must be an object');\n }\n validatePercentage(obj.failure_percentage_ejection, 'threshold', 'failure_percentage_ejection');\n validatePercentage(obj.failure_percentage_ejection, 'enforcement_percentage', 'failure_percentage_ejection');\n validateFieldType(obj.failure_percentage_ejection, 'minimum_hosts', 'number', 'failure_percentage_ejection');\n validateFieldType(obj.failure_percentage_ejection, 'request_volume', 'number', 'failure_percentage_ejection');\n }\n if (!('child_policy' in obj) || !Array.isArray(obj.child_policy)) {\n throw new Error('outlier detection config child_policy must be an array');\n }\n const childPolicy = (0, load_balancer_1.selectLbConfigFromList)(obj.child_policy);\n if (!childPolicy) {\n throw new Error('outlier detection config child_policy: no valid recognized policy found');\n }\n return new OutlierDetectionLoadBalancingConfig(obj.interval ? (0, duration_1.durationToMs)(obj.interval) : null, obj.base_ejection_time ? (0, duration_1.durationToMs)(obj.base_ejection_time) : null, obj.max_ejection_time ? (0, duration_1.durationToMs)(obj.max_ejection_time) : null, (_a = obj.max_ejection_percent) !== null && _a !== void 0 ? _a : null, obj.success_rate_ejection, obj.failure_percentage_ejection, childPolicy);\n }\n}\nexports.OutlierDetectionLoadBalancingConfig = OutlierDetectionLoadBalancingConfig;\nclass OutlierDetectionSubchannelWrapper extends subchannel_interface_1.BaseSubchannelWrapper {\n constructor(childSubchannel, mapEntry) {\n super(childSubchannel);\n this.mapEntry = mapEntry;\n this.refCount = 0;\n }\n ref() {\n this.child.ref();\n this.refCount += 1;\n }\n unref() {\n this.child.unref();\n this.refCount -= 1;\n if (this.refCount <= 0) {\n if (this.mapEntry) {\n const index = this.mapEntry.subchannelWrappers.indexOf(this);\n if (index >= 0) {\n this.mapEntry.subchannelWrappers.splice(index, 1);\n }\n }\n }\n }\n eject() {\n this.setHealthy(false);\n }\n uneject() {\n this.setHealthy(true);\n }\n getMapEntry() {\n return this.mapEntry;\n }\n getWrappedSubchannel() {\n return this.child;\n }\n}\nfunction createEmptyBucket() {\n return {\n success: 0,\n failure: 0,\n };\n}\nclass CallCounter {\n constructor() {\n this.activeBucket = createEmptyBucket();\n this.inactiveBucket = createEmptyBucket();\n }\n addSuccess() {\n this.activeBucket.success += 1;\n }\n addFailure() {\n this.activeBucket.failure += 1;\n }\n switchBuckets() {\n this.inactiveBucket = this.activeBucket;\n this.activeBucket = createEmptyBucket();\n }\n getLastSuccesses() {\n return this.inactiveBucket.success;\n }\n getLastFailures() {\n return this.inactiveBucket.failure;\n }\n}\nclass OutlierDetectionPicker {\n constructor(wrappedPicker, countCalls) {\n this.wrappedPicker = wrappedPicker;\n this.countCalls = countCalls;\n }\n pick(pickArgs) {\n const wrappedPick = this.wrappedPicker.pick(pickArgs);\n if (wrappedPick.pickResultType === picker_1.PickResultType.COMPLETE) {\n const subchannelWrapper = wrappedPick.subchannel;\n const mapEntry = subchannelWrapper.getMapEntry();\n if (mapEntry) {\n let onCallEnded = wrappedPick.onCallEnded;\n if (this.countCalls) {\n onCallEnded = statusCode => {\n var _a;\n if (statusCode === constants_1.Status.OK) {\n mapEntry.counter.addSuccess();\n }\n else {\n mapEntry.counter.addFailure();\n }\n (_a = wrappedPick.onCallEnded) === null || _a === void 0 ? void 0 : _a.call(wrappedPick, statusCode);\n };\n }\n return Object.assign(Object.assign({}, wrappedPick), { subchannel: subchannelWrapper.getWrappedSubchannel(), onCallEnded: onCallEnded });\n }\n else {\n return Object.assign(Object.assign({}, wrappedPick), { subchannel: subchannelWrapper.getWrappedSubchannel() });\n }\n }\n else {\n return wrappedPick;\n }\n }\n}\nclass OutlierDetectionLoadBalancer {\n constructor(channelControlHelper, options) {\n this.entryMap = new subchannel_address_1.EndpointMap();\n this.latestConfig = null;\n this.timerStartTime = null;\n this.childBalancer = new load_balancer_child_handler_1.ChildLoadBalancerHandler((0, experimental_1.createChildChannelControlHelper)(channelControlHelper, {\n createSubchannel: (subchannelAddress, subchannelArgs) => {\n const originalSubchannel = channelControlHelper.createSubchannel(subchannelAddress, subchannelArgs);\n const mapEntry = this.entryMap.getForSubchannelAddress(subchannelAddress);\n const subchannelWrapper = new OutlierDetectionSubchannelWrapper(originalSubchannel, mapEntry);\n if ((mapEntry === null || mapEntry === void 0 ? void 0 : mapEntry.currentEjectionTimestamp) !== null) {\n // If the address is ejected, propagate that to the new subchannel wrapper\n subchannelWrapper.eject();\n }\n mapEntry === null || mapEntry === void 0 ? void 0 : mapEntry.subchannelWrappers.push(subchannelWrapper);\n return subchannelWrapper;\n },\n updateState: (connectivityState, picker) => {\n if (connectivityState === connectivity_state_1.ConnectivityState.READY) {\n channelControlHelper.updateState(connectivityState, new OutlierDetectionPicker(picker, this.isCountingEnabled()));\n }\n else {\n channelControlHelper.updateState(connectivityState, picker);\n }\n },\n }), options);\n this.ejectionTimer = setInterval(() => { }, 0);\n clearInterval(this.ejectionTimer);\n }\n isCountingEnabled() {\n return (this.latestConfig !== null &&\n (this.latestConfig.getSuccessRateEjectionConfig() !== null ||\n this.latestConfig.getFailurePercentageEjectionConfig() !== null));\n }\n getCurrentEjectionPercent() {\n let ejectionCount = 0;\n for (const mapEntry of this.entryMap.values()) {\n if (mapEntry.currentEjectionTimestamp !== null) {\n ejectionCount += 1;\n }\n }\n return (ejectionCount * 100) / this.entryMap.size;\n }\n runSuccessRateCheck(ejectionTimestamp) {\n if (!this.latestConfig) {\n return;\n }\n const successRateConfig = this.latestConfig.getSuccessRateEjectionConfig();\n if (!successRateConfig) {\n return;\n }\n trace('Running success rate check');\n // Step 1\n const targetRequestVolume = successRateConfig.request_volume;\n let addresesWithTargetVolume = 0;\n const successRates = [];\n for (const [endpoint, mapEntry] of this.entryMap.entries()) {\n const successes = mapEntry.counter.getLastSuccesses();\n const failures = mapEntry.counter.getLastFailures();\n trace('Stats for ' +\n (0, subchannel_address_1.endpointToString)(endpoint) +\n ': successes=' +\n successes +\n ' failures=' +\n failures +\n ' targetRequestVolume=' +\n targetRequestVolume);\n if (successes + failures >= targetRequestVolume) {\n addresesWithTargetVolume += 1;\n successRates.push(successes / (successes + failures));\n }\n }\n trace('Found ' +\n addresesWithTargetVolume +\n ' success rate candidates; currentEjectionPercent=' +\n this.getCurrentEjectionPercent() +\n ' successRates=[' +\n successRates +\n ']');\n if (addresesWithTargetVolume < successRateConfig.minimum_hosts) {\n return;\n }\n // Step 2\n const successRateMean = successRates.reduce((a, b) => a + b) / successRates.length;\n let successRateDeviationSum = 0;\n for (const rate of successRates) {\n const deviation = rate - successRateMean;\n successRateDeviationSum += deviation * deviation;\n }\n const successRateVariance = successRateDeviationSum / successRates.length;\n const successRateStdev = Math.sqrt(successRateVariance);\n const ejectionThreshold = successRateMean -\n successRateStdev * (successRateConfig.stdev_factor / 1000);\n trace('stdev=' + successRateStdev + ' ejectionThreshold=' + ejectionThreshold);\n // Step 3\n for (const [address, mapEntry] of this.entryMap.entries()) {\n // Step 3.i\n if (this.getCurrentEjectionPercent() >=\n this.latestConfig.getMaxEjectionPercent()) {\n break;\n }\n // Step 3.ii\n const successes = mapEntry.counter.getLastSuccesses();\n const failures = mapEntry.counter.getLastFailures();\n if (successes + failures < targetRequestVolume) {\n continue;\n }\n // Step 3.iii\n const successRate = successes / (successes + failures);\n trace('Checking candidate ' + address + ' successRate=' + successRate);\n if (successRate < ejectionThreshold) {\n const randomNumber = Math.random() * 100;\n trace('Candidate ' +\n address +\n ' randomNumber=' +\n randomNumber +\n ' enforcement_percentage=' +\n successRateConfig.enforcement_percentage);\n if (randomNumber < successRateConfig.enforcement_percentage) {\n trace('Ejecting candidate ' + address);\n this.eject(mapEntry, ejectionTimestamp);\n }\n }\n }\n }\n runFailurePercentageCheck(ejectionTimestamp) {\n if (!this.latestConfig) {\n return;\n }\n const failurePercentageConfig = this.latestConfig.getFailurePercentageEjectionConfig();\n if (!failurePercentageConfig) {\n return;\n }\n trace('Running failure percentage check. threshold=' +\n failurePercentageConfig.threshold +\n ' request volume threshold=' +\n failurePercentageConfig.request_volume);\n // Step 1\n let addressesWithTargetVolume = 0;\n for (const mapEntry of this.entryMap.values()) {\n const successes = mapEntry.counter.getLastSuccesses();\n const failures = mapEntry.counter.getLastFailures();\n if (successes + failures >= failurePercentageConfig.request_volume) {\n addressesWithTargetVolume += 1;\n }\n }\n if (addressesWithTargetVolume < failurePercentageConfig.minimum_hosts) {\n return;\n }\n // Step 2\n for (const [address, mapEntry] of this.entryMap.entries()) {\n // Step 2.i\n if (this.getCurrentEjectionPercent() >=\n this.latestConfig.getMaxEjectionPercent()) {\n break;\n }\n // Step 2.ii\n const successes = mapEntry.counter.getLastSuccesses();\n const failures = mapEntry.counter.getLastFailures();\n trace('Candidate successes=' + successes + ' failures=' + failures);\n if (successes + failures < failurePercentageConfig.request_volume) {\n continue;\n }\n // Step 2.iii\n const failurePercentage = (failures * 100) / (failures + successes);\n if (failurePercentage > failurePercentageConfig.threshold) {\n const randomNumber = Math.random() * 100;\n trace('Candidate ' +\n address +\n ' randomNumber=' +\n randomNumber +\n ' enforcement_percentage=' +\n failurePercentageConfig.enforcement_percentage);\n if (randomNumber < failurePercentageConfig.enforcement_percentage) {\n trace('Ejecting candidate ' + address);\n this.eject(mapEntry, ejectionTimestamp);\n }\n }\n }\n }\n eject(mapEntry, ejectionTimestamp) {\n mapEntry.currentEjectionTimestamp = new Date();\n mapEntry.ejectionTimeMultiplier += 1;\n for (const subchannelWrapper of mapEntry.subchannelWrappers) {\n subchannelWrapper.eject();\n }\n }\n uneject(mapEntry) {\n mapEntry.currentEjectionTimestamp = null;\n for (const subchannelWrapper of mapEntry.subchannelWrappers) {\n subchannelWrapper.uneject();\n }\n }\n switchAllBuckets() {\n for (const mapEntry of this.entryMap.values()) {\n mapEntry.counter.switchBuckets();\n }\n }\n startTimer(delayMs) {\n var _a, _b;\n this.ejectionTimer = setTimeout(() => this.runChecks(), delayMs);\n (_b = (_a = this.ejectionTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n runChecks() {\n const ejectionTimestamp = new Date();\n trace('Ejection timer running');\n this.switchAllBuckets();\n if (!this.latestConfig) {\n return;\n }\n this.timerStartTime = ejectionTimestamp;\n this.startTimer(this.latestConfig.getIntervalMs());\n this.runSuccessRateCheck(ejectionTimestamp);\n this.runFailurePercentageCheck(ejectionTimestamp);\n for (const [address, mapEntry] of this.entryMap.entries()) {\n if (mapEntry.currentEjectionTimestamp === null) {\n if (mapEntry.ejectionTimeMultiplier > 0) {\n mapEntry.ejectionTimeMultiplier -= 1;\n }\n }\n else {\n const baseEjectionTimeMs = this.latestConfig.getBaseEjectionTimeMs();\n const maxEjectionTimeMs = this.latestConfig.getMaxEjectionTimeMs();\n const returnTime = new Date(mapEntry.currentEjectionTimestamp.getTime());\n returnTime.setMilliseconds(returnTime.getMilliseconds() +\n Math.min(baseEjectionTimeMs * mapEntry.ejectionTimeMultiplier, Math.max(baseEjectionTimeMs, maxEjectionTimeMs)));\n if (returnTime < new Date()) {\n trace('Unejecting ' + address);\n this.uneject(mapEntry);\n }\n }\n }\n }\n updateAddressList(endpointList, lbConfig, attributes) {\n if (!(lbConfig instanceof OutlierDetectionLoadBalancingConfig)) {\n return;\n }\n for (const endpoint of endpointList) {\n if (!this.entryMap.has(endpoint)) {\n trace('Adding map entry for ' + (0, subchannel_address_1.endpointToString)(endpoint));\n this.entryMap.set(endpoint, {\n counter: new CallCounter(),\n currentEjectionTimestamp: null,\n ejectionTimeMultiplier: 0,\n subchannelWrappers: [],\n });\n }\n }\n this.entryMap.deleteMissing(endpointList);\n const childPolicy = lbConfig.getChildPolicy();\n this.childBalancer.updateAddressList(endpointList, childPolicy, attributes);\n if (lbConfig.getSuccessRateEjectionConfig() ||\n lbConfig.getFailurePercentageEjectionConfig()) {\n if (this.timerStartTime) {\n trace('Previous timer existed. Replacing timer');\n clearTimeout(this.ejectionTimer);\n const remainingDelay = lbConfig.getIntervalMs() -\n (new Date().getTime() - this.timerStartTime.getTime());\n this.startTimer(remainingDelay);\n }\n else {\n trace('Starting new timer');\n this.timerStartTime = new Date();\n this.startTimer(lbConfig.getIntervalMs());\n this.switchAllBuckets();\n }\n }\n else {\n trace('Counting disabled. Cancelling timer.');\n this.timerStartTime = null;\n clearTimeout(this.ejectionTimer);\n for (const mapEntry of this.entryMap.values()) {\n this.uneject(mapEntry);\n mapEntry.ejectionTimeMultiplier = 0;\n }\n }\n this.latestConfig = lbConfig;\n }\n exitIdle() {\n this.childBalancer.exitIdle();\n }\n resetBackoff() {\n this.childBalancer.resetBackoff();\n }\n destroy() {\n clearTimeout(this.ejectionTimer);\n this.childBalancer.destroy();\n }\n getTypeName() {\n return TYPE_NAME;\n }\n}\nexports.OutlierDetectionLoadBalancer = OutlierDetectionLoadBalancer;\nfunction setup() {\n if (OUTLIER_DETECTION_ENABLED) {\n (0, experimental_1.registerLoadBalancerType)(TYPE_NAME, OutlierDetectionLoadBalancer, OutlierDetectionLoadBalancingConfig);\n }\n}\nexports.setup = setup;\n//# sourceMappingURL=load-balancer-outlier-detection.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setup = exports.LeafLoadBalancer = exports.PickFirstLoadBalancer = exports.shuffled = exports.PickFirstLoadBalancingConfig = void 0;\nconst load_balancer_1 = require(\"./load-balancer\");\nconst connectivity_state_1 = require(\"./connectivity-state\");\nconst picker_1 = require(\"./picker\");\nconst logging = require(\"./logging\");\nconst constants_1 = require(\"./constants\");\nconst subchannel_address_1 = require(\"./subchannel-address\");\nconst net_1 = require(\"net\");\nconst TRACER_NAME = 'pick_first';\nfunction trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);\n}\nconst TYPE_NAME = 'pick_first';\n/**\n * Delay after starting a connection on a subchannel before starting a\n * connection on the next subchannel in the list, for Happy Eyeballs algorithm.\n */\nconst CONNECTION_DELAY_INTERVAL_MS = 250;\nclass PickFirstLoadBalancingConfig {\n constructor(shuffleAddressList) {\n this.shuffleAddressList = shuffleAddressList;\n }\n getLoadBalancerName() {\n return TYPE_NAME;\n }\n toJsonObject() {\n return {\n [TYPE_NAME]: {\n shuffleAddressList: this.shuffleAddressList,\n },\n };\n }\n getShuffleAddressList() {\n return this.shuffleAddressList;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static createFromJson(obj) {\n if ('shuffleAddressList' in obj &&\n !(typeof obj.shuffleAddressList === 'boolean')) {\n throw new Error('pick_first config field shuffleAddressList must be a boolean if provided');\n }\n return new PickFirstLoadBalancingConfig(obj.shuffleAddressList === true);\n }\n}\nexports.PickFirstLoadBalancingConfig = PickFirstLoadBalancingConfig;\n/**\n * Picker for a `PickFirstLoadBalancer` in the READY state. Always returns the\n * picked subchannel.\n */\nclass PickFirstPicker {\n constructor(subchannel) {\n this.subchannel = subchannel;\n }\n pick(pickArgs) {\n return {\n pickResultType: picker_1.PickResultType.COMPLETE,\n subchannel: this.subchannel,\n status: null,\n onCallStarted: null,\n onCallEnded: null,\n };\n }\n}\n/**\n * Return a new array with the elements of the input array in a random order\n * @param list The input array\n * @returns A shuffled array of the elements of list\n */\nfunction shuffled(list) {\n const result = list.slice();\n for (let i = result.length - 1; i > 1; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const temp = result[i];\n result[i] = result[j];\n result[j] = temp;\n }\n return result;\n}\nexports.shuffled = shuffled;\n/**\n * Interleave addresses in addressList by family in accordance with RFC-8304 section 4\n * @param addressList\n * @returns\n */\nfunction interleaveAddressFamilies(addressList) {\n const result = [];\n const ipv6Addresses = [];\n const ipv4Addresses = [];\n const ipv6First = (0, subchannel_address_1.isTcpSubchannelAddress)(addressList[0]) && (0, net_1.isIPv6)(addressList[0].host);\n for (const address of addressList) {\n if ((0, subchannel_address_1.isTcpSubchannelAddress)(address) && (0, net_1.isIPv6)(address.host)) {\n ipv6Addresses.push(address);\n }\n else {\n ipv4Addresses.push(address);\n }\n }\n const firstList = ipv6First ? ipv6Addresses : ipv4Addresses;\n const secondList = ipv6First ? ipv4Addresses : ipv6Addresses;\n for (let i = 0; i < Math.max(firstList.length, secondList.length); i++) {\n if (i < firstList.length) {\n result.push(firstList[i]);\n }\n if (i < secondList.length) {\n result.push(secondList[i]);\n }\n }\n return result;\n}\nconst REPORT_HEALTH_STATUS_OPTION_NAME = 'grpc-node.internal.pick-first.report_health_status';\nclass PickFirstLoadBalancer {\n /**\n * Load balancer that attempts to connect to each backend in the address list\n * in order, and picks the first one that connects, using it for every\n * request.\n * @param channelControlHelper `ChannelControlHelper` instance provided by\n * this load balancer's owner.\n */\n constructor(channelControlHelper, options) {\n this.channelControlHelper = channelControlHelper;\n /**\n * The list of subchannels this load balancer is currently attempting to\n * connect to.\n */\n this.children = [];\n /**\n * The current connectivity state of the load balancer.\n */\n this.currentState = connectivity_state_1.ConnectivityState.IDLE;\n /**\n * The index within the `subchannels` array of the subchannel with the most\n * recently started connection attempt.\n */\n this.currentSubchannelIndex = 0;\n /**\n * The currently picked subchannel used for making calls. Populated if\n * and only if the load balancer's current state is READY. In that case,\n * the subchannel's current state is also READY.\n */\n this.currentPick = null;\n /**\n * Listener callback attached to each subchannel in the `subchannels` list\n * while establishing a connection.\n */\n this.subchannelStateListener = (subchannel, previousState, newState, keepaliveTime, errorMessage) => {\n this.onSubchannelStateUpdate(subchannel, previousState, newState, errorMessage);\n };\n this.pickedSubchannelHealthListener = () => this.calculateAndReportNewState();\n this.triedAllSubchannels = false;\n /**\n * The LB policy enters sticky TRANSIENT_FAILURE mode when all\n * subchannels have failed to connect at least once, and it stays in that\n * mode until a connection attempt is successful. While in sticky TF mode,\n * the LB policy continuously attempts to connect to all of its subchannels.\n */\n this.stickyTransientFailureMode = false;\n /**\n * Indicates whether we called channelControlHelper.requestReresolution since\n * the last call to updateAddressList\n */\n this.requestedResolutionSinceLastUpdate = false;\n /**\n * The most recent error reported by any subchannel as it transitioned to\n * TRANSIENT_FAILURE.\n */\n this.lastError = null;\n this.latestAddressList = null;\n this.connectionDelayTimeout = setTimeout(() => { }, 0);\n clearTimeout(this.connectionDelayTimeout);\n this.reportHealthStatus = options[REPORT_HEALTH_STATUS_OPTION_NAME];\n }\n allChildrenHaveReportedTF() {\n return this.children.every(child => child.hasReportedTransientFailure);\n }\n calculateAndReportNewState() {\n if (this.currentPick) {\n if (this.reportHealthStatus && !this.currentPick.isHealthy()) {\n this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker({\n details: `Picked subchannel ${this.currentPick.getAddress()} is unhealthy`,\n }));\n }\n else {\n this.updateState(connectivity_state_1.ConnectivityState.READY, new PickFirstPicker(this.currentPick));\n }\n }\n else if (this.children.length === 0) {\n this.updateState(connectivity_state_1.ConnectivityState.IDLE, new picker_1.QueuePicker(this));\n }\n else {\n if (this.stickyTransientFailureMode) {\n this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker({\n details: `No connection established. Last error: ${this.lastError}`,\n }));\n }\n else {\n this.updateState(connectivity_state_1.ConnectivityState.CONNECTING, new picker_1.QueuePicker(this));\n }\n }\n }\n requestReresolution() {\n this.requestedResolutionSinceLastUpdate = true;\n this.channelControlHelper.requestReresolution();\n }\n maybeEnterStickyTransientFailureMode() {\n if (!this.allChildrenHaveReportedTF()) {\n return;\n }\n if (!this.requestedResolutionSinceLastUpdate) {\n /* Each time we get an update we reset each subchannel's\n * hasReportedTransientFailure flag, so the next time we get to this\n * point after that, each subchannel has reported TRANSIENT_FAILURE\n * at least once since then. That is the trigger for requesting\n * reresolution, whether or not the LB policy is already in sticky TF\n * mode. */\n this.requestReresolution();\n }\n if (this.stickyTransientFailureMode) {\n return;\n }\n this.stickyTransientFailureMode = true;\n for (const { subchannel } of this.children) {\n subchannel.startConnecting();\n }\n this.calculateAndReportNewState();\n }\n removeCurrentPick() {\n if (this.currentPick !== null) {\n /* Unref can cause a state change, which can cause a change in the value\n * of this.currentPick, so we hold a local reference to make sure that\n * does not impact this function. */\n const currentPick = this.currentPick;\n this.currentPick = null;\n currentPick.unref();\n currentPick.removeConnectivityStateListener(this.subchannelStateListener);\n this.channelControlHelper.removeChannelzChild(currentPick.getChannelzRef());\n if (this.reportHealthStatus) {\n currentPick.removeHealthStateWatcher(this.pickedSubchannelHealthListener);\n }\n }\n }\n onSubchannelStateUpdate(subchannel, previousState, newState, errorMessage) {\n var _a;\n if ((_a = this.currentPick) === null || _a === void 0 ? void 0 : _a.realSubchannelEquals(subchannel)) {\n if (newState !== connectivity_state_1.ConnectivityState.READY) {\n this.removeCurrentPick();\n this.calculateAndReportNewState();\n this.requestReresolution();\n }\n return;\n }\n for (const [index, child] of this.children.entries()) {\n if (subchannel.realSubchannelEquals(child.subchannel)) {\n if (newState === connectivity_state_1.ConnectivityState.READY) {\n this.pickSubchannel(child.subchannel);\n }\n if (newState === connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) {\n child.hasReportedTransientFailure = true;\n if (errorMessage) {\n this.lastError = errorMessage;\n }\n this.maybeEnterStickyTransientFailureMode();\n if (index === this.currentSubchannelIndex) {\n this.startNextSubchannelConnecting(index + 1);\n }\n }\n child.subchannel.startConnecting();\n return;\n }\n }\n }\n startNextSubchannelConnecting(startIndex) {\n clearTimeout(this.connectionDelayTimeout);\n if (this.triedAllSubchannels) {\n return;\n }\n for (const [index, child] of this.children.entries()) {\n if (index >= startIndex) {\n const subchannelState = child.subchannel.getConnectivityState();\n if (subchannelState === connectivity_state_1.ConnectivityState.IDLE ||\n subchannelState === connectivity_state_1.ConnectivityState.CONNECTING) {\n this.startConnecting(index);\n return;\n }\n }\n }\n this.triedAllSubchannels = true;\n this.maybeEnterStickyTransientFailureMode();\n }\n /**\n * Have a single subchannel in the `subchannels` list start connecting.\n * @param subchannelIndex The index into the `subchannels` list.\n */\n startConnecting(subchannelIndex) {\n var _a, _b;\n clearTimeout(this.connectionDelayTimeout);\n this.currentSubchannelIndex = subchannelIndex;\n if (this.children[subchannelIndex].subchannel.getConnectivityState() ===\n connectivity_state_1.ConnectivityState.IDLE) {\n trace('Start connecting to subchannel with address ' +\n this.children[subchannelIndex].subchannel.getAddress());\n process.nextTick(() => {\n var _a;\n (_a = this.children[subchannelIndex]) === null || _a === void 0 ? void 0 : _a.subchannel.startConnecting();\n });\n }\n this.connectionDelayTimeout = setTimeout(() => {\n this.startNextSubchannelConnecting(subchannelIndex + 1);\n }, CONNECTION_DELAY_INTERVAL_MS);\n (_b = (_a = this.connectionDelayTimeout).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n pickSubchannel(subchannel) {\n if (this.currentPick && subchannel.realSubchannelEquals(this.currentPick)) {\n return;\n }\n trace('Pick subchannel with address ' + subchannel.getAddress());\n this.stickyTransientFailureMode = false;\n this.removeCurrentPick();\n this.currentPick = subchannel;\n subchannel.ref();\n if (this.reportHealthStatus) {\n subchannel.addHealthStateWatcher(this.pickedSubchannelHealthListener);\n }\n this.channelControlHelper.addChannelzChild(subchannel.getChannelzRef());\n this.resetSubchannelList();\n clearTimeout(this.connectionDelayTimeout);\n this.calculateAndReportNewState();\n }\n updateState(newState, picker) {\n trace(connectivity_state_1.ConnectivityState[this.currentState] +\n ' -> ' +\n connectivity_state_1.ConnectivityState[newState]);\n this.currentState = newState;\n this.channelControlHelper.updateState(newState, picker);\n }\n resetSubchannelList() {\n for (const child of this.children) {\n if (!(this.currentPick &&\n child.subchannel.realSubchannelEquals(this.currentPick))) {\n /* The connectivity state listener is the same whether the subchannel\n * is in the list of children or it is the currentPick, so if it is in\n * both, removing it here would cause problems. In particular, that\n * always happens immediately after the subchannel is picked. */\n child.subchannel.removeConnectivityStateListener(this.subchannelStateListener);\n }\n /* Refs are counted independently for the children list and the\n * currentPick, so we call unref whether or not the child is the\n * currentPick. Channelz child references are also refcounted, so\n * removeChannelzChild can be handled the same way. */\n child.subchannel.unref();\n this.channelControlHelper.removeChannelzChild(child.subchannel.getChannelzRef());\n }\n this.currentSubchannelIndex = 0;\n this.children = [];\n this.triedAllSubchannels = false;\n this.requestedResolutionSinceLastUpdate = false;\n }\n connectToAddressList(addressList) {\n const newChildrenList = addressList.map(address => ({\n subchannel: this.channelControlHelper.createSubchannel(address, {}),\n hasReportedTransientFailure: false,\n }));\n /* Ref each subchannel before resetting the list, to ensure that\n * subchannels shared between the list don't drop to 0 refs during the\n * transition. */\n for (const { subchannel } of newChildrenList) {\n subchannel.ref();\n this.channelControlHelper.addChannelzChild(subchannel.getChannelzRef());\n }\n this.resetSubchannelList();\n this.children = newChildrenList;\n for (const { subchannel } of this.children) {\n subchannel.addConnectivityStateListener(this.subchannelStateListener);\n if (subchannel.getConnectivityState() === connectivity_state_1.ConnectivityState.READY) {\n this.pickSubchannel(subchannel);\n return;\n }\n }\n for (const child of this.children) {\n if (child.subchannel.getConnectivityState() ===\n connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) {\n child.hasReportedTransientFailure = true;\n }\n }\n this.startNextSubchannelConnecting(0);\n this.calculateAndReportNewState();\n }\n updateAddressList(endpointList, lbConfig) {\n if (!(lbConfig instanceof PickFirstLoadBalancingConfig)) {\n return;\n }\n /* Previously, an update would be discarded if it was identical to the\n * previous update, to minimize churn. Now the DNS resolver is\n * rate-limited, so that is less of a concern. */\n if (lbConfig.getShuffleAddressList()) {\n endpointList = shuffled(endpointList);\n }\n const rawAddressList = [].concat(...endpointList.map(endpoint => endpoint.addresses));\n if (rawAddressList.length === 0) {\n throw new Error('No addresses in endpoint list passed to pick_first');\n }\n const addressList = interleaveAddressFamilies(rawAddressList);\n this.latestAddressList = addressList;\n this.connectToAddressList(addressList);\n }\n exitIdle() {\n if (this.currentState === connectivity_state_1.ConnectivityState.IDLE &&\n this.latestAddressList) {\n this.connectToAddressList(this.latestAddressList);\n }\n }\n resetBackoff() {\n /* The pick first load balancer does not have a connection backoff, so this\n * does nothing */\n }\n destroy() {\n this.resetSubchannelList();\n this.removeCurrentPick();\n }\n getTypeName() {\n return TYPE_NAME;\n }\n}\nexports.PickFirstLoadBalancer = PickFirstLoadBalancer;\nconst LEAF_CONFIG = new PickFirstLoadBalancingConfig(false);\n/**\n * This class handles the leaf load balancing operations for a single endpoint.\n * It is a thin wrapper around a PickFirstLoadBalancer with a different API\n * that more closely reflects how it will be used as a leaf balancer.\n */\nclass LeafLoadBalancer {\n constructor(endpoint, channelControlHelper, options) {\n this.endpoint = endpoint;\n this.latestState = connectivity_state_1.ConnectivityState.IDLE;\n const childChannelControlHelper = (0, load_balancer_1.createChildChannelControlHelper)(channelControlHelper, {\n updateState: (connectivityState, picker) => {\n this.latestState = connectivityState;\n this.latestPicker = picker;\n channelControlHelper.updateState(connectivityState, picker);\n },\n });\n this.pickFirstBalancer = new PickFirstLoadBalancer(childChannelControlHelper, Object.assign(Object.assign({}, options), { [REPORT_HEALTH_STATUS_OPTION_NAME]: true }));\n this.latestPicker = new picker_1.QueuePicker(this.pickFirstBalancer);\n }\n startConnecting() {\n this.pickFirstBalancer.updateAddressList([this.endpoint], LEAF_CONFIG);\n }\n /**\n * Update the endpoint associated with this LeafLoadBalancer to a new\n * endpoint. Does not trigger connection establishment if a connection\n * attempt is not already in progress.\n * @param newEndpoint\n */\n updateEndpoint(newEndpoint) {\n this.endpoint = newEndpoint;\n if (this.latestState !== connectivity_state_1.ConnectivityState.IDLE) {\n this.startConnecting();\n }\n }\n getConnectivityState() {\n return this.latestState;\n }\n getPicker() {\n return this.latestPicker;\n }\n getEndpoint() {\n return this.endpoint;\n }\n exitIdle() {\n this.pickFirstBalancer.exitIdle();\n }\n destroy() {\n this.pickFirstBalancer.destroy();\n }\n}\nexports.LeafLoadBalancer = LeafLoadBalancer;\nfunction setup() {\n (0, load_balancer_1.registerLoadBalancerType)(TYPE_NAME, PickFirstLoadBalancer, PickFirstLoadBalancingConfig);\n (0, load_balancer_1.registerDefaultLoadBalancerType)(TYPE_NAME);\n}\nexports.setup = setup;\n//# sourceMappingURL=load-balancer-pick-first.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setup = exports.RoundRobinLoadBalancer = void 0;\nconst load_balancer_1 = require(\"./load-balancer\");\nconst connectivity_state_1 = require(\"./connectivity-state\");\nconst picker_1 = require(\"./picker\");\nconst logging = require(\"./logging\");\nconst constants_1 = require(\"./constants\");\nconst subchannel_address_1 = require(\"./subchannel-address\");\nconst load_balancer_pick_first_1 = require(\"./load-balancer-pick-first\");\nconst TRACER_NAME = 'round_robin';\nfunction trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);\n}\nconst TYPE_NAME = 'round_robin';\nclass RoundRobinLoadBalancingConfig {\n getLoadBalancerName() {\n return TYPE_NAME;\n }\n constructor() { }\n toJsonObject() {\n return {\n [TYPE_NAME]: {},\n };\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static createFromJson(obj) {\n return new RoundRobinLoadBalancingConfig();\n }\n}\nclass RoundRobinPicker {\n constructor(children, nextIndex = 0) {\n this.children = children;\n this.nextIndex = nextIndex;\n }\n pick(pickArgs) {\n const childPicker = this.children[this.nextIndex].picker;\n this.nextIndex = (this.nextIndex + 1) % this.children.length;\n return childPicker.pick(pickArgs);\n }\n /**\n * Check what the next subchannel returned would be. Used by the load\n * balancer implementation to preserve this part of the picker state if\n * possible when a subchannel connects or disconnects.\n */\n peekNextEndpoint() {\n return this.children[this.nextIndex].endpoint;\n }\n}\nclass RoundRobinLoadBalancer {\n constructor(channelControlHelper, options) {\n this.channelControlHelper = channelControlHelper;\n this.options = options;\n this.children = [];\n this.currentState = connectivity_state_1.ConnectivityState.IDLE;\n this.currentReadyPicker = null;\n this.updatesPaused = false;\n this.lastError = null;\n this.childChannelControlHelper = (0, load_balancer_1.createChildChannelControlHelper)(channelControlHelper, {\n updateState: (connectivityState, picker) => {\n this.calculateAndUpdateState();\n },\n });\n }\n countChildrenWithState(state) {\n return this.children.filter(child => child.getConnectivityState() === state)\n .length;\n }\n calculateAndUpdateState() {\n if (this.updatesPaused) {\n return;\n }\n if (this.countChildrenWithState(connectivity_state_1.ConnectivityState.READY) > 0) {\n const readyChildren = this.children.filter(child => child.getConnectivityState() === connectivity_state_1.ConnectivityState.READY);\n let index = 0;\n if (this.currentReadyPicker !== null) {\n const nextPickedEndpoint = this.currentReadyPicker.peekNextEndpoint();\n index = readyChildren.findIndex(child => (0, subchannel_address_1.endpointEqual)(child.getEndpoint(), nextPickedEndpoint));\n if (index < 0) {\n index = 0;\n }\n }\n this.updateState(connectivity_state_1.ConnectivityState.READY, new RoundRobinPicker(readyChildren.map(child => ({\n endpoint: child.getEndpoint(),\n picker: child.getPicker(),\n })), index));\n }\n else if (this.countChildrenWithState(connectivity_state_1.ConnectivityState.CONNECTING) > 0) {\n this.updateState(connectivity_state_1.ConnectivityState.CONNECTING, new picker_1.QueuePicker(this));\n }\n else if (this.countChildrenWithState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) > 0) {\n this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker({\n details: `No connection established. Last error: ${this.lastError}`,\n }));\n }\n else {\n this.updateState(connectivity_state_1.ConnectivityState.IDLE, new picker_1.QueuePicker(this));\n }\n /* round_robin should keep all children connected, this is how we do that.\n * We can't do this more efficiently in the individual child's updateState\n * callback because that doesn't have a reference to which child the state\n * change is associated with. */\n for (const child of this.children) {\n if (child.getConnectivityState() === connectivity_state_1.ConnectivityState.IDLE) {\n child.exitIdle();\n }\n }\n }\n updateState(newState, picker) {\n trace(connectivity_state_1.ConnectivityState[this.currentState] +\n ' -> ' +\n connectivity_state_1.ConnectivityState[newState]);\n if (newState === connectivity_state_1.ConnectivityState.READY) {\n this.currentReadyPicker = picker;\n }\n else {\n this.currentReadyPicker = null;\n }\n this.currentState = newState;\n this.channelControlHelper.updateState(newState, picker);\n }\n resetSubchannelList() {\n for (const child of this.children) {\n child.destroy();\n }\n }\n updateAddressList(endpointList, lbConfig) {\n this.resetSubchannelList();\n trace('Connect to endpoint list ' + endpointList.map(subchannel_address_1.endpointToString));\n this.updatesPaused = true;\n this.children = endpointList.map(endpoint => new load_balancer_pick_first_1.LeafLoadBalancer(endpoint, this.childChannelControlHelper, this.options));\n for (const child of this.children) {\n child.startConnecting();\n }\n this.updatesPaused = false;\n this.calculateAndUpdateState();\n }\n exitIdle() {\n /* The round_robin LB policy is only in the IDLE state if it has no\n * addresses to try to connect to and it has no picked subchannel.\n * In that case, there is no meaningful action that can be taken here. */\n }\n resetBackoff() {\n // This LB policy has no backoff to reset\n }\n destroy() {\n this.resetSubchannelList();\n }\n getTypeName() {\n return TYPE_NAME;\n }\n}\nexports.RoundRobinLoadBalancer = RoundRobinLoadBalancer;\nfunction setup() {\n (0, load_balancer_1.registerLoadBalancerType)(TYPE_NAME, RoundRobinLoadBalancer, RoundRobinLoadBalancingConfig);\n}\nexports.setup = setup;\n//# sourceMappingURL=load-balancer-round-robin.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.selectLbConfigFromList = exports.getDefaultConfig = exports.parseLoadBalancingConfig = exports.isLoadBalancerNameRegistered = exports.createLoadBalancer = exports.registerDefaultLoadBalancerType = exports.registerLoadBalancerType = exports.createChildChannelControlHelper = void 0;\nconst logging_1 = require(\"./logging\");\nconst constants_1 = require(\"./constants\");\n/**\n * Create a child ChannelControlHelper that overrides some methods of the\n * parent while letting others pass through to the parent unmodified. This\n * allows other code to create these children without needing to know about\n * all of the methods to be passed through.\n * @param parent\n * @param overrides\n */\nfunction createChildChannelControlHelper(parent, overrides) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n return {\n createSubchannel: (_b = (_a = overrides.createSubchannel) === null || _a === void 0 ? void 0 : _a.bind(overrides)) !== null && _b !== void 0 ? _b : parent.createSubchannel.bind(parent),\n updateState: (_d = (_c = overrides.updateState) === null || _c === void 0 ? void 0 : _c.bind(overrides)) !== null && _d !== void 0 ? _d : parent.updateState.bind(parent),\n requestReresolution: (_f = (_e = overrides.requestReresolution) === null || _e === void 0 ? void 0 : _e.bind(overrides)) !== null && _f !== void 0 ? _f : parent.requestReresolution.bind(parent),\n addChannelzChild: (_h = (_g = overrides.addChannelzChild) === null || _g === void 0 ? void 0 : _g.bind(overrides)) !== null && _h !== void 0 ? _h : parent.addChannelzChild.bind(parent),\n removeChannelzChild: (_k = (_j = overrides.removeChannelzChild) === null || _j === void 0 ? void 0 : _j.bind(overrides)) !== null && _k !== void 0 ? _k : parent.removeChannelzChild.bind(parent),\n };\n}\nexports.createChildChannelControlHelper = createChildChannelControlHelper;\nconst registeredLoadBalancerTypes = {};\nlet defaultLoadBalancerType = null;\nfunction registerLoadBalancerType(typeName, loadBalancerType, loadBalancingConfigType) {\n registeredLoadBalancerTypes[typeName] = {\n LoadBalancer: loadBalancerType,\n LoadBalancingConfig: loadBalancingConfigType,\n };\n}\nexports.registerLoadBalancerType = registerLoadBalancerType;\nfunction registerDefaultLoadBalancerType(typeName) {\n defaultLoadBalancerType = typeName;\n}\nexports.registerDefaultLoadBalancerType = registerDefaultLoadBalancerType;\nfunction createLoadBalancer(config, channelControlHelper, options) {\n const typeName = config.getLoadBalancerName();\n if (typeName in registeredLoadBalancerTypes) {\n return new registeredLoadBalancerTypes[typeName].LoadBalancer(channelControlHelper, options);\n }\n else {\n return null;\n }\n}\nexports.createLoadBalancer = createLoadBalancer;\nfunction isLoadBalancerNameRegistered(typeName) {\n return typeName in registeredLoadBalancerTypes;\n}\nexports.isLoadBalancerNameRegistered = isLoadBalancerNameRegistered;\nfunction parseLoadBalancingConfig(rawConfig) {\n const keys = Object.keys(rawConfig);\n if (keys.length !== 1) {\n throw new Error('Provided load balancing config has multiple conflicting entries');\n }\n const typeName = keys[0];\n if (typeName in registeredLoadBalancerTypes) {\n try {\n return registeredLoadBalancerTypes[typeName].LoadBalancingConfig.createFromJson(rawConfig[typeName]);\n }\n catch (e) {\n throw new Error(`${typeName}: ${e.message}`);\n }\n }\n else {\n throw new Error(`Unrecognized load balancing config name ${typeName}`);\n }\n}\nexports.parseLoadBalancingConfig = parseLoadBalancingConfig;\nfunction getDefaultConfig() {\n if (!defaultLoadBalancerType) {\n throw new Error('No default load balancer type registered');\n }\n return new registeredLoadBalancerTypes[defaultLoadBalancerType].LoadBalancingConfig();\n}\nexports.getDefaultConfig = getDefaultConfig;\nfunction selectLbConfigFromList(configs, fallbackTodefault = false) {\n for (const config of configs) {\n try {\n return parseLoadBalancingConfig(config);\n }\n catch (e) {\n (0, logging_1.log)(constants_1.LogVerbosity.DEBUG, 'Config parsing failed with error', e.message);\n continue;\n }\n }\n if (fallbackTodefault) {\n if (defaultLoadBalancerType) {\n return new registeredLoadBalancerTypes[defaultLoadBalancerType].LoadBalancingConfig();\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n}\nexports.selectLbConfigFromList = selectLbConfigFromList;\n//# sourceMappingURL=load-balancer.js.map","\"use strict\";\n/*\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LoadBalancingCall = void 0;\nconst connectivity_state_1 = require(\"./connectivity-state\");\nconst constants_1 = require(\"./constants\");\nconst deadline_1 = require(\"./deadline\");\nconst metadata_1 = require(\"./metadata\");\nconst picker_1 = require(\"./picker\");\nconst uri_parser_1 = require(\"./uri-parser\");\nconst logging = require(\"./logging\");\nconst control_plane_status_1 = require(\"./control-plane-status\");\nconst http2 = require(\"http2\");\nconst TRACER_NAME = 'load_balancing_call';\nclass LoadBalancingCall {\n constructor(channel, callConfig, methodName, host, credentials, deadline, callNumber) {\n var _a, _b;\n this.channel = channel;\n this.callConfig = callConfig;\n this.methodName = methodName;\n this.host = host;\n this.credentials = credentials;\n this.deadline = deadline;\n this.callNumber = callNumber;\n this.child = null;\n this.readPending = false;\n this.pendingMessage = null;\n this.pendingHalfClose = false;\n this.ended = false;\n this.metadata = null;\n this.listener = null;\n this.onCallEnded = null;\n this.childStartTime = null;\n const splitPath = this.methodName.split('/');\n let serviceName = '';\n /* The standard path format is \"/{serviceName}/{methodName}\", so if we split\n * by '/', the first item should be empty and the second should be the\n * service name */\n if (splitPath.length >= 2) {\n serviceName = splitPath[1];\n }\n const hostname = (_b = (_a = (0, uri_parser_1.splitHostPort)(this.host)) === null || _a === void 0 ? void 0 : _a.host) !== null && _b !== void 0 ? _b : 'localhost';\n /* Currently, call credentials are only allowed on HTTPS connections, so we\n * can assume that the scheme is \"https\" */\n this.serviceUrl = `https://${hostname}/${serviceName}`;\n this.startTime = new Date();\n }\n getDeadlineInfo() {\n var _a, _b;\n const deadlineInfo = [];\n if (this.childStartTime) {\n if (this.childStartTime > this.startTime) {\n if ((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.getOptions().waitForReady) {\n deadlineInfo.push('wait_for_ready');\n }\n deadlineInfo.push(`LB pick: ${(0, deadline_1.formatDateDifference)(this.startTime, this.childStartTime)}`);\n }\n deadlineInfo.push(...this.child.getDeadlineInfo());\n return deadlineInfo;\n }\n else {\n if ((_b = this.metadata) === null || _b === void 0 ? void 0 : _b.getOptions().waitForReady) {\n deadlineInfo.push('wait_for_ready');\n }\n deadlineInfo.push('Waiting for LB pick');\n }\n return deadlineInfo;\n }\n trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '[' + this.callNumber + '] ' + text);\n }\n outputStatus(status, progress) {\n var _a, _b;\n if (!this.ended) {\n this.ended = true;\n this.trace('ended with status: code=' +\n status.code +\n ' details=\"' +\n status.details +\n '\" start time=' +\n this.startTime.toISOString());\n const finalStatus = Object.assign(Object.assign({}, status), { progress });\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveStatus(finalStatus);\n (_b = this.onCallEnded) === null || _b === void 0 ? void 0 : _b.call(this, finalStatus.code);\n }\n }\n doPick() {\n var _a, _b;\n if (this.ended) {\n return;\n }\n if (!this.metadata) {\n throw new Error('doPick called before start');\n }\n this.trace('Pick called');\n const finalMetadata = this.metadata.clone();\n const pickResult = this.channel.doPick(finalMetadata, this.callConfig.pickInformation);\n const subchannelString = pickResult.subchannel\n ? '(' +\n pickResult.subchannel.getChannelzRef().id +\n ') ' +\n pickResult.subchannel.getAddress()\n : '' + pickResult.subchannel;\n this.trace('Pick result: ' +\n picker_1.PickResultType[pickResult.pickResultType] +\n ' subchannel: ' +\n subchannelString +\n ' status: ' +\n ((_a = pickResult.status) === null || _a === void 0 ? void 0 : _a.code) +\n ' ' +\n ((_b = pickResult.status) === null || _b === void 0 ? void 0 : _b.details));\n switch (pickResult.pickResultType) {\n case picker_1.PickResultType.COMPLETE:\n this.credentials\n .generateMetadata({ service_url: this.serviceUrl })\n .then(credsMetadata => {\n var _a, _b, _c;\n /* If this call was cancelled (e.g. by the deadline) before\n * metadata generation finished, we shouldn't do anything with\n * it. */\n if (this.ended) {\n this.trace('Credentials metadata generation finished after call ended');\n return;\n }\n finalMetadata.merge(credsMetadata);\n if (finalMetadata.get('authorization').length > 1) {\n this.outputStatus({\n code: constants_1.Status.INTERNAL,\n details: '\"authorization\" metadata cannot have multiple values',\n metadata: new metadata_1.Metadata(),\n }, 'PROCESSED');\n }\n if (pickResult.subchannel.getConnectivityState() !==\n connectivity_state_1.ConnectivityState.READY) {\n this.trace('Picked subchannel ' +\n subchannelString +\n ' has state ' +\n connectivity_state_1.ConnectivityState[pickResult.subchannel.getConnectivityState()] +\n ' after getting credentials metadata. Retrying pick');\n this.doPick();\n return;\n }\n if (this.deadline !== Infinity) {\n finalMetadata.set('grpc-timeout', (0, deadline_1.getDeadlineTimeoutString)(this.deadline));\n }\n try {\n this.child = pickResult\n .subchannel.getRealSubchannel()\n .createCall(finalMetadata, this.host, this.methodName, {\n onReceiveMetadata: metadata => {\n this.trace('Received metadata');\n this.listener.onReceiveMetadata(metadata);\n },\n onReceiveMessage: message => {\n this.trace('Received message');\n this.listener.onReceiveMessage(message);\n },\n onReceiveStatus: status => {\n this.trace('Received status');\n if (status.rstCode ===\n http2.constants.NGHTTP2_REFUSED_STREAM) {\n this.outputStatus(status, 'REFUSED');\n }\n else {\n this.outputStatus(status, 'PROCESSED');\n }\n },\n });\n this.childStartTime = new Date();\n }\n catch (error) {\n this.trace('Failed to start call on picked subchannel ' +\n subchannelString +\n ' with error ' +\n error.message);\n this.outputStatus({\n code: constants_1.Status.INTERNAL,\n details: 'Failed to start HTTP/2 stream with error ' +\n error.message,\n metadata: new metadata_1.Metadata(),\n }, 'NOT_STARTED');\n return;\n }\n (_b = (_a = this.callConfig).onCommitted) === null || _b === void 0 ? void 0 : _b.call(_a);\n (_c = pickResult.onCallStarted) === null || _c === void 0 ? void 0 : _c.call(pickResult);\n this.onCallEnded = pickResult.onCallEnded;\n this.trace('Created child call [' + this.child.getCallNumber() + ']');\n if (this.readPending) {\n this.child.startRead();\n }\n if (this.pendingMessage) {\n this.child.sendMessageWithContext(this.pendingMessage.context, this.pendingMessage.message);\n }\n if (this.pendingHalfClose) {\n this.child.halfClose();\n }\n }, (error) => {\n // We assume the error code isn't 0 (Status.OK)\n const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(typeof error.code === 'number' ? error.code : constants_1.Status.UNKNOWN, `Getting metadata from plugin failed with error: ${error.message}`);\n this.outputStatus({\n code: code,\n details: details,\n metadata: new metadata_1.Metadata(),\n }, 'PROCESSED');\n });\n break;\n case picker_1.PickResultType.DROP:\n const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(pickResult.status.code, pickResult.status.details);\n setImmediate(() => {\n this.outputStatus({ code, details, metadata: pickResult.status.metadata }, 'DROP');\n });\n break;\n case picker_1.PickResultType.TRANSIENT_FAILURE:\n if (this.metadata.getOptions().waitForReady) {\n this.channel.queueCallForPick(this);\n }\n else {\n const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(pickResult.status.code, pickResult.status.details);\n setImmediate(() => {\n this.outputStatus({ code, details, metadata: pickResult.status.metadata }, 'PROCESSED');\n });\n }\n break;\n case picker_1.PickResultType.QUEUE:\n this.channel.queueCallForPick(this);\n }\n }\n cancelWithStatus(status, details) {\n var _a;\n this.trace('cancelWithStatus code: ' + status + ' details: \"' + details + '\"');\n (_a = this.child) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(status, details);\n this.outputStatus({ code: status, details: details, metadata: new metadata_1.Metadata() }, 'PROCESSED');\n }\n getPeer() {\n var _a, _b;\n return (_b = (_a = this.child) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : this.channel.getTarget();\n }\n start(metadata, listener) {\n this.trace('start called');\n this.listener = listener;\n this.metadata = metadata;\n this.doPick();\n }\n sendMessageWithContext(context, message) {\n this.trace('write() called with message of length ' + message.length);\n if (this.child) {\n this.child.sendMessageWithContext(context, message);\n }\n else {\n this.pendingMessage = { context, message };\n }\n }\n startRead() {\n this.trace('startRead called');\n if (this.child) {\n this.child.startRead();\n }\n else {\n this.readPending = true;\n }\n }\n halfClose() {\n this.trace('halfClose called');\n if (this.child) {\n this.child.halfClose();\n }\n else {\n this.pendingHalfClose = true;\n }\n }\n setCredentials(credentials) {\n throw new Error('Method not implemented.');\n }\n getCallNumber() {\n return this.callNumber;\n }\n}\nexports.LoadBalancingCall = LoadBalancingCall;\n//# sourceMappingURL=load-balancing-call.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar _a, _b, _c, _d;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTracerEnabled = exports.trace = exports.log = exports.setLoggerVerbosity = exports.setLogger = exports.getLogger = void 0;\nconst constants_1 = require(\"./constants\");\nconst process_1 = require(\"process\");\nconst clientVersion = require('../../package.json').version;\nconst DEFAULT_LOGGER = {\n error: (message, ...optionalParams) => {\n console.error('E ' + message, ...optionalParams);\n },\n info: (message, ...optionalParams) => {\n console.error('I ' + message, ...optionalParams);\n },\n debug: (message, ...optionalParams) => {\n console.error('D ' + message, ...optionalParams);\n },\n};\nlet _logger = DEFAULT_LOGGER;\nlet _logVerbosity = constants_1.LogVerbosity.ERROR;\nconst verbosityString = (_b = (_a = process.env.GRPC_NODE_VERBOSITY) !== null && _a !== void 0 ? _a : process.env.GRPC_VERBOSITY) !== null && _b !== void 0 ? _b : '';\nswitch (verbosityString.toUpperCase()) {\n case 'DEBUG':\n _logVerbosity = constants_1.LogVerbosity.DEBUG;\n break;\n case 'INFO':\n _logVerbosity = constants_1.LogVerbosity.INFO;\n break;\n case 'ERROR':\n _logVerbosity = constants_1.LogVerbosity.ERROR;\n break;\n case 'NONE':\n _logVerbosity = constants_1.LogVerbosity.NONE;\n break;\n default:\n // Ignore any other values\n}\nconst getLogger = () => {\n return _logger;\n};\nexports.getLogger = getLogger;\nconst setLogger = (logger) => {\n _logger = logger;\n};\nexports.setLogger = setLogger;\nconst setLoggerVerbosity = (verbosity) => {\n _logVerbosity = verbosity;\n};\nexports.setLoggerVerbosity = setLoggerVerbosity;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst log = (severity, ...args) => {\n let logFunction;\n if (severity >= _logVerbosity) {\n switch (severity) {\n case constants_1.LogVerbosity.DEBUG:\n logFunction = _logger.debug;\n break;\n case constants_1.LogVerbosity.INFO:\n logFunction = _logger.info;\n break;\n case constants_1.LogVerbosity.ERROR:\n logFunction = _logger.error;\n break;\n }\n /* Fall back to _logger.error when other methods are not available for\n * compatiblity with older behavior that always logged to _logger.error */\n if (!logFunction) {\n logFunction = _logger.error;\n }\n if (logFunction) {\n logFunction.bind(_logger)(...args);\n }\n }\n};\nexports.log = log;\nconst tracersString = (_d = (_c = process.env.GRPC_NODE_TRACE) !== null && _c !== void 0 ? _c : process.env.GRPC_TRACE) !== null && _d !== void 0 ? _d : '';\nconst enabledTracers = new Set();\nconst disabledTracers = new Set();\nfor (const tracerName of tracersString.split(',')) {\n if (tracerName.startsWith('-')) {\n disabledTracers.add(tracerName.substring(1));\n }\n else {\n enabledTracers.add(tracerName);\n }\n}\nconst allEnabled = enabledTracers.has('all');\nfunction trace(severity, tracer, text) {\n if (isTracerEnabled(tracer)) {\n (0, exports.log)(severity, new Date().toISOString() +\n ' | v' +\n clientVersion +\n ' ' +\n process_1.pid +\n ' | ' +\n tracer +\n ' | ' +\n text);\n }\n}\nexports.trace = trace;\nfunction isTracerEnabled(tracer) {\n return (!disabledTracers.has(tracer) && (allEnabled || enabledTracers.has(tracer)));\n}\nexports.isTracerEnabled = isTracerEnabled;\n//# sourceMappingURL=logging.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loadPackageDefinition = exports.makeClientConstructor = void 0;\nconst client_1 = require(\"./client\");\n/**\n * Map with short names for each of the requester maker functions. Used in\n * makeClientConstructor\n * @private\n */\nconst requesterFuncs = {\n unary: client_1.Client.prototype.makeUnaryRequest,\n server_stream: client_1.Client.prototype.makeServerStreamRequest,\n client_stream: client_1.Client.prototype.makeClientStreamRequest,\n bidi: client_1.Client.prototype.makeBidiStreamRequest,\n};\n/**\n * Returns true, if given key is included in the blacklisted\n * keys.\n * @param key key for check, string.\n */\nfunction isPrototypePolluted(key) {\n return ['__proto__', 'prototype', 'constructor'].includes(key);\n}\n/**\n * Creates a constructor for a client with the given methods, as specified in\n * the methods argument. The resulting class will have an instance method for\n * each method in the service, which is a partial application of one of the\n * [Client]{@link grpc.Client} request methods, depending on `requestSerialize`\n * and `responseSerialize`, with the `method`, `serialize`, and `deserialize`\n * arguments predefined.\n * @param methods An object mapping method names to\n * method attributes\n * @param serviceName The fully qualified name of the service\n * @param classOptions An options object.\n * @return New client constructor, which is a subclass of\n * {@link grpc.Client}, and has the same arguments as that constructor.\n */\nfunction makeClientConstructor(methods, serviceName, classOptions) {\n if (!classOptions) {\n classOptions = {};\n }\n class ServiceClientImpl extends client_1.Client {\n }\n Object.keys(methods).forEach(name => {\n if (isPrototypePolluted(name)) {\n return;\n }\n const attrs = methods[name];\n let methodType;\n // TODO(murgatroid99): Verify that we don't need this anymore\n if (typeof name === 'string' && name.charAt(0) === '$') {\n throw new Error('Method names cannot start with $');\n }\n if (attrs.requestStream) {\n if (attrs.responseStream) {\n methodType = 'bidi';\n }\n else {\n methodType = 'client_stream';\n }\n }\n else {\n if (attrs.responseStream) {\n methodType = 'server_stream';\n }\n else {\n methodType = 'unary';\n }\n }\n const serialize = attrs.requestSerialize;\n const deserialize = attrs.responseDeserialize;\n const methodFunc = partial(requesterFuncs[methodType], attrs.path, serialize, deserialize);\n ServiceClientImpl.prototype[name] = methodFunc;\n // Associate all provided attributes with the method\n Object.assign(ServiceClientImpl.prototype[name], attrs);\n if (attrs.originalName && !isPrototypePolluted(attrs.originalName)) {\n ServiceClientImpl.prototype[attrs.originalName] =\n ServiceClientImpl.prototype[name];\n }\n });\n ServiceClientImpl.service = methods;\n ServiceClientImpl.serviceName = serviceName;\n return ServiceClientImpl;\n}\nexports.makeClientConstructor = makeClientConstructor;\nfunction partial(fn, path, serialize, deserialize) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (...args) {\n return fn.call(this, path, serialize, deserialize, ...args);\n };\n}\nfunction isProtobufTypeDefinition(obj) {\n return 'format' in obj;\n}\n/**\n * Load a gRPC package definition as a gRPC object hierarchy.\n * @param packageDef The package definition object.\n * @return The resulting gRPC object.\n */\nfunction loadPackageDefinition(packageDef) {\n const result = {};\n for (const serviceFqn in packageDef) {\n if (Object.prototype.hasOwnProperty.call(packageDef, serviceFqn)) {\n const service = packageDef[serviceFqn];\n const nameComponents = serviceFqn.split('.');\n if (nameComponents.some((comp) => isPrototypePolluted(comp))) {\n continue;\n }\n const serviceName = nameComponents[nameComponents.length - 1];\n let current = result;\n for (const packageName of nameComponents.slice(0, -1)) {\n if (!current[packageName]) {\n current[packageName] = {};\n }\n current = current[packageName];\n }\n if (isProtobufTypeDefinition(service)) {\n current[serviceName] = service;\n }\n else {\n current[serviceName] = makeClientConstructor(service, serviceName, {});\n }\n }\n }\n return result;\n}\nexports.loadPackageDefinition = loadPackageDefinition;\n//# sourceMappingURL=make-client.js.map","\"use strict\";\n/*\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MaxMessageSizeFilterFactory = exports.MaxMessageSizeFilter = void 0;\nconst filter_1 = require(\"./filter\");\nconst constants_1 = require(\"./constants\");\nconst metadata_1 = require(\"./metadata\");\nclass MaxMessageSizeFilter extends filter_1.BaseFilter {\n constructor(options) {\n super();\n this.maxSendMessageSize = constants_1.DEFAULT_MAX_SEND_MESSAGE_LENGTH;\n this.maxReceiveMessageSize = constants_1.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;\n if ('grpc.max_send_message_length' in options) {\n this.maxSendMessageSize = options['grpc.max_send_message_length'];\n }\n if ('grpc.max_receive_message_length' in options) {\n this.maxReceiveMessageSize = options['grpc.max_receive_message_length'];\n }\n }\n async sendMessage(message) {\n /* A configured size of -1 means that there is no limit, so skip the check\n * entirely */\n if (this.maxSendMessageSize === -1) {\n return message;\n }\n else {\n const concreteMessage = await message;\n if (concreteMessage.message.length > this.maxSendMessageSize) {\n throw {\n code: constants_1.Status.RESOURCE_EXHAUSTED,\n details: `Sent message larger than max (${concreteMessage.message.length} vs. ${this.maxSendMessageSize})`,\n metadata: new metadata_1.Metadata(),\n };\n }\n else {\n return concreteMessage;\n }\n }\n }\n async receiveMessage(message) {\n /* A configured size of -1 means that there is no limit, so skip the check\n * entirely */\n if (this.maxReceiveMessageSize === -1) {\n return message;\n }\n else {\n const concreteMessage = await message;\n if (concreteMessage.length > this.maxReceiveMessageSize) {\n throw {\n code: constants_1.Status.RESOURCE_EXHAUSTED,\n details: `Received message larger than max (${concreteMessage.length} vs. ${this.maxReceiveMessageSize})`,\n metadata: new metadata_1.Metadata(),\n };\n }\n else {\n return concreteMessage;\n }\n }\n }\n}\nexports.MaxMessageSizeFilter = MaxMessageSizeFilter;\nclass MaxMessageSizeFilterFactory {\n constructor(options) {\n this.options = options;\n }\n createFilter() {\n return new MaxMessageSizeFilter(this.options);\n }\n}\nexports.MaxMessageSizeFilterFactory = MaxMessageSizeFilterFactory;\n//# sourceMappingURL=max-message-size-filter.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Metadata = void 0;\nconst logging_1 = require(\"./logging\");\nconst constants_1 = require(\"./constants\");\nconst error_1 = require(\"./error\");\nconst LEGAL_KEY_REGEX = /^[0-9a-z_.-]+$/;\nconst LEGAL_NON_BINARY_VALUE_REGEX = /^[ -~]*$/;\nfunction isLegalKey(key) {\n return LEGAL_KEY_REGEX.test(key);\n}\nfunction isLegalNonBinaryValue(value) {\n return LEGAL_NON_BINARY_VALUE_REGEX.test(value);\n}\nfunction isBinaryKey(key) {\n return key.endsWith('-bin');\n}\nfunction isCustomMetadata(key) {\n return !key.startsWith('grpc-');\n}\nfunction normalizeKey(key) {\n return key.toLowerCase();\n}\nfunction validate(key, value) {\n if (!isLegalKey(key)) {\n throw new Error('Metadata key \"' + key + '\" contains illegal characters');\n }\n if (value !== null && value !== undefined) {\n if (isBinaryKey(key)) {\n if (!Buffer.isBuffer(value)) {\n throw new Error(\"keys that end with '-bin' must have Buffer values\");\n }\n }\n else {\n if (Buffer.isBuffer(value)) {\n throw new Error(\"keys that don't end with '-bin' must have String values\");\n }\n if (!isLegalNonBinaryValue(value)) {\n throw new Error('Metadata string value \"' + value + '\" contains illegal characters');\n }\n }\n }\n}\n/**\n * A class for storing metadata. Keys are normalized to lowercase ASCII.\n */\nclass Metadata {\n constructor(options = {}) {\n this.internalRepr = new Map();\n this.options = options;\n }\n /**\n * Sets the given value for the given key by replacing any other values\n * associated with that key. Normalizes the key.\n * @param key The key to whose value should be set.\n * @param value The value to set. Must be a buffer if and only\n * if the normalized key ends with '-bin'.\n */\n set(key, value) {\n key = normalizeKey(key);\n validate(key, value);\n this.internalRepr.set(key, [value]);\n }\n /**\n * Adds the given value for the given key by appending to a list of previous\n * values associated with that key. Normalizes the key.\n * @param key The key for which a new value should be appended.\n * @param value The value to add. Must be a buffer if and only\n * if the normalized key ends with '-bin'.\n */\n add(key, value) {\n key = normalizeKey(key);\n validate(key, value);\n const existingValue = this.internalRepr.get(key);\n if (existingValue === undefined) {\n this.internalRepr.set(key, [value]);\n }\n else {\n existingValue.push(value);\n }\n }\n /**\n * Removes the given key and any associated values. Normalizes the key.\n * @param key The key whose values should be removed.\n */\n remove(key) {\n key = normalizeKey(key);\n // validate(key);\n this.internalRepr.delete(key);\n }\n /**\n * Gets a list of all values associated with the key. Normalizes the key.\n * @param key The key whose value should be retrieved.\n * @return A list of values associated with the given key.\n */\n get(key) {\n key = normalizeKey(key);\n // validate(key);\n return this.internalRepr.get(key) || [];\n }\n /**\n * Gets a plain object mapping each key to the first value associated with it.\n * This reflects the most common way that people will want to see metadata.\n * @return A key/value mapping of the metadata.\n */\n getMap() {\n const result = {};\n for (const [key, values] of this.internalRepr) {\n if (values.length > 0) {\n const v = values[0];\n result[key] = Buffer.isBuffer(v) ? Buffer.from(v) : v;\n }\n }\n return result;\n }\n /**\n * Clones the metadata object.\n * @return The newly cloned object.\n */\n clone() {\n const newMetadata = new Metadata(this.options);\n const newInternalRepr = newMetadata.internalRepr;\n for (const [key, value] of this.internalRepr) {\n const clonedValue = value.map(v => {\n if (Buffer.isBuffer(v)) {\n return Buffer.from(v);\n }\n else {\n return v;\n }\n });\n newInternalRepr.set(key, clonedValue);\n }\n return newMetadata;\n }\n /**\n * Merges all key-value pairs from a given Metadata object into this one.\n * If both this object and the given object have values in the same key,\n * values from the other Metadata object will be appended to this object's\n * values.\n * @param other A Metadata object.\n */\n merge(other) {\n for (const [key, values] of other.internalRepr) {\n const mergedValue = (this.internalRepr.get(key) || []).concat(values);\n this.internalRepr.set(key, mergedValue);\n }\n }\n setOptions(options) {\n this.options = options;\n }\n getOptions() {\n return this.options;\n }\n /**\n * Creates an OutgoingHttpHeaders object that can be used with the http2 API.\n */\n toHttp2Headers() {\n // NOTE: Node <8.9 formats http2 headers incorrectly.\n const result = {};\n for (const [key, values] of this.internalRepr) {\n // We assume that the user's interaction with this object is limited to\n // through its public API (i.e. keys and values are already validated).\n result[key] = values.map(bufToString);\n }\n return result;\n }\n /**\n * This modifies the behavior of JSON.stringify to show an object\n * representation of the metadata map.\n */\n toJSON() {\n const result = {};\n for (const [key, values] of this.internalRepr) {\n result[key] = values;\n }\n return result;\n }\n /**\n * Returns a new Metadata object based fields in a given IncomingHttpHeaders\n * object.\n * @param headers An IncomingHttpHeaders object.\n */\n static fromHttp2Headers(headers) {\n const result = new Metadata();\n for (const key of Object.keys(headers)) {\n // Reserved headers (beginning with `:`) are not valid keys.\n if (key.charAt(0) === ':') {\n continue;\n }\n const values = headers[key];\n try {\n if (isBinaryKey(key)) {\n if (Array.isArray(values)) {\n values.forEach(value => {\n result.add(key, Buffer.from(value, 'base64'));\n });\n }\n else if (values !== undefined) {\n if (isCustomMetadata(key)) {\n values.split(',').forEach(v => {\n result.add(key, Buffer.from(v.trim(), 'base64'));\n });\n }\n else {\n result.add(key, Buffer.from(values, 'base64'));\n }\n }\n }\n else {\n if (Array.isArray(values)) {\n values.forEach(value => {\n result.add(key, value);\n });\n }\n else if (values !== undefined) {\n result.add(key, values);\n }\n }\n }\n catch (error) {\n const message = `Failed to add metadata entry ${key}: ${values}. ${(0, error_1.getErrorMessage)(error)}. For more information see https://github.com/grpc/grpc-node/issues/1173`;\n (0, logging_1.log)(constants_1.LogVerbosity.ERROR, message);\n }\n }\n return result;\n }\n}\nexports.Metadata = Metadata;\nconst bufToString = (val) => {\n return Buffer.isBuffer(val) ? val.toString('base64') : val;\n};\n//# sourceMappingURL=metadata.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.QueuePicker = exports.UnavailablePicker = exports.PickResultType = void 0;\nconst metadata_1 = require(\"./metadata\");\nconst constants_1 = require(\"./constants\");\nvar PickResultType;\n(function (PickResultType) {\n PickResultType[PickResultType[\"COMPLETE\"] = 0] = \"COMPLETE\";\n PickResultType[PickResultType[\"QUEUE\"] = 1] = \"QUEUE\";\n PickResultType[PickResultType[\"TRANSIENT_FAILURE\"] = 2] = \"TRANSIENT_FAILURE\";\n PickResultType[PickResultType[\"DROP\"] = 3] = \"DROP\";\n})(PickResultType || (exports.PickResultType = PickResultType = {}));\n/**\n * A standard picker representing a load balancer in the TRANSIENT_FAILURE\n * state. Always responds to every pick request with an UNAVAILABLE status.\n */\nclass UnavailablePicker {\n constructor(status) {\n this.status = Object.assign({ code: constants_1.Status.UNAVAILABLE, details: 'No connection established', metadata: new metadata_1.Metadata() }, status);\n }\n pick(pickArgs) {\n return {\n pickResultType: PickResultType.TRANSIENT_FAILURE,\n subchannel: null,\n status: this.status,\n onCallStarted: null,\n onCallEnded: null,\n };\n }\n}\nexports.UnavailablePicker = UnavailablePicker;\n/**\n * A standard picker representing a load balancer in the IDLE or CONNECTING\n * state. Always responds to every pick request with a QUEUE pick result\n * indicating that the pick should be tried again with the next `Picker`. Also\n * reports back to the load balancer that a connection should be established\n * once any pick is attempted.\n * If the childPicker is provided, delegate to it instead of returning the\n * hardcoded QUEUE pick result, but still calls exitIdle.\n */\nclass QueuePicker {\n // Constructed with a load balancer. Calls exitIdle on it the first time pick is called\n constructor(loadBalancer, childPicker) {\n this.loadBalancer = loadBalancer;\n this.childPicker = childPicker;\n this.calledExitIdle = false;\n }\n pick(pickArgs) {\n if (!this.calledExitIdle) {\n process.nextTick(() => {\n this.loadBalancer.exitIdle();\n });\n this.calledExitIdle = true;\n }\n if (this.childPicker) {\n return this.childPicker.pick(pickArgs);\n }\n else {\n return {\n pickResultType: PickResultType.QUEUE,\n subchannel: null,\n status: null,\n onCallStarted: null,\n onCallEnded: null,\n };\n }\n }\n}\nexports.QueuePicker = QueuePicker;\n//# sourceMappingURL=picker.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setup = exports.DEFAULT_PORT = void 0;\nconst resolver_1 = require(\"./resolver\");\nconst dns = require(\"dns\");\nconst util = require(\"util\");\nconst service_config_1 = require(\"./service-config\");\nconst constants_1 = require(\"./constants\");\nconst metadata_1 = require(\"./metadata\");\nconst logging = require(\"./logging\");\nconst constants_2 = require(\"./constants\");\nconst uri_parser_1 = require(\"./uri-parser\");\nconst net_1 = require(\"net\");\nconst backoff_timeout_1 = require(\"./backoff-timeout\");\nconst TRACER_NAME = 'dns_resolver';\nfunction trace(text) {\n logging.trace(constants_2.LogVerbosity.DEBUG, TRACER_NAME, text);\n}\n/**\n * The default TCP port to connect to if not explicitly specified in the target.\n */\nexports.DEFAULT_PORT = 443;\nconst DEFAULT_MIN_TIME_BETWEEN_RESOLUTIONS_MS = 30000;\nconst resolveTxtPromise = util.promisify(dns.resolveTxt);\nconst dnsLookupPromise = util.promisify(dns.lookup);\n/**\n * Resolver implementation that handles DNS names and IP addresses.\n */\nclass DnsResolver {\n constructor(target, listener, channelOptions) {\n var _a, _b, _c;\n this.target = target;\n this.listener = listener;\n this.pendingLookupPromise = null;\n this.pendingTxtPromise = null;\n this.latestLookupResult = null;\n this.latestServiceConfig = null;\n this.latestServiceConfigError = null;\n this.continueResolving = false;\n this.isNextResolutionTimerRunning = false;\n this.isServiceConfigEnabled = true;\n this.returnedIpResult = false;\n trace('Resolver constructed for target ' + (0, uri_parser_1.uriToString)(target));\n const hostPort = (0, uri_parser_1.splitHostPort)(target.path);\n if (hostPort === null) {\n this.ipResult = null;\n this.dnsHostname = null;\n this.port = null;\n }\n else {\n if ((0, net_1.isIPv4)(hostPort.host) || (0, net_1.isIPv6)(hostPort.host)) {\n this.ipResult = [\n {\n addresses: [\n {\n host: hostPort.host,\n port: (_a = hostPort.port) !== null && _a !== void 0 ? _a : exports.DEFAULT_PORT,\n },\n ],\n },\n ];\n this.dnsHostname = null;\n this.port = null;\n }\n else {\n this.ipResult = null;\n this.dnsHostname = hostPort.host;\n this.port = (_b = hostPort.port) !== null && _b !== void 0 ? _b : exports.DEFAULT_PORT;\n }\n }\n this.percentage = Math.random() * 100;\n if (channelOptions['grpc.service_config_disable_resolution'] === 1) {\n this.isServiceConfigEnabled = false;\n }\n this.defaultResolutionError = {\n code: constants_1.Status.UNAVAILABLE,\n details: `Name resolution failed for target ${(0, uri_parser_1.uriToString)(this.target)}`,\n metadata: new metadata_1.Metadata(),\n };\n const backoffOptions = {\n initialDelay: channelOptions['grpc.initial_reconnect_backoff_ms'],\n maxDelay: channelOptions['grpc.max_reconnect_backoff_ms'],\n };\n this.backoff = new backoff_timeout_1.BackoffTimeout(() => {\n if (this.continueResolving) {\n this.startResolutionWithBackoff();\n }\n }, backoffOptions);\n this.backoff.unref();\n this.minTimeBetweenResolutionsMs =\n (_c = channelOptions['grpc.dns_min_time_between_resolutions_ms']) !== null && _c !== void 0 ? _c : DEFAULT_MIN_TIME_BETWEEN_RESOLUTIONS_MS;\n this.nextResolutionTimer = setTimeout(() => { }, 0);\n clearTimeout(this.nextResolutionTimer);\n }\n /**\n * If the target is an IP address, just provide that address as a result.\n * Otherwise, initiate A, AAAA, and TXT lookups\n */\n startResolution() {\n if (this.ipResult !== null) {\n if (!this.returnedIpResult) {\n trace('Returning IP address for target ' + (0, uri_parser_1.uriToString)(this.target));\n setImmediate(() => {\n this.listener.onSuccessfulResolution(this.ipResult, null, null, null, {});\n });\n this.returnedIpResult = true;\n }\n this.backoff.stop();\n this.backoff.reset();\n this.stopNextResolutionTimer();\n return;\n }\n if (this.dnsHostname === null) {\n trace('Failed to parse DNS address ' + (0, uri_parser_1.uriToString)(this.target));\n setImmediate(() => {\n this.listener.onError({\n code: constants_1.Status.UNAVAILABLE,\n details: `Failed to parse DNS address ${(0, uri_parser_1.uriToString)(this.target)}`,\n metadata: new metadata_1.Metadata(),\n });\n });\n this.stopNextResolutionTimer();\n }\n else {\n if (this.pendingLookupPromise !== null) {\n return;\n }\n trace('Looking up DNS hostname ' + this.dnsHostname);\n /* We clear out latestLookupResult here to ensure that it contains the\n * latest result since the last time we started resolving. That way, the\n * TXT resolution handler can use it, but only if it finishes second. We\n * don't clear out any previous service config results because it's\n * better to use a service config that's slightly out of date than to\n * revert to an effectively blank one. */\n this.latestLookupResult = null;\n const hostname = this.dnsHostname;\n /* We lookup both address families here and then split them up later\n * because when looking up a single family, dns.lookup outputs an error\n * if the name exists but there are no records for that family, and that\n * error is indistinguishable from other kinds of errors */\n this.pendingLookupPromise = dnsLookupPromise(hostname, { all: true });\n this.pendingLookupPromise.then(addressList => {\n if (this.pendingLookupPromise === null) {\n return;\n }\n this.pendingLookupPromise = null;\n this.backoff.reset();\n this.backoff.stop();\n const subchannelAddresses = addressList.map(addr => ({ host: addr.address, port: +this.port }));\n this.latestLookupResult = subchannelAddresses.map(address => ({\n addresses: [address],\n }));\n const allAddressesString = '[' +\n subchannelAddresses\n .map(addr => addr.host + ':' + addr.port)\n .join(',') +\n ']';\n trace('Resolved addresses for target ' +\n (0, uri_parser_1.uriToString)(this.target) +\n ': ' +\n allAddressesString);\n if (this.latestLookupResult.length === 0) {\n this.listener.onError(this.defaultResolutionError);\n return;\n }\n /* If the TXT lookup has not yet finished, both of the last two\n * arguments will be null, which is the equivalent of getting an\n * empty TXT response. When the TXT lookup does finish, its handler\n * can update the service config by using the same address list */\n this.listener.onSuccessfulResolution(this.latestLookupResult, this.latestServiceConfig, this.latestServiceConfigError, null, {});\n }, err => {\n if (this.pendingLookupPromise === null) {\n return;\n }\n trace('Resolution error for target ' +\n (0, uri_parser_1.uriToString)(this.target) +\n ': ' +\n err.message);\n this.pendingLookupPromise = null;\n this.stopNextResolutionTimer();\n this.listener.onError(this.defaultResolutionError);\n });\n /* If there already is a still-pending TXT resolution, we can just use\n * that result when it comes in */\n if (this.isServiceConfigEnabled && this.pendingTxtPromise === null) {\n /* We handle the TXT query promise differently than the others because\n * the name resolution attempt as a whole is a success even if the TXT\n * lookup fails */\n this.pendingTxtPromise = resolveTxtPromise(hostname);\n this.pendingTxtPromise.then(txtRecord => {\n if (this.pendingTxtPromise === null) {\n return;\n }\n this.pendingTxtPromise = null;\n try {\n this.latestServiceConfig = (0, service_config_1.extractAndSelectServiceConfig)(txtRecord, this.percentage);\n }\n catch (err) {\n this.latestServiceConfigError = {\n code: constants_1.Status.UNAVAILABLE,\n details: `Parsing service config failed with error ${err.message}`,\n metadata: new metadata_1.Metadata(),\n };\n }\n if (this.latestLookupResult !== null) {\n /* We rely here on the assumption that calling this function with\n * identical parameters will be essentialy idempotent, and calling\n * it with the same address list and a different service config\n * should result in a fast and seamless switchover. */\n this.listener.onSuccessfulResolution(this.latestLookupResult, this.latestServiceConfig, this.latestServiceConfigError, null, {});\n }\n }, err => {\n /* If TXT lookup fails we should do nothing, which means that we\n * continue to use the result of the most recent successful lookup,\n * or the default null config object if there has never been a\n * successful lookup. We do not set the latestServiceConfigError\n * here because that is specifically used for response validation\n * errors. We still need to handle this error so that it does not\n * bubble up as an unhandled promise rejection. */\n });\n }\n }\n }\n startNextResolutionTimer() {\n var _a, _b;\n clearTimeout(this.nextResolutionTimer);\n this.nextResolutionTimer = setTimeout(() => {\n this.stopNextResolutionTimer();\n if (this.continueResolving) {\n this.startResolutionWithBackoff();\n }\n }, this.minTimeBetweenResolutionsMs);\n (_b = (_a = this.nextResolutionTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n this.isNextResolutionTimerRunning = true;\n }\n stopNextResolutionTimer() {\n clearTimeout(this.nextResolutionTimer);\n this.isNextResolutionTimerRunning = false;\n }\n startResolutionWithBackoff() {\n if (this.pendingLookupPromise === null) {\n this.continueResolving = false;\n this.backoff.runOnce();\n this.startNextResolutionTimer();\n this.startResolution();\n }\n }\n updateResolution() {\n /* If there is a pending lookup, just let it finish. Otherwise, if the\n * nextResolutionTimer or backoff timer is running, set the\n * continueResolving flag to resolve when whichever of those timers\n * fires. Otherwise, start resolving immediately. */\n if (this.pendingLookupPromise === null) {\n if (this.isNextResolutionTimerRunning || this.backoff.isRunning()) {\n if (this.isNextResolutionTimerRunning) {\n trace('resolution update delayed by \"min time between resolutions\" rate limit');\n }\n else {\n trace('resolution update delayed by backoff timer until ' +\n this.backoff.getEndTime().toISOString());\n }\n this.continueResolving = true;\n }\n else {\n this.startResolutionWithBackoff();\n }\n }\n }\n /**\n * Reset the resolver to the same state it had when it was created. In-flight\n * DNS requests cannot be cancelled, but they are discarded and their results\n * will be ignored.\n */\n destroy() {\n this.continueResolving = false;\n this.backoff.reset();\n this.backoff.stop();\n this.stopNextResolutionTimer();\n this.pendingLookupPromise = null;\n this.pendingTxtPromise = null;\n this.latestLookupResult = null;\n this.latestServiceConfig = null;\n this.latestServiceConfigError = null;\n this.returnedIpResult = false;\n }\n /**\n * Get the default authority for the given target. For IP targets, that is\n * the IP address. For DNS targets, it is the hostname.\n * @param target\n */\n static getDefaultAuthority(target) {\n return target.path;\n }\n}\n/**\n * Set up the DNS resolver class by registering it as the handler for the\n * \"dns:\" prefix and as the default resolver.\n */\nfunction setup() {\n (0, resolver_1.registerResolver)('dns', DnsResolver);\n (0, resolver_1.registerDefaultScheme)('dns');\n}\nexports.setup = setup;\n//# sourceMappingURL=resolver-dns.js.map","\"use strict\";\n/*\n * Copyright 2021 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setup = void 0;\nconst net_1 = require(\"net\");\nconst constants_1 = require(\"./constants\");\nconst metadata_1 = require(\"./metadata\");\nconst resolver_1 = require(\"./resolver\");\nconst uri_parser_1 = require(\"./uri-parser\");\nconst logging = require(\"./logging\");\nconst TRACER_NAME = 'ip_resolver';\nfunction trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);\n}\nconst IPV4_SCHEME = 'ipv4';\nconst IPV6_SCHEME = 'ipv6';\n/**\n * The default TCP port to connect to if not explicitly specified in the target.\n */\nconst DEFAULT_PORT = 443;\nclass IpResolver {\n constructor(target, listener, channelOptions) {\n var _a;\n this.listener = listener;\n this.endpoints = [];\n this.error = null;\n this.hasReturnedResult = false;\n trace('Resolver constructed for target ' + (0, uri_parser_1.uriToString)(target));\n const addresses = [];\n if (!(target.scheme === IPV4_SCHEME || target.scheme === IPV6_SCHEME)) {\n this.error = {\n code: constants_1.Status.UNAVAILABLE,\n details: `Unrecognized scheme ${target.scheme} in IP resolver`,\n metadata: new metadata_1.Metadata(),\n };\n return;\n }\n const pathList = target.path.split(',');\n for (const path of pathList) {\n const hostPort = (0, uri_parser_1.splitHostPort)(path);\n if (hostPort === null) {\n this.error = {\n code: constants_1.Status.UNAVAILABLE,\n details: `Failed to parse ${target.scheme} address ${path}`,\n metadata: new metadata_1.Metadata(),\n };\n return;\n }\n if ((target.scheme === IPV4_SCHEME && !(0, net_1.isIPv4)(hostPort.host)) ||\n (target.scheme === IPV6_SCHEME && !(0, net_1.isIPv6)(hostPort.host))) {\n this.error = {\n code: constants_1.Status.UNAVAILABLE,\n details: `Failed to parse ${target.scheme} address ${path}`,\n metadata: new metadata_1.Metadata(),\n };\n return;\n }\n addresses.push({\n host: hostPort.host,\n port: (_a = hostPort.port) !== null && _a !== void 0 ? _a : DEFAULT_PORT,\n });\n }\n this.endpoints = addresses.map(address => ({ addresses: [address] }));\n trace('Parsed ' + target.scheme + ' address list ' + addresses);\n }\n updateResolution() {\n if (!this.hasReturnedResult) {\n this.hasReturnedResult = true;\n process.nextTick(() => {\n if (this.error) {\n this.listener.onError(this.error);\n }\n else {\n this.listener.onSuccessfulResolution(this.endpoints, null, null, null, {});\n }\n });\n }\n }\n destroy() {\n this.hasReturnedResult = false;\n }\n static getDefaultAuthority(target) {\n return target.path.split(',')[0];\n }\n}\nfunction setup() {\n (0, resolver_1.registerResolver)(IPV4_SCHEME, IpResolver);\n (0, resolver_1.registerResolver)(IPV6_SCHEME, IpResolver);\n}\nexports.setup = setup;\n//# sourceMappingURL=resolver-ip.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setup = void 0;\nconst resolver_1 = require(\"./resolver\");\nclass UdsResolver {\n constructor(target, listener, channelOptions) {\n this.listener = listener;\n this.hasReturnedResult = false;\n this.endpoints = [];\n let path;\n if (target.authority === '') {\n path = '/' + target.path;\n }\n else {\n path = target.path;\n }\n this.endpoints = [{ addresses: [{ path }] }];\n }\n updateResolution() {\n if (!this.hasReturnedResult) {\n this.hasReturnedResult = true;\n process.nextTick(this.listener.onSuccessfulResolution, this.endpoints, null, null, null, {});\n }\n }\n destroy() {\n // This resolver owns no resources, so we do nothing here.\n }\n static getDefaultAuthority(target) {\n return 'localhost';\n }\n}\nfunction setup() {\n (0, resolver_1.registerResolver)('unix', UdsResolver);\n}\nexports.setup = setup;\n//# sourceMappingURL=resolver-uds.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mapUriDefaultScheme = exports.getDefaultAuthority = exports.createResolver = exports.registerDefaultScheme = exports.registerResolver = void 0;\nconst uri_parser_1 = require(\"./uri-parser\");\nconst registeredResolvers = {};\nlet defaultScheme = null;\n/**\n * Register a resolver class to handle target names prefixed with the `prefix`\n * string. This prefix should correspond to a URI scheme name listed in the\n * [gRPC Name Resolution document](https://github.com/grpc/grpc/blob/master/doc/naming.md)\n * @param prefix\n * @param resolverClass\n */\nfunction registerResolver(scheme, resolverClass) {\n registeredResolvers[scheme] = resolverClass;\n}\nexports.registerResolver = registerResolver;\n/**\n * Register a default resolver to handle target names that do not start with\n * any registered prefix.\n * @param resolverClass\n */\nfunction registerDefaultScheme(scheme) {\n defaultScheme = scheme;\n}\nexports.registerDefaultScheme = registerDefaultScheme;\n/**\n * Create a name resolver for the specified target, if possible. Throws an\n * error if no such name resolver can be created.\n * @param target\n * @param listener\n */\nfunction createResolver(target, listener, options) {\n if (target.scheme !== undefined && target.scheme in registeredResolvers) {\n return new registeredResolvers[target.scheme](target, listener, options);\n }\n else {\n throw new Error(`No resolver could be created for target ${(0, uri_parser_1.uriToString)(target)}`);\n }\n}\nexports.createResolver = createResolver;\n/**\n * Get the default authority for the specified target, if possible. Throws an\n * error if no registered name resolver can parse that target string.\n * @param target\n */\nfunction getDefaultAuthority(target) {\n if (target.scheme !== undefined && target.scheme in registeredResolvers) {\n return registeredResolvers[target.scheme].getDefaultAuthority(target);\n }\n else {\n throw new Error(`Invalid target ${(0, uri_parser_1.uriToString)(target)}`);\n }\n}\nexports.getDefaultAuthority = getDefaultAuthority;\nfunction mapUriDefaultScheme(target) {\n if (target.scheme === undefined || !(target.scheme in registeredResolvers)) {\n if (defaultScheme !== null) {\n return {\n scheme: defaultScheme,\n authority: undefined,\n path: (0, uri_parser_1.uriToString)(target),\n };\n }\n else {\n return null;\n }\n }\n return target;\n}\nexports.mapUriDefaultScheme = mapUriDefaultScheme;\n//# sourceMappingURL=resolver.js.map","\"use strict\";\n/*\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResolvingCall = void 0;\nconst constants_1 = require(\"./constants\");\nconst deadline_1 = require(\"./deadline\");\nconst metadata_1 = require(\"./metadata\");\nconst logging = require(\"./logging\");\nconst control_plane_status_1 = require(\"./control-plane-status\");\nconst TRACER_NAME = 'resolving_call';\nclass ResolvingCall {\n constructor(channel, method, options, filterStackFactory, credentials, callNumber) {\n this.channel = channel;\n this.method = method;\n this.filterStackFactory = filterStackFactory;\n this.credentials = credentials;\n this.callNumber = callNumber;\n this.child = null;\n this.readPending = false;\n this.pendingMessage = null;\n this.pendingHalfClose = false;\n this.ended = false;\n this.readFilterPending = false;\n this.writeFilterPending = false;\n this.pendingChildStatus = null;\n this.metadata = null;\n this.listener = null;\n this.statusWatchers = [];\n this.deadlineTimer = setTimeout(() => { }, 0);\n this.filterStack = null;\n this.deadlineStartTime = null;\n this.configReceivedTime = null;\n this.childStartTime = null;\n this.deadline = options.deadline;\n this.host = options.host;\n if (options.parentCall) {\n if (options.flags & constants_1.Propagate.CANCELLATION) {\n options.parentCall.on('cancelled', () => {\n this.cancelWithStatus(constants_1.Status.CANCELLED, 'Cancelled by parent call');\n });\n }\n if (options.flags & constants_1.Propagate.DEADLINE) {\n this.trace('Propagating deadline from parent: ' +\n options.parentCall.getDeadline());\n this.deadline = (0, deadline_1.minDeadline)(this.deadline, options.parentCall.getDeadline());\n }\n }\n this.trace('Created');\n this.runDeadlineTimer();\n }\n trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '[' + this.callNumber + '] ' + text);\n }\n runDeadlineTimer() {\n clearTimeout(this.deadlineTimer);\n this.deadlineStartTime = new Date();\n this.trace('Deadline: ' + (0, deadline_1.deadlineToString)(this.deadline));\n const timeout = (0, deadline_1.getRelativeTimeout)(this.deadline);\n if (timeout !== Infinity) {\n this.trace('Deadline will be reached in ' + timeout + 'ms');\n const handleDeadline = () => {\n if (!this.deadlineStartTime) {\n this.cancelWithStatus(constants_1.Status.DEADLINE_EXCEEDED, 'Deadline exceeded');\n return;\n }\n const deadlineInfo = [];\n const deadlineEndTime = new Date();\n deadlineInfo.push(`Deadline exceeded after ${(0, deadline_1.formatDateDifference)(this.deadlineStartTime, deadlineEndTime)}`);\n if (this.configReceivedTime) {\n if (this.configReceivedTime > this.deadlineStartTime) {\n deadlineInfo.push(`name resolution: ${(0, deadline_1.formatDateDifference)(this.deadlineStartTime, this.configReceivedTime)}`);\n }\n if (this.childStartTime) {\n if (this.childStartTime > this.configReceivedTime) {\n deadlineInfo.push(`metadata filters: ${(0, deadline_1.formatDateDifference)(this.configReceivedTime, this.childStartTime)}`);\n }\n }\n else {\n deadlineInfo.push('waiting for metadata filters');\n }\n }\n else {\n deadlineInfo.push('waiting for name resolution');\n }\n if (this.child) {\n deadlineInfo.push(...this.child.getDeadlineInfo());\n }\n this.cancelWithStatus(constants_1.Status.DEADLINE_EXCEEDED, deadlineInfo.join(','));\n };\n if (timeout <= 0) {\n process.nextTick(handleDeadline);\n }\n else {\n this.deadlineTimer = setTimeout(handleDeadline, timeout);\n }\n }\n }\n outputStatus(status) {\n if (!this.ended) {\n this.ended = true;\n if (!this.filterStack) {\n this.filterStack = this.filterStackFactory.createFilter();\n }\n clearTimeout(this.deadlineTimer);\n const filteredStatus = this.filterStack.receiveTrailers(status);\n this.trace('ended with status: code=' +\n filteredStatus.code +\n ' details=\"' +\n filteredStatus.details +\n '\"');\n this.statusWatchers.forEach(watcher => watcher(filteredStatus));\n process.nextTick(() => {\n var _a;\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveStatus(filteredStatus);\n });\n }\n }\n sendMessageOnChild(context, message) {\n if (!this.child) {\n throw new Error('sendMessageonChild called with child not populated');\n }\n const child = this.child;\n this.writeFilterPending = true;\n this.filterStack.sendMessage(Promise.resolve({ message: message, flags: context.flags })).then(filteredMessage => {\n this.writeFilterPending = false;\n child.sendMessageWithContext(context, filteredMessage.message);\n if (this.pendingHalfClose) {\n child.halfClose();\n }\n }, (status) => {\n this.cancelWithStatus(status.code, status.details);\n });\n }\n getConfig() {\n if (this.ended) {\n return;\n }\n if (!this.metadata || !this.listener) {\n throw new Error('getConfig called before start');\n }\n const configResult = this.channel.getConfig(this.method, this.metadata);\n if (configResult.type === 'NONE') {\n this.channel.queueCallForConfig(this);\n return;\n }\n else if (configResult.type === 'ERROR') {\n if (this.metadata.getOptions().waitForReady) {\n this.channel.queueCallForConfig(this);\n }\n else {\n this.outputStatus(configResult.error);\n }\n return;\n }\n // configResult.type === 'SUCCESS'\n this.configReceivedTime = new Date();\n const config = configResult.config;\n if (config.status !== constants_1.Status.OK) {\n const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(config.status, 'Failed to route call to method ' + this.method);\n this.outputStatus({\n code: code,\n details: details,\n metadata: new metadata_1.Metadata(),\n });\n return;\n }\n if (config.methodConfig.timeout) {\n const configDeadline = new Date();\n configDeadline.setSeconds(configDeadline.getSeconds() + config.methodConfig.timeout.seconds);\n configDeadline.setMilliseconds(configDeadline.getMilliseconds() +\n config.methodConfig.timeout.nanos / 1000000);\n this.deadline = (0, deadline_1.minDeadline)(this.deadline, configDeadline);\n this.runDeadlineTimer();\n }\n this.filterStackFactory.push(config.dynamicFilterFactories);\n this.filterStack = this.filterStackFactory.createFilter();\n this.filterStack.sendMetadata(Promise.resolve(this.metadata)).then(filteredMetadata => {\n this.child = this.channel.createInnerCall(config, this.method, this.host, this.credentials, this.deadline);\n this.trace('Created child [' + this.child.getCallNumber() + ']');\n this.childStartTime = new Date();\n this.child.start(filteredMetadata, {\n onReceiveMetadata: metadata => {\n this.trace('Received metadata');\n this.listener.onReceiveMetadata(this.filterStack.receiveMetadata(metadata));\n },\n onReceiveMessage: message => {\n this.trace('Received message');\n this.readFilterPending = true;\n this.filterStack.receiveMessage(message).then(filteredMesssage => {\n this.trace('Finished filtering received message');\n this.readFilterPending = false;\n this.listener.onReceiveMessage(filteredMesssage);\n if (this.pendingChildStatus) {\n this.outputStatus(this.pendingChildStatus);\n }\n }, (status) => {\n this.cancelWithStatus(status.code, status.details);\n });\n },\n onReceiveStatus: status => {\n this.trace('Received status');\n if (this.readFilterPending) {\n this.pendingChildStatus = status;\n }\n else {\n this.outputStatus(status);\n }\n },\n });\n if (this.readPending) {\n this.child.startRead();\n }\n if (this.pendingMessage) {\n this.sendMessageOnChild(this.pendingMessage.context, this.pendingMessage.message);\n }\n else if (this.pendingHalfClose) {\n this.child.halfClose();\n }\n }, (status) => {\n this.outputStatus(status);\n });\n }\n reportResolverError(status) {\n var _a;\n if ((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.getOptions().waitForReady) {\n this.channel.queueCallForConfig(this);\n }\n else {\n this.outputStatus(status);\n }\n }\n cancelWithStatus(status, details) {\n var _a;\n this.trace('cancelWithStatus code: ' + status + ' details: \"' + details + '\"');\n (_a = this.child) === null || _a === void 0 ? void 0 : _a.cancelWithStatus(status, details);\n this.outputStatus({\n code: status,\n details: details,\n metadata: new metadata_1.Metadata(),\n });\n }\n getPeer() {\n var _a, _b;\n return (_b = (_a = this.child) === null || _a === void 0 ? void 0 : _a.getPeer()) !== null && _b !== void 0 ? _b : this.channel.getTarget();\n }\n start(metadata, listener) {\n this.trace('start called');\n this.metadata = metadata.clone();\n this.listener = listener;\n this.getConfig();\n }\n sendMessageWithContext(context, message) {\n this.trace('write() called with message of length ' + message.length);\n if (this.child) {\n this.sendMessageOnChild(context, message);\n }\n else {\n this.pendingMessage = { context, message };\n }\n }\n startRead() {\n this.trace('startRead called');\n if (this.child) {\n this.child.startRead();\n }\n else {\n this.readPending = true;\n }\n }\n halfClose() {\n this.trace('halfClose called');\n if (this.child && !this.writeFilterPending) {\n this.child.halfClose();\n }\n else {\n this.pendingHalfClose = true;\n }\n }\n setCredentials(credentials) {\n this.credentials = this.credentials.compose(credentials);\n }\n addStatusWatcher(watcher) {\n this.statusWatchers.push(watcher);\n }\n getCallNumber() {\n return this.callNumber;\n }\n}\nexports.ResolvingCall = ResolvingCall;\n//# sourceMappingURL=resolving-call.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResolvingLoadBalancer = void 0;\nconst load_balancer_1 = require(\"./load-balancer\");\nconst service_config_1 = require(\"./service-config\");\nconst connectivity_state_1 = require(\"./connectivity-state\");\nconst resolver_1 = require(\"./resolver\");\nconst picker_1 = require(\"./picker\");\nconst backoff_timeout_1 = require(\"./backoff-timeout\");\nconst constants_1 = require(\"./constants\");\nconst metadata_1 = require(\"./metadata\");\nconst logging = require(\"./logging\");\nconst constants_2 = require(\"./constants\");\nconst uri_parser_1 = require(\"./uri-parser\");\nconst load_balancer_child_handler_1 = require(\"./load-balancer-child-handler\");\nconst TRACER_NAME = 'resolving_load_balancer';\nfunction trace(text) {\n logging.trace(constants_2.LogVerbosity.DEBUG, TRACER_NAME, text);\n}\n/**\n * Name match levels in order from most to least specific. This is the order in\n * which searches will be performed.\n */\nconst NAME_MATCH_LEVEL_ORDER = [\n 'SERVICE_AND_METHOD',\n 'SERVICE',\n 'EMPTY',\n];\nfunction hasMatchingName(service, method, methodConfig, matchLevel) {\n for (const name of methodConfig.name) {\n switch (matchLevel) {\n case 'EMPTY':\n if (!name.service && !name.method) {\n return true;\n }\n break;\n case 'SERVICE':\n if (name.service === service && !name.method) {\n return true;\n }\n break;\n case 'SERVICE_AND_METHOD':\n if (name.service === service && name.method === method) {\n return true;\n }\n }\n }\n return false;\n}\nfunction findMatchingConfig(service, method, methodConfigs, matchLevel) {\n for (const config of methodConfigs) {\n if (hasMatchingName(service, method, config, matchLevel)) {\n return config;\n }\n }\n return null;\n}\nfunction getDefaultConfigSelector(serviceConfig) {\n return function defaultConfigSelector(methodName, metadata) {\n var _a, _b;\n const splitName = methodName.split('/').filter(x => x.length > 0);\n const service = (_a = splitName[0]) !== null && _a !== void 0 ? _a : '';\n const method = (_b = splitName[1]) !== null && _b !== void 0 ? _b : '';\n if (serviceConfig && serviceConfig.methodConfig) {\n /* Check for the following in order, and return the first method\n * config that matches:\n * 1. A name that exactly matches the service and method\n * 2. A name with no method set that matches the service\n * 3. An empty name\n */\n for (const matchLevel of NAME_MATCH_LEVEL_ORDER) {\n const matchingConfig = findMatchingConfig(service, method, serviceConfig.methodConfig, matchLevel);\n if (matchingConfig) {\n return {\n methodConfig: matchingConfig,\n pickInformation: {},\n status: constants_1.Status.OK,\n dynamicFilterFactories: [],\n };\n }\n }\n }\n return {\n methodConfig: { name: [] },\n pickInformation: {},\n status: constants_1.Status.OK,\n dynamicFilterFactories: [],\n };\n };\n}\nclass ResolvingLoadBalancer {\n /**\n * Wrapper class that behaves like a `LoadBalancer` and also handles name\n * resolution internally.\n * @param target The address of the backend to connect to.\n * @param channelControlHelper `ChannelControlHelper` instance provided by\n * this load balancer's owner.\n * @param defaultServiceConfig The default service configuration to be used\n * if none is provided by the name resolver. A `null` value indicates\n * that the default behavior should be the default unconfigured behavior.\n * In practice, that means using the \"pick first\" load balancer\n * implmentation\n */\n constructor(target, channelControlHelper, channelOptions, onSuccessfulResolution, onFailedResolution) {\n this.target = target;\n this.channelControlHelper = channelControlHelper;\n this.onSuccessfulResolution = onSuccessfulResolution;\n this.onFailedResolution = onFailedResolution;\n this.latestChildState = connectivity_state_1.ConnectivityState.IDLE;\n this.latestChildPicker = new picker_1.QueuePicker(this);\n /**\n * This resolving load balancer's current connectivity state.\n */\n this.currentState = connectivity_state_1.ConnectivityState.IDLE;\n /**\n * The service config object from the last successful resolution, if\n * available. A value of null indicates that we have not yet received a valid\n * service config from the resolver.\n */\n this.previousServiceConfig = null;\n /**\n * Indicates whether we should attempt to resolve again after the backoff\n * timer runs out.\n */\n this.continueResolving = false;\n if (channelOptions['grpc.service_config']) {\n this.defaultServiceConfig = (0, service_config_1.validateServiceConfig)(JSON.parse(channelOptions['grpc.service_config']));\n }\n else {\n this.defaultServiceConfig = {\n loadBalancingConfig: [],\n methodConfig: [],\n };\n }\n this.updateState(connectivity_state_1.ConnectivityState.IDLE, new picker_1.QueuePicker(this));\n this.childLoadBalancer = new load_balancer_child_handler_1.ChildLoadBalancerHandler({\n createSubchannel: channelControlHelper.createSubchannel.bind(channelControlHelper),\n requestReresolution: () => {\n /* If the backoffTimeout is running, we're still backing off from\n * making resolve requests, so we shouldn't make another one here.\n * In that case, the backoff timer callback will call\n * updateResolution */\n if (this.backoffTimeout.isRunning()) {\n trace('requestReresolution delayed by backoff timer until ' +\n this.backoffTimeout.getEndTime().toISOString());\n this.continueResolving = true;\n }\n else {\n this.updateResolution();\n }\n },\n updateState: (newState, picker) => {\n this.latestChildState = newState;\n this.latestChildPicker = picker;\n this.updateState(newState, picker);\n },\n addChannelzChild: channelControlHelper.addChannelzChild.bind(channelControlHelper),\n removeChannelzChild: channelControlHelper.removeChannelzChild.bind(channelControlHelper),\n }, channelOptions);\n this.innerResolver = (0, resolver_1.createResolver)(target, {\n onSuccessfulResolution: (endpointList, serviceConfig, serviceConfigError, configSelector, attributes) => {\n var _a;\n this.backoffTimeout.stop();\n this.backoffTimeout.reset();\n let workingServiceConfig = null;\n /* This first group of conditionals implements the algorithm described\n * in https://github.com/grpc/proposal/blob/master/A21-service-config-error-handling.md\n * in the section called \"Behavior on receiving a new gRPC Config\".\n */\n if (serviceConfig === null) {\n // Step 4 and 5\n if (serviceConfigError === null) {\n // Step 5\n this.previousServiceConfig = null;\n workingServiceConfig = this.defaultServiceConfig;\n }\n else {\n // Step 4\n if (this.previousServiceConfig === null) {\n // Step 4.ii\n this.handleResolutionFailure(serviceConfigError);\n }\n else {\n // Step 4.i\n workingServiceConfig = this.previousServiceConfig;\n }\n }\n }\n else {\n // Step 3\n workingServiceConfig = serviceConfig;\n this.previousServiceConfig = serviceConfig;\n }\n const workingConfigList = (_a = workingServiceConfig === null || workingServiceConfig === void 0 ? void 0 : workingServiceConfig.loadBalancingConfig) !== null && _a !== void 0 ? _a : [];\n const loadBalancingConfig = (0, load_balancer_1.selectLbConfigFromList)(workingConfigList, true);\n if (loadBalancingConfig === null) {\n // There were load balancing configs but none are supported. This counts as a resolution failure\n this.handleResolutionFailure({\n code: constants_1.Status.UNAVAILABLE,\n details: 'All load balancer options in service config are not compatible',\n metadata: new metadata_1.Metadata(),\n });\n return;\n }\n this.childLoadBalancer.updateAddressList(endpointList, loadBalancingConfig, attributes);\n const finalServiceConfig = workingServiceConfig !== null && workingServiceConfig !== void 0 ? workingServiceConfig : this.defaultServiceConfig;\n this.onSuccessfulResolution(finalServiceConfig, configSelector !== null && configSelector !== void 0 ? configSelector : getDefaultConfigSelector(finalServiceConfig));\n },\n onError: (error) => {\n this.handleResolutionFailure(error);\n },\n }, channelOptions);\n const backoffOptions = {\n initialDelay: channelOptions['grpc.initial_reconnect_backoff_ms'],\n maxDelay: channelOptions['grpc.max_reconnect_backoff_ms'],\n };\n this.backoffTimeout = new backoff_timeout_1.BackoffTimeout(() => {\n if (this.continueResolving) {\n this.updateResolution();\n this.continueResolving = false;\n }\n else {\n this.updateState(this.latestChildState, this.latestChildPicker);\n }\n }, backoffOptions);\n this.backoffTimeout.unref();\n }\n updateResolution() {\n this.innerResolver.updateResolution();\n if (this.currentState === connectivity_state_1.ConnectivityState.IDLE) {\n /* this.latestChildPicker is initialized as new QueuePicker(this), which\n * is an appropriate value here if the child LB policy is unset.\n * Otherwise, we want to delegate to the child here, in case that\n * triggers something. */\n this.updateState(connectivity_state_1.ConnectivityState.CONNECTING, this.latestChildPicker);\n }\n this.backoffTimeout.runOnce();\n }\n updateState(connectivityState, picker) {\n trace((0, uri_parser_1.uriToString)(this.target) +\n ' ' +\n connectivity_state_1.ConnectivityState[this.currentState] +\n ' -> ' +\n connectivity_state_1.ConnectivityState[connectivityState]);\n // Ensure that this.exitIdle() is called by the picker\n if (connectivityState === connectivity_state_1.ConnectivityState.IDLE) {\n picker = new picker_1.QueuePicker(this, picker);\n }\n this.currentState = connectivityState;\n this.channelControlHelper.updateState(connectivityState, picker);\n }\n handleResolutionFailure(error) {\n if (this.latestChildState === connectivity_state_1.ConnectivityState.IDLE) {\n this.updateState(connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, new picker_1.UnavailablePicker(error));\n this.onFailedResolution(error);\n }\n }\n exitIdle() {\n if (this.currentState === connectivity_state_1.ConnectivityState.IDLE ||\n this.currentState === connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) {\n if (this.backoffTimeout.isRunning()) {\n this.continueResolving = true;\n }\n else {\n this.updateResolution();\n }\n }\n this.childLoadBalancer.exitIdle();\n }\n updateAddressList(endpointList, lbConfig) {\n throw new Error('updateAddressList not supported on ResolvingLoadBalancer');\n }\n resetBackoff() {\n this.backoffTimeout.reset();\n this.childLoadBalancer.resetBackoff();\n }\n destroy() {\n this.childLoadBalancer.destroy();\n this.innerResolver.destroy();\n this.backoffTimeout.reset();\n this.backoffTimeout.stop();\n this.latestChildState = connectivity_state_1.ConnectivityState.IDLE;\n this.latestChildPicker = new picker_1.QueuePicker(this);\n this.currentState = connectivity_state_1.ConnectivityState.IDLE;\n this.previousServiceConfig = null;\n this.continueResolving = false;\n }\n getTypeName() {\n return 'resolving_load_balancer';\n }\n}\nexports.ResolvingLoadBalancer = ResolvingLoadBalancer;\n//# sourceMappingURL=resolving-load-balancer.js.map","\"use strict\";\n/*\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RetryingCall = exports.MessageBufferTracker = exports.RetryThrottler = void 0;\nconst constants_1 = require(\"./constants\");\nconst deadline_1 = require(\"./deadline\");\nconst metadata_1 = require(\"./metadata\");\nconst logging = require(\"./logging\");\nconst TRACER_NAME = 'retrying_call';\nclass RetryThrottler {\n constructor(maxTokens, tokenRatio, previousRetryThrottler) {\n this.maxTokens = maxTokens;\n this.tokenRatio = tokenRatio;\n if (previousRetryThrottler) {\n /* When carrying over tokens from a previous config, rescale them to the\n * new max value */\n this.tokens =\n previousRetryThrottler.tokens *\n (maxTokens / previousRetryThrottler.maxTokens);\n }\n else {\n this.tokens = maxTokens;\n }\n }\n addCallSucceeded() {\n this.tokens = Math.max(this.tokens + this.tokenRatio, this.maxTokens);\n }\n addCallFailed() {\n this.tokens = Math.min(this.tokens - 1, 0);\n }\n canRetryCall() {\n return this.tokens > this.maxTokens / 2;\n }\n}\nexports.RetryThrottler = RetryThrottler;\nclass MessageBufferTracker {\n constructor(totalLimit, limitPerCall) {\n this.totalLimit = totalLimit;\n this.limitPerCall = limitPerCall;\n this.totalAllocated = 0;\n this.allocatedPerCall = new Map();\n }\n allocate(size, callId) {\n var _a;\n const currentPerCall = (_a = this.allocatedPerCall.get(callId)) !== null && _a !== void 0 ? _a : 0;\n if (this.limitPerCall - currentPerCall < size ||\n this.totalLimit - this.totalAllocated < size) {\n return false;\n }\n this.allocatedPerCall.set(callId, currentPerCall + size);\n this.totalAllocated += size;\n return true;\n }\n free(size, callId) {\n var _a;\n if (this.totalAllocated < size) {\n throw new Error(`Invalid buffer allocation state: call ${callId} freed ${size} > total allocated ${this.totalAllocated}`);\n }\n this.totalAllocated -= size;\n const currentPerCall = (_a = this.allocatedPerCall.get(callId)) !== null && _a !== void 0 ? _a : 0;\n if (currentPerCall < size) {\n throw new Error(`Invalid buffer allocation state: call ${callId} freed ${size} > allocated for call ${currentPerCall}`);\n }\n this.allocatedPerCall.set(callId, currentPerCall - size);\n }\n freeAll(callId) {\n var _a;\n const currentPerCall = (_a = this.allocatedPerCall.get(callId)) !== null && _a !== void 0 ? _a : 0;\n if (this.totalAllocated < currentPerCall) {\n throw new Error(`Invalid buffer allocation state: call ${callId} allocated ${currentPerCall} > total allocated ${this.totalAllocated}`);\n }\n this.totalAllocated -= currentPerCall;\n this.allocatedPerCall.delete(callId);\n }\n}\nexports.MessageBufferTracker = MessageBufferTracker;\nconst PREVIONS_RPC_ATTEMPTS_METADATA_KEY = 'grpc-previous-rpc-attempts';\nclass RetryingCall {\n constructor(channel, callConfig, methodName, host, credentials, deadline, callNumber, bufferTracker, retryThrottler) {\n this.channel = channel;\n this.callConfig = callConfig;\n this.methodName = methodName;\n this.host = host;\n this.credentials = credentials;\n this.deadline = deadline;\n this.callNumber = callNumber;\n this.bufferTracker = bufferTracker;\n this.retryThrottler = retryThrottler;\n this.listener = null;\n this.initialMetadata = null;\n this.underlyingCalls = [];\n this.writeBuffer = [];\n /**\n * The offset of message indices in the writeBuffer. For example, if\n * writeBufferOffset is 10, message 10 is in writeBuffer[0] and message 15\n * is in writeBuffer[5].\n */\n this.writeBufferOffset = 0;\n /**\n * Tracks whether a read has been started, so that we know whether to start\n * reads on new child calls. This only matters for the first read, because\n * once a message comes in the child call becomes committed and there will\n * be no new child calls.\n */\n this.readStarted = false;\n this.transparentRetryUsed = false;\n /**\n * Number of attempts so far\n */\n this.attempts = 0;\n this.hedgingTimer = null;\n this.committedCallIndex = null;\n this.initialRetryBackoffSec = 0;\n this.nextRetryBackoffSec = 0;\n if (callConfig.methodConfig.retryPolicy) {\n this.state = 'RETRY';\n const retryPolicy = callConfig.methodConfig.retryPolicy;\n this.nextRetryBackoffSec = this.initialRetryBackoffSec = Number(retryPolicy.initialBackoff.substring(0, retryPolicy.initialBackoff.length - 1));\n }\n else if (callConfig.methodConfig.hedgingPolicy) {\n this.state = 'HEDGING';\n }\n else {\n this.state = 'TRANSPARENT_ONLY';\n }\n this.startTime = new Date();\n }\n getDeadlineInfo() {\n if (this.underlyingCalls.length === 0) {\n return [];\n }\n const deadlineInfo = [];\n const latestCall = this.underlyingCalls[this.underlyingCalls.length - 1];\n if (this.underlyingCalls.length > 1) {\n deadlineInfo.push(`previous attempts: ${this.underlyingCalls.length - 1}`);\n }\n if (latestCall.startTime > this.startTime) {\n deadlineInfo.push(`time to current attempt start: ${(0, deadline_1.formatDateDifference)(this.startTime, latestCall.startTime)}`);\n }\n deadlineInfo.push(...latestCall.call.getDeadlineInfo());\n return deadlineInfo;\n }\n getCallNumber() {\n return this.callNumber;\n }\n trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '[' + this.callNumber + '] ' + text);\n }\n reportStatus(statusObject) {\n this.trace('ended with status: code=' +\n statusObject.code +\n ' details=\"' +\n statusObject.details +\n '\" start time=' +\n this.startTime.toISOString());\n this.bufferTracker.freeAll(this.callNumber);\n this.writeBufferOffset = this.writeBufferOffset + this.writeBuffer.length;\n this.writeBuffer = [];\n process.nextTick(() => {\n var _a;\n // Explicitly construct status object to remove progress field\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveStatus({\n code: statusObject.code,\n details: statusObject.details,\n metadata: statusObject.metadata,\n });\n });\n }\n cancelWithStatus(status, details) {\n this.trace('cancelWithStatus code: ' + status + ' details: \"' + details + '\"');\n this.reportStatus({ code: status, details, metadata: new metadata_1.Metadata() });\n for (const { call } of this.underlyingCalls) {\n call.cancelWithStatus(status, details);\n }\n }\n getPeer() {\n if (this.committedCallIndex !== null) {\n return this.underlyingCalls[this.committedCallIndex].call.getPeer();\n }\n else {\n return 'unknown';\n }\n }\n getBufferEntry(messageIndex) {\n var _a;\n return ((_a = this.writeBuffer[messageIndex - this.writeBufferOffset]) !== null && _a !== void 0 ? _a : {\n entryType: 'FREED',\n allocated: false,\n });\n }\n getNextBufferIndex() {\n return this.writeBufferOffset + this.writeBuffer.length;\n }\n clearSentMessages() {\n if (this.state !== 'COMMITTED') {\n return;\n }\n const earliestNeededMessageIndex = this.underlyingCalls[this.committedCallIndex].nextMessageToSend;\n for (let messageIndex = this.writeBufferOffset; messageIndex < earliestNeededMessageIndex; messageIndex++) {\n const bufferEntry = this.getBufferEntry(messageIndex);\n if (bufferEntry.allocated) {\n this.bufferTracker.free(bufferEntry.message.message.length, this.callNumber);\n }\n }\n this.writeBuffer = this.writeBuffer.slice(earliestNeededMessageIndex - this.writeBufferOffset);\n this.writeBufferOffset = earliestNeededMessageIndex;\n }\n commitCall(index) {\n if (this.state === 'COMMITTED') {\n return;\n }\n if (this.underlyingCalls[index].state === 'COMPLETED') {\n return;\n }\n this.trace('Committing call [' +\n this.underlyingCalls[index].call.getCallNumber() +\n '] at index ' +\n index);\n this.state = 'COMMITTED';\n this.committedCallIndex = index;\n for (let i = 0; i < this.underlyingCalls.length; i++) {\n if (i === index) {\n continue;\n }\n if (this.underlyingCalls[i].state === 'COMPLETED') {\n continue;\n }\n this.underlyingCalls[i].state = 'COMPLETED';\n this.underlyingCalls[i].call.cancelWithStatus(constants_1.Status.CANCELLED, 'Discarded in favor of other hedged attempt');\n }\n this.clearSentMessages();\n }\n commitCallWithMostMessages() {\n if (this.state === 'COMMITTED') {\n return;\n }\n let mostMessages = -1;\n let callWithMostMessages = -1;\n for (const [index, childCall] of this.underlyingCalls.entries()) {\n if (childCall.state === 'ACTIVE' &&\n childCall.nextMessageToSend > mostMessages) {\n mostMessages = childCall.nextMessageToSend;\n callWithMostMessages = index;\n }\n }\n if (callWithMostMessages === -1) {\n /* There are no active calls, disable retries to force the next call that\n * is started to be committed. */\n this.state = 'TRANSPARENT_ONLY';\n }\n else {\n this.commitCall(callWithMostMessages);\n }\n }\n isStatusCodeInList(list, code) {\n return list.some(value => value === code ||\n value.toString().toLowerCase() === constants_1.Status[code].toLowerCase());\n }\n getNextRetryBackoffMs() {\n var _a;\n const retryPolicy = (_a = this.callConfig) === null || _a === void 0 ? void 0 : _a.methodConfig.retryPolicy;\n if (!retryPolicy) {\n return 0;\n }\n const nextBackoffMs = Math.random() * this.nextRetryBackoffSec * 1000;\n const maxBackoffSec = Number(retryPolicy.maxBackoff.substring(0, retryPolicy.maxBackoff.length - 1));\n this.nextRetryBackoffSec = Math.min(this.nextRetryBackoffSec * retryPolicy.backoffMultiplier, maxBackoffSec);\n return nextBackoffMs;\n }\n maybeRetryCall(pushback, callback) {\n if (this.state !== 'RETRY') {\n callback(false);\n return;\n }\n const retryPolicy = this.callConfig.methodConfig.retryPolicy;\n if (this.attempts >= Math.min(retryPolicy.maxAttempts, 5)) {\n callback(false);\n return;\n }\n let retryDelayMs;\n if (pushback === null) {\n retryDelayMs = this.getNextRetryBackoffMs();\n }\n else if (pushback < 0) {\n this.state = 'TRANSPARENT_ONLY';\n callback(false);\n return;\n }\n else {\n retryDelayMs = pushback;\n this.nextRetryBackoffSec = this.initialRetryBackoffSec;\n }\n setTimeout(() => {\n var _a, _b;\n if (this.state !== 'RETRY') {\n callback(false);\n return;\n }\n if ((_b = (_a = this.retryThrottler) === null || _a === void 0 ? void 0 : _a.canRetryCall()) !== null && _b !== void 0 ? _b : true) {\n callback(true);\n this.attempts += 1;\n this.startNewAttempt();\n }\n }, retryDelayMs);\n }\n countActiveCalls() {\n let count = 0;\n for (const call of this.underlyingCalls) {\n if ((call === null || call === void 0 ? void 0 : call.state) === 'ACTIVE') {\n count += 1;\n }\n }\n return count;\n }\n handleProcessedStatus(status, callIndex, pushback) {\n var _a, _b, _c;\n switch (this.state) {\n case 'COMMITTED':\n case 'TRANSPARENT_ONLY':\n this.commitCall(callIndex);\n this.reportStatus(status);\n break;\n case 'HEDGING':\n if (this.isStatusCodeInList((_a = this.callConfig.methodConfig.hedgingPolicy.nonFatalStatusCodes) !== null && _a !== void 0 ? _a : [], status.code)) {\n (_b = this.retryThrottler) === null || _b === void 0 ? void 0 : _b.addCallFailed();\n let delayMs;\n if (pushback === null) {\n delayMs = 0;\n }\n else if (pushback < 0) {\n this.state = 'TRANSPARENT_ONLY';\n this.commitCall(callIndex);\n this.reportStatus(status);\n return;\n }\n else {\n delayMs = pushback;\n }\n setTimeout(() => {\n this.maybeStartHedgingAttempt();\n // If after trying to start a call there are no active calls, this was the last one\n if (this.countActiveCalls() === 0) {\n this.commitCall(callIndex);\n this.reportStatus(status);\n }\n }, delayMs);\n }\n else {\n this.commitCall(callIndex);\n this.reportStatus(status);\n }\n break;\n case 'RETRY':\n if (this.isStatusCodeInList(this.callConfig.methodConfig.retryPolicy.retryableStatusCodes, status.code)) {\n (_c = this.retryThrottler) === null || _c === void 0 ? void 0 : _c.addCallFailed();\n this.maybeRetryCall(pushback, retried => {\n if (!retried) {\n this.commitCall(callIndex);\n this.reportStatus(status);\n }\n });\n }\n else {\n this.commitCall(callIndex);\n this.reportStatus(status);\n }\n break;\n }\n }\n getPushback(metadata) {\n const mdValue = metadata.get('grpc-retry-pushback-ms');\n if (mdValue.length === 0) {\n return null;\n }\n try {\n return parseInt(mdValue[0]);\n }\n catch (e) {\n return -1;\n }\n }\n handleChildStatus(status, callIndex) {\n var _a;\n if (this.underlyingCalls[callIndex].state === 'COMPLETED') {\n return;\n }\n this.trace('state=' +\n this.state +\n ' handling status with progress ' +\n status.progress +\n ' from child [' +\n this.underlyingCalls[callIndex].call.getCallNumber() +\n '] in state ' +\n this.underlyingCalls[callIndex].state);\n this.underlyingCalls[callIndex].state = 'COMPLETED';\n if (status.code === constants_1.Status.OK) {\n (_a = this.retryThrottler) === null || _a === void 0 ? void 0 : _a.addCallSucceeded();\n this.commitCall(callIndex);\n this.reportStatus(status);\n return;\n }\n if (this.state === 'COMMITTED') {\n this.reportStatus(status);\n return;\n }\n const pushback = this.getPushback(status.metadata);\n switch (status.progress) {\n case 'NOT_STARTED':\n // RPC never leaves the client, always safe to retry\n this.startNewAttempt();\n break;\n case 'REFUSED':\n // RPC reaches the server library, but not the server application logic\n if (this.transparentRetryUsed) {\n this.handleProcessedStatus(status, callIndex, pushback);\n }\n else {\n this.transparentRetryUsed = true;\n this.startNewAttempt();\n }\n break;\n case 'DROP':\n this.commitCall(callIndex);\n this.reportStatus(status);\n break;\n case 'PROCESSED':\n this.handleProcessedStatus(status, callIndex, pushback);\n break;\n }\n }\n maybeStartHedgingAttempt() {\n if (this.state !== 'HEDGING') {\n return;\n }\n if (!this.callConfig.methodConfig.hedgingPolicy) {\n return;\n }\n const hedgingPolicy = this.callConfig.methodConfig.hedgingPolicy;\n if (this.attempts >= Math.min(hedgingPolicy.maxAttempts, 5)) {\n return;\n }\n this.attempts += 1;\n this.startNewAttempt();\n this.maybeStartHedgingTimer();\n }\n maybeStartHedgingTimer() {\n var _a, _b, _c;\n if (this.hedgingTimer) {\n clearTimeout(this.hedgingTimer);\n }\n if (this.state !== 'HEDGING') {\n return;\n }\n if (!this.callConfig.methodConfig.hedgingPolicy) {\n return;\n }\n const hedgingPolicy = this.callConfig.methodConfig.hedgingPolicy;\n if (this.attempts >= Math.min(hedgingPolicy.maxAttempts, 5)) {\n return;\n }\n const hedgingDelayString = (_a = hedgingPolicy.hedgingDelay) !== null && _a !== void 0 ? _a : '0s';\n const hedgingDelaySec = Number(hedgingDelayString.substring(0, hedgingDelayString.length - 1));\n this.hedgingTimer = setTimeout(() => {\n this.maybeStartHedgingAttempt();\n }, hedgingDelaySec * 1000);\n (_c = (_b = this.hedgingTimer).unref) === null || _c === void 0 ? void 0 : _c.call(_b);\n }\n startNewAttempt() {\n const child = this.channel.createLoadBalancingCall(this.callConfig, this.methodName, this.host, this.credentials, this.deadline);\n this.trace('Created child call [' +\n child.getCallNumber() +\n '] for attempt ' +\n this.attempts);\n const index = this.underlyingCalls.length;\n this.underlyingCalls.push({\n state: 'ACTIVE',\n call: child,\n nextMessageToSend: 0,\n startTime: new Date()\n });\n const previousAttempts = this.attempts - 1;\n const initialMetadata = this.initialMetadata.clone();\n if (previousAttempts > 0) {\n initialMetadata.set(PREVIONS_RPC_ATTEMPTS_METADATA_KEY, `${previousAttempts}`);\n }\n let receivedMetadata = false;\n child.start(initialMetadata, {\n onReceiveMetadata: metadata => {\n this.trace('Received metadata from child [' + child.getCallNumber() + ']');\n this.commitCall(index);\n receivedMetadata = true;\n if (previousAttempts > 0) {\n metadata.set(PREVIONS_RPC_ATTEMPTS_METADATA_KEY, `${previousAttempts}`);\n }\n if (this.underlyingCalls[index].state === 'ACTIVE') {\n this.listener.onReceiveMetadata(metadata);\n }\n },\n onReceiveMessage: message => {\n this.trace('Received message from child [' + child.getCallNumber() + ']');\n this.commitCall(index);\n if (this.underlyingCalls[index].state === 'ACTIVE') {\n this.listener.onReceiveMessage(message);\n }\n },\n onReceiveStatus: status => {\n this.trace('Received status from child [' + child.getCallNumber() + ']');\n if (!receivedMetadata && previousAttempts > 0) {\n status.metadata.set(PREVIONS_RPC_ATTEMPTS_METADATA_KEY, `${previousAttempts}`);\n }\n this.handleChildStatus(status, index);\n },\n });\n this.sendNextChildMessage(index);\n if (this.readStarted) {\n child.startRead();\n }\n }\n start(metadata, listener) {\n this.trace('start called');\n this.listener = listener;\n this.initialMetadata = metadata;\n this.attempts += 1;\n this.startNewAttempt();\n this.maybeStartHedgingTimer();\n }\n handleChildWriteCompleted(childIndex) {\n var _a, _b;\n const childCall = this.underlyingCalls[childIndex];\n const messageIndex = childCall.nextMessageToSend;\n (_b = (_a = this.getBufferEntry(messageIndex)).callback) === null || _b === void 0 ? void 0 : _b.call(_a);\n this.clearSentMessages();\n childCall.nextMessageToSend += 1;\n this.sendNextChildMessage(childIndex);\n }\n sendNextChildMessage(childIndex) {\n const childCall = this.underlyingCalls[childIndex];\n if (childCall.state === 'COMPLETED') {\n return;\n }\n if (this.getBufferEntry(childCall.nextMessageToSend)) {\n const bufferEntry = this.getBufferEntry(childCall.nextMessageToSend);\n switch (bufferEntry.entryType) {\n case 'MESSAGE':\n childCall.call.sendMessageWithContext({\n callback: error => {\n // Ignore error\n this.handleChildWriteCompleted(childIndex);\n },\n }, bufferEntry.message.message);\n break;\n case 'HALF_CLOSE':\n childCall.nextMessageToSend += 1;\n childCall.call.halfClose();\n break;\n case 'FREED':\n // Should not be possible\n break;\n }\n }\n }\n sendMessageWithContext(context, message) {\n var _a;\n this.trace('write() called with message of length ' + message.length);\n const writeObj = {\n message,\n flags: context.flags,\n };\n const messageIndex = this.getNextBufferIndex();\n const bufferEntry = {\n entryType: 'MESSAGE',\n message: writeObj,\n allocated: this.bufferTracker.allocate(message.length, this.callNumber),\n };\n this.writeBuffer.push(bufferEntry);\n if (bufferEntry.allocated) {\n (_a = context.callback) === null || _a === void 0 ? void 0 : _a.call(context);\n for (const [callIndex, call] of this.underlyingCalls.entries()) {\n if (call.state === 'ACTIVE' &&\n call.nextMessageToSend === messageIndex) {\n call.call.sendMessageWithContext({\n callback: error => {\n // Ignore error\n this.handleChildWriteCompleted(callIndex);\n },\n }, message);\n }\n }\n }\n else {\n this.commitCallWithMostMessages();\n // commitCallWithMostMessages can fail if we are between ping attempts\n if (this.committedCallIndex === null) {\n return;\n }\n const call = this.underlyingCalls[this.committedCallIndex];\n bufferEntry.callback = context.callback;\n if (call.state === 'ACTIVE' && call.nextMessageToSend === messageIndex) {\n call.call.sendMessageWithContext({\n callback: error => {\n // Ignore error\n this.handleChildWriteCompleted(this.committedCallIndex);\n },\n }, message);\n }\n }\n }\n startRead() {\n this.trace('startRead called');\n this.readStarted = true;\n for (const underlyingCall of this.underlyingCalls) {\n if ((underlyingCall === null || underlyingCall === void 0 ? void 0 : underlyingCall.state) === 'ACTIVE') {\n underlyingCall.call.startRead();\n }\n }\n }\n halfClose() {\n this.trace('halfClose called');\n const halfCloseIndex = this.getNextBufferIndex();\n this.writeBuffer.push({\n entryType: 'HALF_CLOSE',\n allocated: false,\n });\n for (const call of this.underlyingCalls) {\n if ((call === null || call === void 0 ? void 0 : call.state) === 'ACTIVE' &&\n call.nextMessageToSend === halfCloseIndex) {\n call.nextMessageToSend += 1;\n call.call.halfClose();\n }\n }\n }\n setCredentials(newCredentials) {\n throw new Error('Method not implemented.');\n }\n getMethod() {\n return this.methodName;\n }\n getHost() {\n return this.host;\n }\n}\nexports.RetryingCall = RetryingCall;\n//# sourceMappingURL=retrying-call.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServerDuplexStreamImpl = exports.ServerWritableStreamImpl = exports.ServerReadableStreamImpl = exports.ServerUnaryCallImpl = exports.serverErrorToStatus = void 0;\nconst events_1 = require(\"events\");\nconst stream_1 = require(\"stream\");\nconst constants_1 = require(\"./constants\");\nconst metadata_1 = require(\"./metadata\");\nfunction serverErrorToStatus(error, overrideTrailers) {\n var _a;\n const status = {\n code: constants_1.Status.UNKNOWN,\n details: 'message' in error ? error.message : 'Unknown Error',\n metadata: (_a = overrideTrailers !== null && overrideTrailers !== void 0 ? overrideTrailers : error.metadata) !== null && _a !== void 0 ? _a : null,\n };\n if ('code' in error &&\n typeof error.code === 'number' &&\n Number.isInteger(error.code)) {\n status.code = error.code;\n if ('details' in error && typeof error.details === 'string') {\n status.details = error.details;\n }\n }\n return status;\n}\nexports.serverErrorToStatus = serverErrorToStatus;\nclass ServerUnaryCallImpl extends events_1.EventEmitter {\n constructor(path, call, metadata, request) {\n super();\n this.path = path;\n this.call = call;\n this.metadata = metadata;\n this.request = request;\n this.cancelled = false;\n }\n getPeer() {\n return this.call.getPeer();\n }\n sendMetadata(responseMetadata) {\n this.call.sendMetadata(responseMetadata);\n }\n getDeadline() {\n return this.call.getDeadline();\n }\n getPath() {\n return this.path;\n }\n}\nexports.ServerUnaryCallImpl = ServerUnaryCallImpl;\nclass ServerReadableStreamImpl extends stream_1.Readable {\n constructor(path, call, metadata) {\n super({ objectMode: true });\n this.path = path;\n this.call = call;\n this.metadata = metadata;\n this.cancelled = false;\n }\n _read(size) {\n this.call.startRead();\n }\n getPeer() {\n return this.call.getPeer();\n }\n sendMetadata(responseMetadata) {\n this.call.sendMetadata(responseMetadata);\n }\n getDeadline() {\n return this.call.getDeadline();\n }\n getPath() {\n return this.path;\n }\n}\nexports.ServerReadableStreamImpl = ServerReadableStreamImpl;\nclass ServerWritableStreamImpl extends stream_1.Writable {\n constructor(path, call, metadata, request) {\n super({ objectMode: true });\n this.path = path;\n this.call = call;\n this.metadata = metadata;\n this.request = request;\n this.pendingStatus = {\n code: constants_1.Status.OK,\n details: 'OK',\n };\n this.cancelled = false;\n this.trailingMetadata = new metadata_1.Metadata();\n this.on('error', err => {\n this.pendingStatus = serverErrorToStatus(err);\n this.end();\n });\n }\n getPeer() {\n return this.call.getPeer();\n }\n sendMetadata(responseMetadata) {\n this.call.sendMetadata(responseMetadata);\n }\n getDeadline() {\n return this.call.getDeadline();\n }\n getPath() {\n return this.path;\n }\n _write(chunk, encoding, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback) {\n this.call.sendMessage(chunk, callback);\n }\n _final(callback) {\n var _a;\n callback(null);\n this.call.sendStatus(Object.assign(Object.assign({}, this.pendingStatus), { metadata: (_a = this.pendingStatus.metadata) !== null && _a !== void 0 ? _a : this.trailingMetadata }));\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n end(metadata) {\n if (metadata) {\n this.trailingMetadata = metadata;\n }\n return super.end();\n }\n}\nexports.ServerWritableStreamImpl = ServerWritableStreamImpl;\nclass ServerDuplexStreamImpl extends stream_1.Duplex {\n constructor(path, call, metadata) {\n super({ objectMode: true });\n this.path = path;\n this.call = call;\n this.metadata = metadata;\n this.pendingStatus = {\n code: constants_1.Status.OK,\n details: 'OK',\n };\n this.cancelled = false;\n this.trailingMetadata = new metadata_1.Metadata();\n this.on('error', err => {\n this.pendingStatus = serverErrorToStatus(err);\n this.end();\n });\n }\n getPeer() {\n return this.call.getPeer();\n }\n sendMetadata(responseMetadata) {\n this.call.sendMetadata(responseMetadata);\n }\n getDeadline() {\n return this.call.getDeadline();\n }\n getPath() {\n return this.path;\n }\n _read(size) {\n this.call.startRead();\n }\n _write(chunk, encoding, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback) {\n this.call.sendMessage(chunk, callback);\n }\n _final(callback) {\n var _a;\n callback(null);\n this.call.sendStatus(Object.assign(Object.assign({}, this.pendingStatus), { metadata: (_a = this.pendingStatus.metadata) !== null && _a !== void 0 ? _a : this.trailingMetadata }));\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n end(metadata) {\n if (metadata) {\n this.trailingMetadata = metadata;\n }\n return super.end();\n }\n}\nexports.ServerDuplexStreamImpl = ServerDuplexStreamImpl;\n//# sourceMappingURL=server-call.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServerCredentials = void 0;\nconst tls_helpers_1 = require(\"./tls-helpers\");\nclass ServerCredentials {\n static createInsecure() {\n return new InsecureServerCredentials();\n }\n static createSsl(rootCerts, keyCertPairs, checkClientCertificate = false) {\n var _a;\n if (rootCerts !== null && !Buffer.isBuffer(rootCerts)) {\n throw new TypeError('rootCerts must be null or a Buffer');\n }\n if (!Array.isArray(keyCertPairs)) {\n throw new TypeError('keyCertPairs must be an array');\n }\n if (typeof checkClientCertificate !== 'boolean') {\n throw new TypeError('checkClientCertificate must be a boolean');\n }\n const cert = [];\n const key = [];\n for (let i = 0; i < keyCertPairs.length; i++) {\n const pair = keyCertPairs[i];\n if (pair === null || typeof pair !== 'object') {\n throw new TypeError(`keyCertPair[${i}] must be an object`);\n }\n if (!Buffer.isBuffer(pair.private_key)) {\n throw new TypeError(`keyCertPair[${i}].private_key must be a Buffer`);\n }\n if (!Buffer.isBuffer(pair.cert_chain)) {\n throw new TypeError(`keyCertPair[${i}].cert_chain must be a Buffer`);\n }\n cert.push(pair.cert_chain);\n key.push(pair.private_key);\n }\n return new SecureServerCredentials({\n ca: (_a = rootCerts !== null && rootCerts !== void 0 ? rootCerts : (0, tls_helpers_1.getDefaultRootsData)()) !== null && _a !== void 0 ? _a : undefined,\n cert,\n key,\n requestCert: checkClientCertificate,\n ciphers: tls_helpers_1.CIPHER_SUITES,\n });\n }\n}\nexports.ServerCredentials = ServerCredentials;\nclass InsecureServerCredentials extends ServerCredentials {\n _isSecure() {\n return false;\n }\n _getSettings() {\n return null;\n }\n _equals(other) {\n return other instanceof InsecureServerCredentials;\n }\n}\nclass SecureServerCredentials extends ServerCredentials {\n constructor(options) {\n super();\n this.options = options;\n }\n _isSecure() {\n return true;\n }\n _getSettings() {\n return this.options;\n }\n /**\n * Checks equality by checking the options that are actually set by\n * createSsl.\n * @param other\n * @returns\n */\n _equals(other) {\n if (this === other) {\n return true;\n }\n if (!(other instanceof SecureServerCredentials)) {\n return false;\n }\n // options.ca equality check\n if (Buffer.isBuffer(this.options.ca) && Buffer.isBuffer(other.options.ca)) {\n if (!this.options.ca.equals(other.options.ca)) {\n return false;\n }\n }\n else {\n if (this.options.ca !== other.options.ca) {\n return false;\n }\n }\n // options.cert equality check\n if (Array.isArray(this.options.cert) && Array.isArray(other.options.cert)) {\n if (this.options.cert.length !== other.options.cert.length) {\n return false;\n }\n for (let i = 0; i < this.options.cert.length; i++) {\n const thisCert = this.options.cert[i];\n const otherCert = other.options.cert[i];\n if (Buffer.isBuffer(thisCert) && Buffer.isBuffer(otherCert)) {\n if (!thisCert.equals(otherCert)) {\n return false;\n }\n }\n else {\n if (thisCert !== otherCert) {\n return false;\n }\n }\n }\n }\n else {\n if (this.options.cert !== other.options.cert) {\n return false;\n }\n }\n // options.key equality check\n if (Array.isArray(this.options.key) && Array.isArray(other.options.key)) {\n if (this.options.key.length !== other.options.key.length) {\n return false;\n }\n for (let i = 0; i < this.options.key.length; i++) {\n const thisKey = this.options.key[i];\n const otherKey = other.options.key[i];\n if (Buffer.isBuffer(thisKey) && Buffer.isBuffer(otherKey)) {\n if (!thisKey.equals(otherKey)) {\n return false;\n }\n }\n else {\n if (thisKey !== otherKey) {\n return false;\n }\n }\n }\n }\n else {\n if (this.options.key !== other.options.key) {\n return false;\n }\n }\n // options.requestCert equality check\n if (this.options.requestCert !== other.options.requestCert) {\n return false;\n }\n /* ciphers is derived from a value that is constant for the process, so no\n * equality check is needed. */\n return true;\n }\n}\n//# sourceMappingURL=server-credentials.js.map","\"use strict\";\n/*\n * Copyright 2024 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getServerInterceptingCall = exports.BaseServerInterceptingCall = exports.ServerInterceptingCall = exports.ResponderBuilder = exports.isInterceptingServerListener = exports.ServerListenerBuilder = void 0;\nconst metadata_1 = require(\"./metadata\");\nconst constants_1 = require(\"./constants\");\nconst http2 = require(\"http2\");\nconst error_1 = require(\"./error\");\nconst zlib = require(\"zlib\");\nconst util_1 = require(\"util\");\nconst stream_decoder_1 = require(\"./stream-decoder\");\nconst logging = require(\"./logging\");\nconst unzip = (0, util_1.promisify)(zlib.unzip);\nconst inflate = (0, util_1.promisify)(zlib.inflate);\nconst TRACER_NAME = 'server_call';\nfunction trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);\n}\nclass ServerListenerBuilder {\n constructor() {\n this.metadata = undefined;\n this.message = undefined;\n this.halfClose = undefined;\n this.cancel = undefined;\n }\n withOnReceiveMetadata(onReceiveMetadata) {\n this.metadata = onReceiveMetadata;\n return this;\n }\n withOnReceiveMessage(onReceiveMessage) {\n this.message = onReceiveMessage;\n return this;\n }\n withOnReceiveHalfClose(onReceiveHalfClose) {\n this.halfClose = onReceiveHalfClose;\n return this;\n }\n withOnCancel(onCancel) {\n this.cancel = onCancel;\n return this;\n }\n build() {\n return {\n onReceiveMetadata: this.metadata,\n onReceiveMessage: this.message,\n onReceiveHalfClose: this.halfClose,\n onCancel: this.cancel,\n };\n }\n}\nexports.ServerListenerBuilder = ServerListenerBuilder;\nfunction isInterceptingServerListener(listener) {\n return (listener.onReceiveMetadata !== undefined &&\n listener.onReceiveMetadata.length === 1);\n}\nexports.isInterceptingServerListener = isInterceptingServerListener;\nclass InterceptingServerListenerImpl {\n constructor(listener, nextListener) {\n this.listener = listener;\n this.nextListener = nextListener;\n /**\n * Once the call is cancelled, ignore all other events.\n */\n this.cancelled = false;\n this.processingMetadata = false;\n this.hasPendingMessage = false;\n this.pendingMessage = null;\n this.processingMessage = false;\n this.hasPendingHalfClose = false;\n }\n processPendingMessage() {\n if (this.hasPendingMessage) {\n this.nextListener.onReceiveMessage(this.pendingMessage);\n this.pendingMessage = null;\n this.hasPendingMessage = false;\n }\n }\n processPendingHalfClose() {\n if (this.hasPendingHalfClose) {\n this.nextListener.onReceiveHalfClose();\n this.hasPendingHalfClose = false;\n }\n }\n onReceiveMetadata(metadata) {\n if (this.cancelled) {\n return;\n }\n this.processingMetadata = true;\n this.listener.onReceiveMetadata(metadata, interceptedMetadata => {\n this.processingMetadata = false;\n if (this.cancelled) {\n return;\n }\n this.nextListener.onReceiveMetadata(interceptedMetadata);\n this.processPendingMessage();\n this.processPendingHalfClose();\n });\n }\n onReceiveMessage(message) {\n if (this.cancelled) {\n return;\n }\n this.processingMessage = true;\n this.listener.onReceiveMessage(message, msg => {\n this.processingMessage = false;\n if (this.cancelled) {\n return;\n }\n if (this.processingMetadata) {\n this.pendingMessage = msg;\n this.hasPendingMessage = true;\n }\n else {\n this.nextListener.onReceiveMessage(msg);\n this.processPendingHalfClose();\n }\n });\n }\n onReceiveHalfClose() {\n if (this.cancelled) {\n return;\n }\n this.listener.onReceiveHalfClose(() => {\n if (this.cancelled) {\n return;\n }\n if (this.processingMetadata || this.processingMessage) {\n this.hasPendingHalfClose = true;\n }\n else {\n this.nextListener.onReceiveHalfClose();\n }\n });\n }\n onCancel() {\n this.cancelled = true;\n this.listener.onCancel();\n this.nextListener.onCancel();\n }\n}\nclass ResponderBuilder {\n constructor() {\n this.start = undefined;\n this.metadata = undefined;\n this.message = undefined;\n this.status = undefined;\n }\n withStart(start) {\n this.start = start;\n return this;\n }\n withSendMetadata(sendMetadata) {\n this.metadata = sendMetadata;\n return this;\n }\n withSendMessage(sendMessage) {\n this.message = sendMessage;\n return this;\n }\n withSendStatus(sendStatus) {\n this.status = sendStatus;\n return this;\n }\n build() {\n return {\n start: this.start,\n sendMetadata: this.metadata,\n sendMessage: this.message,\n sendStatus: this.status,\n };\n }\n}\nexports.ResponderBuilder = ResponderBuilder;\nconst defaultServerListener = {\n onReceiveMetadata: (metadata, next) => {\n next(metadata);\n },\n onReceiveMessage: (message, next) => {\n next(message);\n },\n onReceiveHalfClose: next => {\n next();\n },\n onCancel: () => { },\n};\nconst defaultResponder = {\n start: next => {\n next();\n },\n sendMetadata: (metadata, next) => {\n next(metadata);\n },\n sendMessage: (message, next) => {\n next(message);\n },\n sendStatus: (status, next) => {\n next(status);\n },\n};\nclass ServerInterceptingCall {\n constructor(nextCall, responder) {\n var _a, _b, _c, _d;\n this.nextCall = nextCall;\n this.processingMetadata = false;\n this.processingMessage = false;\n this.pendingMessage = null;\n this.pendingMessageCallback = null;\n this.pendingStatus = null;\n this.responder = {\n start: (_a = responder === null || responder === void 0 ? void 0 : responder.start) !== null && _a !== void 0 ? _a : defaultResponder.start,\n sendMetadata: (_b = responder === null || responder === void 0 ? void 0 : responder.sendMetadata) !== null && _b !== void 0 ? _b : defaultResponder.sendMetadata,\n sendMessage: (_c = responder === null || responder === void 0 ? void 0 : responder.sendMessage) !== null && _c !== void 0 ? _c : defaultResponder.sendMessage,\n sendStatus: (_d = responder === null || responder === void 0 ? void 0 : responder.sendStatus) !== null && _d !== void 0 ? _d : defaultResponder.sendStatus,\n };\n }\n processPendingMessage() {\n if (this.pendingMessageCallback) {\n this.nextCall.sendMessage(this.pendingMessage, this.pendingMessageCallback);\n this.pendingMessage = null;\n this.pendingMessageCallback = null;\n }\n }\n processPendingStatus() {\n if (this.pendingStatus) {\n this.nextCall.sendStatus(this.pendingStatus);\n this.pendingStatus = null;\n }\n }\n start(listener) {\n this.responder.start(interceptedListener => {\n var _a, _b, _c, _d;\n const fullInterceptedListener = {\n onReceiveMetadata: (_a = interceptedListener === null || interceptedListener === void 0 ? void 0 : interceptedListener.onReceiveMetadata) !== null && _a !== void 0 ? _a : defaultServerListener.onReceiveMetadata,\n onReceiveMessage: (_b = interceptedListener === null || interceptedListener === void 0 ? void 0 : interceptedListener.onReceiveMessage) !== null && _b !== void 0 ? _b : defaultServerListener.onReceiveMessage,\n onReceiveHalfClose: (_c = interceptedListener === null || interceptedListener === void 0 ? void 0 : interceptedListener.onReceiveHalfClose) !== null && _c !== void 0 ? _c : defaultServerListener.onReceiveHalfClose,\n onCancel: (_d = interceptedListener === null || interceptedListener === void 0 ? void 0 : interceptedListener.onCancel) !== null && _d !== void 0 ? _d : defaultServerListener.onCancel,\n };\n const finalInterceptingListener = new InterceptingServerListenerImpl(fullInterceptedListener, listener);\n this.nextCall.start(finalInterceptingListener);\n });\n }\n sendMetadata(metadata) {\n this.processingMetadata = true;\n this.responder.sendMetadata(metadata, interceptedMetadata => {\n this.processingMetadata = false;\n this.nextCall.sendMetadata(interceptedMetadata);\n this.processPendingMessage();\n this.processPendingStatus();\n });\n }\n sendMessage(message, callback) {\n this.processingMessage = true;\n this.responder.sendMessage(message, interceptedMessage => {\n this.processingMessage = false;\n if (this.processingMetadata) {\n this.pendingMessage = interceptedMessage;\n this.pendingMessageCallback = callback;\n }\n else {\n this.nextCall.sendMessage(interceptedMessage, callback);\n }\n });\n }\n sendStatus(status) {\n this.responder.sendStatus(status, interceptedStatus => {\n if (this.processingMetadata || this.processingMessage) {\n this.pendingStatus = interceptedStatus;\n }\n else {\n this.nextCall.sendStatus(interceptedStatus);\n }\n });\n }\n startRead() {\n this.nextCall.startRead();\n }\n getPeer() {\n return this.nextCall.getPeer();\n }\n getDeadline() {\n return this.nextCall.getDeadline();\n }\n}\nexports.ServerInterceptingCall = ServerInterceptingCall;\nconst GRPC_ACCEPT_ENCODING_HEADER = 'grpc-accept-encoding';\nconst GRPC_ENCODING_HEADER = 'grpc-encoding';\nconst GRPC_MESSAGE_HEADER = 'grpc-message';\nconst GRPC_STATUS_HEADER = 'grpc-status';\nconst GRPC_TIMEOUT_HEADER = 'grpc-timeout';\nconst DEADLINE_REGEX = /(\\d{1,8})\\s*([HMSmun])/;\nconst deadlineUnitsToMs = {\n H: 3600000,\n M: 60000,\n S: 1000,\n m: 1,\n u: 0.001,\n n: 0.000001,\n};\nconst defaultCompressionHeaders = {\n // TODO(cjihrig): Remove these encoding headers from the default response\n // once compression is integrated.\n [GRPC_ACCEPT_ENCODING_HEADER]: 'identity,deflate,gzip',\n [GRPC_ENCODING_HEADER]: 'identity',\n};\nconst defaultResponseHeaders = {\n [http2.constants.HTTP2_HEADER_STATUS]: http2.constants.HTTP_STATUS_OK,\n [http2.constants.HTTP2_HEADER_CONTENT_TYPE]: 'application/grpc+proto',\n};\nconst defaultResponseOptions = {\n waitForTrailers: true,\n};\nclass BaseServerInterceptingCall {\n constructor(stream, headers, callEventTracker, handler, options) {\n this.stream = stream;\n this.callEventTracker = callEventTracker;\n this.handler = handler;\n this.listener = null;\n this.deadlineTimer = null;\n this.deadline = Infinity;\n this.maxSendMessageSize = constants_1.DEFAULT_MAX_SEND_MESSAGE_LENGTH;\n this.maxReceiveMessageSize = constants_1.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;\n this.cancelled = false;\n this.metadataSent = false;\n this.wantTrailers = false;\n this.cancelNotified = false;\n this.incomingEncoding = 'identity';\n this.decoder = new stream_decoder_1.StreamDecoder();\n this.readQueue = [];\n this.isReadPending = false;\n this.receivedHalfClose = false;\n this.streamEnded = false;\n this.stream.once('error', (err) => {\n /* We need an error handler to avoid uncaught error event exceptions, but\n * there is nothing we can reasonably do here. Any error event should\n * have a corresponding close event, which handles emitting the cancelled\n * event. And the stream is now in a bad state, so we can't reasonably\n * expect to be able to send an error over it. */\n });\n this.stream.once('close', () => {\n var _a;\n trace('Request to method ' +\n ((_a = this.handler) === null || _a === void 0 ? void 0 : _a.path) +\n ' stream closed with rstCode ' +\n this.stream.rstCode);\n if (this.callEventTracker && !this.streamEnded) {\n this.streamEnded = true;\n this.callEventTracker.onStreamEnd(false);\n this.callEventTracker.onCallEnd({\n code: constants_1.Status.CANCELLED,\n details: 'Stream closed before sending status',\n metadata: null,\n });\n }\n this.notifyOnCancel();\n });\n this.stream.on('data', (data) => {\n this.handleDataFrame(data);\n });\n this.stream.pause();\n this.stream.on('end', () => {\n this.handleEndEvent();\n });\n if ('grpc.max_send_message_length' in options) {\n this.maxSendMessageSize = options['grpc.max_send_message_length'];\n }\n if ('grpc.max_receive_message_length' in options) {\n this.maxReceiveMessageSize = options['grpc.max_receive_message_length'];\n }\n const metadata = metadata_1.Metadata.fromHttp2Headers(headers);\n if (logging.isTracerEnabled(TRACER_NAME)) {\n trace('Request to ' +\n this.handler.path +\n ' received headers ' +\n JSON.stringify(metadata.toJSON()));\n }\n const timeoutHeader = metadata.get(GRPC_TIMEOUT_HEADER);\n if (timeoutHeader.length > 0) {\n this.handleTimeoutHeader(timeoutHeader[0]);\n }\n const encodingHeader = metadata.get(GRPC_ENCODING_HEADER);\n if (encodingHeader.length > 0) {\n this.incomingEncoding = encodingHeader[0];\n }\n // Remove several headers that should not be propagated to the application\n metadata.remove(GRPC_TIMEOUT_HEADER);\n metadata.remove(GRPC_ENCODING_HEADER);\n metadata.remove(GRPC_ACCEPT_ENCODING_HEADER);\n metadata.remove(http2.constants.HTTP2_HEADER_ACCEPT_ENCODING);\n metadata.remove(http2.constants.HTTP2_HEADER_TE);\n metadata.remove(http2.constants.HTTP2_HEADER_CONTENT_TYPE);\n this.metadata = metadata;\n }\n handleTimeoutHeader(timeoutHeader) {\n const match = timeoutHeader.toString().match(DEADLINE_REGEX);\n if (match === null) {\n const status = {\n code: constants_1.Status.INTERNAL,\n details: `Invalid ${GRPC_TIMEOUT_HEADER} value \"${timeoutHeader}\"`,\n metadata: null,\n };\n // Wait for the constructor to complete before sending the error.\n process.nextTick(() => {\n this.sendStatus(status);\n });\n return;\n }\n const timeout = (+match[1] * deadlineUnitsToMs[match[2]]) | 0;\n const now = new Date();\n this.deadline = now.setMilliseconds(now.getMilliseconds() + timeout);\n this.deadlineTimer = setTimeout(() => {\n const status = {\n code: constants_1.Status.DEADLINE_EXCEEDED,\n details: 'Deadline exceeded',\n metadata: null,\n };\n this.sendStatus(status);\n }, timeout);\n }\n checkCancelled() {\n /* In some cases the stream can become destroyed before the close event\n * fires. That creates a race condition that this check works around */\n if (!this.cancelled && (this.stream.destroyed || this.stream.closed)) {\n this.notifyOnCancel();\n this.cancelled = true;\n }\n return this.cancelled;\n }\n notifyOnCancel() {\n if (this.cancelNotified) {\n return;\n }\n this.cancelNotified = true;\n this.cancelled = true;\n process.nextTick(() => {\n var _a;\n (_a = this.listener) === null || _a === void 0 ? void 0 : _a.onCancel();\n });\n if (this.deadlineTimer) {\n clearTimeout(this.deadlineTimer);\n }\n // Flush incoming data frames\n this.stream.resume();\n }\n /**\n * A server handler can start sending messages without explicitly sending\n * metadata. In that case, we need to send headers before sending any\n * messages. This function does that if necessary.\n */\n maybeSendMetadata() {\n if (!this.metadataSent) {\n this.sendMetadata(new metadata_1.Metadata());\n }\n }\n /**\n * Serialize a message to a length-delimited byte string.\n * @param value\n * @returns\n */\n serializeMessage(value) {\n const messageBuffer = this.handler.serialize(value);\n const byteLength = messageBuffer.byteLength;\n const output = Buffer.allocUnsafe(byteLength + 5);\n /* Note: response compression is currently not supported, so this\n * compressed bit is always 0. */\n output.writeUInt8(0, 0);\n output.writeUInt32BE(byteLength, 1);\n messageBuffer.copy(output, 5);\n return output;\n }\n decompressMessage(message, encoding) {\n switch (encoding) {\n case 'deflate':\n return inflate(message.subarray(5));\n case 'gzip':\n return unzip(message.subarray(5));\n case 'identity':\n return message.subarray(5);\n default:\n return Promise.reject({\n code: constants_1.Status.UNIMPLEMENTED,\n details: `Received message compressed with unsupported encoding \"${encoding}\"`,\n });\n }\n }\n async decompressAndMaybePush(queueEntry) {\n if (queueEntry.type !== 'COMPRESSED') {\n throw new Error(`Invalid queue entry type: ${queueEntry.type}`);\n }\n const compressed = queueEntry.compressedMessage.readUInt8(0) === 1;\n const compressedMessageEncoding = compressed\n ? this.incomingEncoding\n : 'identity';\n const decompressedMessage = await this.decompressMessage(queueEntry.compressedMessage, compressedMessageEncoding);\n try {\n queueEntry.parsedMessage = this.handler.deserialize(decompressedMessage);\n }\n catch (err) {\n this.sendStatus({\n code: constants_1.Status.INTERNAL,\n details: `Error deserializing request: ${err.message}`,\n });\n return;\n }\n queueEntry.type = 'READABLE';\n this.maybePushNextMessage();\n }\n maybePushNextMessage() {\n if (this.listener &&\n this.isReadPending &&\n this.readQueue.length > 0 &&\n this.readQueue[0].type !== 'COMPRESSED') {\n this.isReadPending = false;\n const nextQueueEntry = this.readQueue.shift();\n if (nextQueueEntry.type === 'READABLE') {\n this.listener.onReceiveMessage(nextQueueEntry.parsedMessage);\n }\n else {\n // nextQueueEntry.type === 'HALF_CLOSE'\n this.listener.onReceiveHalfClose();\n }\n }\n }\n handleDataFrame(data) {\n var _a;\n if (this.checkCancelled()) {\n return;\n }\n trace('Request to ' +\n this.handler.path +\n ' received data frame of size ' +\n data.length);\n const rawMessages = this.decoder.write(data);\n for (const messageBytes of rawMessages) {\n this.stream.pause();\n if (this.maxReceiveMessageSize !== -1 &&\n messageBytes.length - 5 > this.maxReceiveMessageSize) {\n this.sendStatus({\n code: constants_1.Status.RESOURCE_EXHAUSTED,\n details: `Received message larger than max (${messageBytes.length - 5} vs. ${this.maxReceiveMessageSize})`,\n metadata: null,\n });\n return;\n }\n const queueEntry = {\n type: 'COMPRESSED',\n compressedMessage: messageBytes,\n parsedMessage: null,\n };\n this.readQueue.push(queueEntry);\n this.decompressAndMaybePush(queueEntry);\n (_a = this.callEventTracker) === null || _a === void 0 ? void 0 : _a.addMessageReceived();\n }\n }\n handleEndEvent() {\n this.readQueue.push({\n type: 'HALF_CLOSE',\n compressedMessage: null,\n parsedMessage: null,\n });\n this.receivedHalfClose = true;\n this.maybePushNextMessage();\n }\n start(listener) {\n trace('Request to ' + this.handler.path + ' start called');\n if (this.checkCancelled()) {\n return;\n }\n this.listener = listener;\n listener.onReceiveMetadata(this.metadata);\n }\n sendMetadata(metadata) {\n if (this.checkCancelled()) {\n return;\n }\n if (this.metadataSent) {\n return;\n }\n this.metadataSent = true;\n const custom = metadata ? metadata.toHttp2Headers() : null;\n const headers = Object.assign(Object.assign(Object.assign({}, defaultResponseHeaders), defaultCompressionHeaders), custom);\n this.stream.respond(headers, defaultResponseOptions);\n }\n sendMessage(message, callback) {\n if (this.checkCancelled()) {\n return;\n }\n let response;\n try {\n response = this.serializeMessage(message);\n }\n catch (e) {\n this.sendStatus({\n code: constants_1.Status.INTERNAL,\n details: `Error serializing response: ${(0, error_1.getErrorMessage)(e)}`,\n metadata: null,\n });\n return;\n }\n if (this.maxSendMessageSize !== -1 &&\n response.length - 5 > this.maxSendMessageSize) {\n this.sendStatus({\n code: constants_1.Status.RESOURCE_EXHAUSTED,\n details: `Sent message larger than max (${response.length} vs. ${this.maxSendMessageSize})`,\n metadata: null,\n });\n return;\n }\n this.maybeSendMetadata();\n trace('Request to ' +\n this.handler.path +\n ' sent data frame of size ' +\n response.length);\n this.stream.write(response, error => {\n var _a;\n if (error) {\n this.sendStatus({\n code: constants_1.Status.INTERNAL,\n details: `Error writing message: ${(0, error_1.getErrorMessage)(error)}`,\n metadata: null,\n });\n return;\n }\n (_a = this.callEventTracker) === null || _a === void 0 ? void 0 : _a.addMessageSent();\n callback();\n });\n }\n sendStatus(status) {\n var _a, _b;\n if (this.checkCancelled()) {\n return;\n }\n trace('Request to method ' +\n ((_a = this.handler) === null || _a === void 0 ? void 0 : _a.path) +\n ' ended with status code: ' +\n constants_1.Status[status.code] +\n ' details: ' +\n status.details);\n if (this.metadataSent) {\n if (!this.wantTrailers) {\n this.wantTrailers = true;\n this.stream.once('wantTrailers', () => {\n var _a;\n if (this.callEventTracker && !this.streamEnded) {\n this.streamEnded = true;\n this.callEventTracker.onStreamEnd(true);\n this.callEventTracker.onCallEnd(status);\n }\n const trailersToSend = Object.assign({ [GRPC_STATUS_HEADER]: status.code, [GRPC_MESSAGE_HEADER]: encodeURI(status.details) }, (_a = status.metadata) === null || _a === void 0 ? void 0 : _a.toHttp2Headers());\n this.stream.sendTrailers(trailersToSend);\n this.notifyOnCancel();\n });\n this.stream.end();\n }\n else {\n this.notifyOnCancel();\n }\n }\n else {\n if (this.callEventTracker && !this.streamEnded) {\n this.streamEnded = true;\n this.callEventTracker.onStreamEnd(true);\n this.callEventTracker.onCallEnd(status);\n }\n // Trailers-only response\n const trailersToSend = Object.assign(Object.assign({ [GRPC_STATUS_HEADER]: status.code, [GRPC_MESSAGE_HEADER]: encodeURI(status.details) }, defaultResponseHeaders), (_b = status.metadata) === null || _b === void 0 ? void 0 : _b.toHttp2Headers());\n this.stream.respond(trailersToSend, { endStream: true });\n this.notifyOnCancel();\n }\n }\n startRead() {\n trace('Request to ' + this.handler.path + ' startRead called');\n if (this.checkCancelled()) {\n return;\n }\n this.isReadPending = true;\n if (this.readQueue.length === 0) {\n if (!this.receivedHalfClose) {\n this.stream.resume();\n }\n }\n else {\n this.maybePushNextMessage();\n }\n }\n getPeer() {\n var _a;\n const socket = (_a = this.stream.session) === null || _a === void 0 ? void 0 : _a.socket;\n if (socket === null || socket === void 0 ? void 0 : socket.remoteAddress) {\n if (socket.remotePort) {\n return `${socket.remoteAddress}:${socket.remotePort}`;\n }\n else {\n return socket.remoteAddress;\n }\n }\n else {\n return 'unknown';\n }\n }\n getDeadline() {\n return this.deadline;\n }\n}\nexports.BaseServerInterceptingCall = BaseServerInterceptingCall;\nfunction getServerInterceptingCall(interceptors, stream, headers, callEventTracker, handler, options) {\n const methodDefinition = {\n path: handler.path,\n requestStream: handler.type === 'clientStream' || handler.type === 'bidi',\n responseStream: handler.type === 'serverStream' || handler.type === 'bidi',\n requestDeserialize: handler.deserialize,\n responseSerialize: handler.serialize,\n };\n const baseCall = new BaseServerInterceptingCall(stream, headers, callEventTracker, handler, options);\n return interceptors.reduce((call, interceptor) => {\n return interceptor(methodDefinition, call);\n }, baseCall);\n}\nexports.getServerInterceptingCall = getServerInterceptingCall;\n//# sourceMappingURL=server-interceptors.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nvar __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\nvar __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Server = void 0;\nconst http2 = require(\"http2\");\nconst util = require(\"util\");\nconst constants_1 = require(\"./constants\");\nconst server_call_1 = require(\"./server-call\");\nconst server_credentials_1 = require(\"./server-credentials\");\nconst resolver_1 = require(\"./resolver\");\nconst logging = require(\"./logging\");\nconst subchannel_address_1 = require(\"./subchannel-address\");\nconst uri_parser_1 = require(\"./uri-parser\");\nconst channelz_1 = require(\"./channelz\");\nconst server_interceptors_1 = require(\"./server-interceptors\");\nconst UNLIMITED_CONNECTION_AGE_MS = ~(1 << 31);\nconst KEEPALIVE_MAX_TIME_MS = ~(1 << 31);\nconst KEEPALIVE_TIMEOUT_MS = 20000;\nconst MAX_CONNECTION_IDLE_MS = ~(1 << 31);\nconst { HTTP2_HEADER_PATH } = http2.constants;\nconst TRACER_NAME = 'server';\nconst kMaxAge = Buffer.from('max_age');\nfunction noop() { }\n/**\n * Decorator to wrap a class method with util.deprecate\n * @param message The message to output if the deprecated method is called\n * @returns\n */\nfunction deprecate(message) {\n return function (target, context) {\n return util.deprecate(target, message);\n };\n}\nfunction getUnimplementedStatusResponse(methodName) {\n return {\n code: constants_1.Status.UNIMPLEMENTED,\n details: `The server does not implement the method ${methodName}`,\n };\n}\nfunction getDefaultHandler(handlerType, methodName) {\n const unimplementedStatusResponse = getUnimplementedStatusResponse(methodName);\n switch (handlerType) {\n case 'unary':\n return (call, callback) => {\n callback(unimplementedStatusResponse, null);\n };\n case 'clientStream':\n return (call, callback) => {\n callback(unimplementedStatusResponse, null);\n };\n case 'serverStream':\n return (call) => {\n call.emit('error', unimplementedStatusResponse);\n };\n case 'bidi':\n return (call) => {\n call.emit('error', unimplementedStatusResponse);\n };\n default:\n throw new Error(`Invalid handlerType ${handlerType}`);\n }\n}\nlet Server = (() => {\n var _a;\n let _instanceExtraInitializers = [];\n let _start_decorators;\n return _a = class Server {\n constructor(options) {\n var _b, _c, _d, _e, _f, _g;\n this.boundPorts = (__runInitializers(this, _instanceExtraInitializers), new Map());\n this.http2Servers = new Map();\n this.sessionIdleTimeouts = new Map();\n this.handlers = new Map();\n this.sessions = new Map();\n /**\n * This field only exists to ensure that the start method throws an error if\n * it is called twice, as it did previously.\n */\n this.started = false;\n this.shutdown = false;\n this.serverAddressString = 'null';\n // Channelz Info\n this.channelzEnabled = true;\n this.options = options !== null && options !== void 0 ? options : {};\n if (this.options['grpc.enable_channelz'] === 0) {\n this.channelzEnabled = false;\n this.channelzTrace = new channelz_1.ChannelzTraceStub();\n this.callTracker = new channelz_1.ChannelzCallTrackerStub();\n this.listenerChildrenTracker = new channelz_1.ChannelzChildrenTrackerStub();\n this.sessionChildrenTracker = new channelz_1.ChannelzChildrenTrackerStub();\n }\n else {\n this.channelzTrace = new channelz_1.ChannelzTrace();\n this.callTracker = new channelz_1.ChannelzCallTracker();\n this.listenerChildrenTracker = new channelz_1.ChannelzChildrenTracker();\n this.sessionChildrenTracker = new channelz_1.ChannelzChildrenTracker();\n }\n this.channelzRef = (0, channelz_1.registerChannelzServer)('server', () => this.getChannelzInfo(), this.channelzEnabled);\n this.channelzTrace.addTrace('CT_INFO', 'Server created');\n this.maxConnectionAgeMs =\n (_b = this.options['grpc.max_connection_age_ms']) !== null && _b !== void 0 ? _b : UNLIMITED_CONNECTION_AGE_MS;\n this.maxConnectionAgeGraceMs =\n (_c = this.options['grpc.max_connection_age_grace_ms']) !== null && _c !== void 0 ? _c : UNLIMITED_CONNECTION_AGE_MS;\n this.keepaliveTimeMs =\n (_d = this.options['grpc.keepalive_time_ms']) !== null && _d !== void 0 ? _d : KEEPALIVE_MAX_TIME_MS;\n this.keepaliveTimeoutMs =\n (_e = this.options['grpc.keepalive_timeout_ms']) !== null && _e !== void 0 ? _e : KEEPALIVE_TIMEOUT_MS;\n this.sessionIdleTimeout =\n (_f = this.options['grpc.max_connection_idle_ms']) !== null && _f !== void 0 ? _f : MAX_CONNECTION_IDLE_MS;\n this.commonServerOptions = {\n maxSendHeaderBlockLength: Number.MAX_SAFE_INTEGER,\n };\n if ('grpc-node.max_session_memory' in this.options) {\n this.commonServerOptions.maxSessionMemory =\n this.options['grpc-node.max_session_memory'];\n }\n else {\n /* By default, set a very large max session memory limit, to effectively\n * disable enforcement of the limit. Some testing indicates that Node's\n * behavior degrades badly when this limit is reached, so we solve that\n * by disabling the check entirely. */\n this.commonServerOptions.maxSessionMemory = Number.MAX_SAFE_INTEGER;\n }\n if ('grpc.max_concurrent_streams' in this.options) {\n this.commonServerOptions.settings = {\n maxConcurrentStreams: this.options['grpc.max_concurrent_streams'],\n };\n }\n this.interceptors = (_g = this.options.interceptors) !== null && _g !== void 0 ? _g : [];\n this.trace('Server constructed');\n }\n getChannelzInfo() {\n return {\n trace: this.channelzTrace,\n callTracker: this.callTracker,\n listenerChildren: this.listenerChildrenTracker.getChildLists(),\n sessionChildren: this.sessionChildrenTracker.getChildLists(),\n };\n }\n getChannelzSessionInfo(session) {\n var _b, _c, _d;\n const sessionInfo = this.sessions.get(session);\n const sessionSocket = session.socket;\n const remoteAddress = sessionSocket.remoteAddress\n ? (0, subchannel_address_1.stringToSubchannelAddress)(sessionSocket.remoteAddress, sessionSocket.remotePort)\n : null;\n const localAddress = sessionSocket.localAddress\n ? (0, subchannel_address_1.stringToSubchannelAddress)(sessionSocket.localAddress, sessionSocket.localPort)\n : null;\n let tlsInfo;\n if (session.encrypted) {\n const tlsSocket = sessionSocket;\n const cipherInfo = tlsSocket.getCipher();\n const certificate = tlsSocket.getCertificate();\n const peerCertificate = tlsSocket.getPeerCertificate();\n tlsInfo = {\n cipherSuiteStandardName: (_b = cipherInfo.standardName) !== null && _b !== void 0 ? _b : null,\n cipherSuiteOtherName: cipherInfo.standardName ? null : cipherInfo.name,\n localCertificate: certificate && 'raw' in certificate ? certificate.raw : null,\n remoteCertificate: peerCertificate && 'raw' in peerCertificate\n ? peerCertificate.raw\n : null,\n };\n }\n else {\n tlsInfo = null;\n }\n const socketInfo = {\n remoteAddress: remoteAddress,\n localAddress: localAddress,\n security: tlsInfo,\n remoteName: null,\n streamsStarted: sessionInfo.streamTracker.callsStarted,\n streamsSucceeded: sessionInfo.streamTracker.callsSucceeded,\n streamsFailed: sessionInfo.streamTracker.callsFailed,\n messagesSent: sessionInfo.messagesSent,\n messagesReceived: sessionInfo.messagesReceived,\n keepAlivesSent: sessionInfo.keepAlivesSent,\n lastLocalStreamCreatedTimestamp: null,\n lastRemoteStreamCreatedTimestamp: sessionInfo.streamTracker.lastCallStartedTimestamp,\n lastMessageSentTimestamp: sessionInfo.lastMessageSentTimestamp,\n lastMessageReceivedTimestamp: sessionInfo.lastMessageReceivedTimestamp,\n localFlowControlWindow: (_c = session.state.localWindowSize) !== null && _c !== void 0 ? _c : null,\n remoteFlowControlWindow: (_d = session.state.remoteWindowSize) !== null && _d !== void 0 ? _d : null,\n };\n return socketInfo;\n }\n trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '(' + this.channelzRef.id + ') ' + text);\n }\n addProtoService() {\n throw new Error('Not implemented. Use addService() instead');\n }\n addService(service, implementation) {\n if (service === null ||\n typeof service !== 'object' ||\n implementation === null ||\n typeof implementation !== 'object') {\n throw new Error('addService() requires two objects as arguments');\n }\n const serviceKeys = Object.keys(service);\n if (serviceKeys.length === 0) {\n throw new Error('Cannot add an empty service to a server');\n }\n serviceKeys.forEach(name => {\n const attrs = service[name];\n let methodType;\n if (attrs.requestStream) {\n if (attrs.responseStream) {\n methodType = 'bidi';\n }\n else {\n methodType = 'clientStream';\n }\n }\n else {\n if (attrs.responseStream) {\n methodType = 'serverStream';\n }\n else {\n methodType = 'unary';\n }\n }\n let implFn = implementation[name];\n let impl;\n if (implFn === undefined && typeof attrs.originalName === 'string') {\n implFn = implementation[attrs.originalName];\n }\n if (implFn !== undefined) {\n impl = implFn.bind(implementation);\n }\n else {\n impl = getDefaultHandler(methodType, name);\n }\n const success = this.register(attrs.path, impl, attrs.responseSerialize, attrs.requestDeserialize, methodType);\n if (success === false) {\n throw new Error(`Method handler for ${attrs.path} already provided.`);\n }\n });\n }\n removeService(service) {\n if (service === null || typeof service !== 'object') {\n throw new Error('removeService() requires object as argument');\n }\n const serviceKeys = Object.keys(service);\n serviceKeys.forEach(name => {\n const attrs = service[name];\n this.unregister(attrs.path);\n });\n }\n bind(port, creds) {\n throw new Error('Not implemented. Use bindAsync() instead');\n }\n registerListenerToChannelz(boundAddress) {\n return (0, channelz_1.registerChannelzSocket)((0, subchannel_address_1.subchannelAddressToString)(boundAddress), () => {\n return {\n localAddress: boundAddress,\n remoteAddress: null,\n security: null,\n remoteName: null,\n streamsStarted: 0,\n streamsSucceeded: 0,\n streamsFailed: 0,\n messagesSent: 0,\n messagesReceived: 0,\n keepAlivesSent: 0,\n lastLocalStreamCreatedTimestamp: null,\n lastRemoteStreamCreatedTimestamp: null,\n lastMessageSentTimestamp: null,\n lastMessageReceivedTimestamp: null,\n localFlowControlWindow: null,\n remoteFlowControlWindow: null,\n };\n }, this.channelzEnabled);\n }\n createHttp2Server(credentials) {\n let http2Server;\n if (credentials._isSecure()) {\n const secureServerOptions = Object.assign(this.commonServerOptions, credentials._getSettings());\n secureServerOptions.enableTrace =\n this.options['grpc-node.tls_enable_trace'] === 1;\n http2Server = http2.createSecureServer(secureServerOptions);\n http2Server.on('secureConnection', (socket) => {\n /* These errors need to be handled by the user of Http2SecureServer,\n * according to https://github.com/nodejs/node/issues/35824 */\n socket.on('error', (e) => {\n this.trace('An incoming TLS connection closed with error: ' + e.message);\n });\n });\n }\n else {\n http2Server = http2.createServer(this.commonServerOptions);\n }\n http2Server.setTimeout(0, noop);\n this._setupHandlers(http2Server);\n return http2Server;\n }\n bindOneAddress(address, boundPortObject) {\n this.trace('Attempting to bind ' + (0, subchannel_address_1.subchannelAddressToString)(address));\n const http2Server = this.createHttp2Server(boundPortObject.credentials);\n return new Promise((resolve, reject) => {\n const onError = (err) => {\n this.trace('Failed to bind ' +\n (0, subchannel_address_1.subchannelAddressToString)(address) +\n ' with error ' +\n err.message);\n resolve({\n port: 'port' in address ? address.port : 1,\n error: err.message,\n });\n };\n http2Server.once('error', onError);\n http2Server.listen(address, () => {\n const boundAddress = http2Server.address();\n let boundSubchannelAddress;\n if (typeof boundAddress === 'string') {\n boundSubchannelAddress = {\n path: boundAddress,\n };\n }\n else {\n boundSubchannelAddress = {\n host: boundAddress.address,\n port: boundAddress.port,\n };\n }\n const channelzRef = this.registerListenerToChannelz(boundSubchannelAddress);\n this.listenerChildrenTracker.refChild(channelzRef);\n this.http2Servers.set(http2Server, {\n channelzRef: channelzRef,\n sessions: new Set(),\n });\n boundPortObject.listeningServers.add(http2Server);\n this.trace('Successfully bound ' +\n (0, subchannel_address_1.subchannelAddressToString)(boundSubchannelAddress));\n resolve({\n port: 'port' in boundSubchannelAddress ? boundSubchannelAddress.port : 1,\n });\n http2Server.removeListener('error', onError);\n });\n });\n }\n async bindManyPorts(addressList, boundPortObject) {\n if (addressList.length === 0) {\n return {\n count: 0,\n port: 0,\n errors: [],\n };\n }\n if ((0, subchannel_address_1.isTcpSubchannelAddress)(addressList[0]) && addressList[0].port === 0) {\n /* If binding to port 0, first try to bind the first address, then bind\n * the rest of the address list to the specific port that it binds. */\n const firstAddressResult = await this.bindOneAddress(addressList[0], boundPortObject);\n if (firstAddressResult.error) {\n /* If the first address fails to bind, try the same operation starting\n * from the second item in the list. */\n const restAddressResult = await this.bindManyPorts(addressList.slice(1), boundPortObject);\n return Object.assign(Object.assign({}, restAddressResult), { errors: [firstAddressResult.error, ...restAddressResult.errors] });\n }\n else {\n const restAddresses = addressList\n .slice(1)\n .map(address => (0, subchannel_address_1.isTcpSubchannelAddress)(address)\n ? { host: address.host, port: firstAddressResult.port }\n : address);\n const restAddressResult = await Promise.all(restAddresses.map(address => this.bindOneAddress(address, boundPortObject)));\n const allResults = [firstAddressResult, ...restAddressResult];\n return {\n count: allResults.filter(result => result.error === undefined).length,\n port: firstAddressResult.port,\n errors: allResults\n .filter(result => result.error)\n .map(result => result.error),\n };\n }\n }\n else {\n const allResults = await Promise.all(addressList.map(address => this.bindOneAddress(address, boundPortObject)));\n return {\n count: allResults.filter(result => result.error === undefined).length,\n port: allResults[0].port,\n errors: allResults\n .filter(result => result.error)\n .map(result => result.error),\n };\n }\n }\n async bindAddressList(addressList, boundPortObject) {\n const bindResult = await this.bindManyPorts(addressList, boundPortObject);\n if (bindResult.count > 0) {\n if (bindResult.count < addressList.length) {\n logging.log(constants_1.LogVerbosity.INFO, `WARNING Only ${bindResult.count} addresses added out of total ${addressList.length} resolved`);\n }\n return bindResult.port;\n }\n else {\n const errorString = `No address added out of total ${addressList.length} resolved`;\n logging.log(constants_1.LogVerbosity.ERROR, errorString);\n throw new Error(`${errorString} errors: [${bindResult.errors.join(',')}]`);\n }\n }\n resolvePort(port) {\n return new Promise((resolve, reject) => {\n const resolverListener = {\n onSuccessfulResolution: (endpointList, serviceConfig, serviceConfigError) => {\n // We only want one resolution result. Discard all future results\n resolverListener.onSuccessfulResolution = () => { };\n const addressList = [].concat(...endpointList.map(endpoint => endpoint.addresses));\n if (addressList.length === 0) {\n reject(new Error(`No addresses resolved for port ${port}`));\n return;\n }\n resolve(addressList);\n },\n onError: error => {\n reject(new Error(error.details));\n },\n };\n const resolver = (0, resolver_1.createResolver)(port, resolverListener, this.options);\n resolver.updateResolution();\n });\n }\n async bindPort(port, boundPortObject) {\n const addressList = await this.resolvePort(port);\n if (boundPortObject.cancelled) {\n this.completeUnbind(boundPortObject);\n throw new Error('bindAsync operation cancelled by unbind call');\n }\n const portNumber = await this.bindAddressList(addressList, boundPortObject);\n if (boundPortObject.cancelled) {\n this.completeUnbind(boundPortObject);\n throw new Error('bindAsync operation cancelled by unbind call');\n }\n return portNumber;\n }\n normalizePort(port) {\n const initialPortUri = (0, uri_parser_1.parseUri)(port);\n if (initialPortUri === null) {\n throw new Error(`Could not parse port \"${port}\"`);\n }\n const portUri = (0, resolver_1.mapUriDefaultScheme)(initialPortUri);\n if (portUri === null) {\n throw new Error(`Could not get a default scheme for port \"${port}\"`);\n }\n return portUri;\n }\n bindAsync(port, creds, callback) {\n if (this.shutdown) {\n throw new Error('bindAsync called after shutdown');\n }\n if (typeof port !== 'string') {\n throw new TypeError('port must be a string');\n }\n if (creds === null || !(creds instanceof server_credentials_1.ServerCredentials)) {\n throw new TypeError('creds must be a ServerCredentials object');\n }\n if (typeof callback !== 'function') {\n throw new TypeError('callback must be a function');\n }\n this.trace('bindAsync port=' + port);\n const portUri = this.normalizePort(port);\n const deferredCallback = (error, port) => {\n process.nextTick(() => callback(error, port));\n };\n /* First, if this port is already bound or that bind operation is in\n * progress, use that result. */\n let boundPortObject = this.boundPorts.get((0, uri_parser_1.uriToString)(portUri));\n if (boundPortObject) {\n if (!creds._equals(boundPortObject.credentials)) {\n deferredCallback(new Error(`${port} already bound with incompatible credentials`), 0);\n return;\n }\n /* If that operation has previously been cancelled by an unbind call,\n * uncancel it. */\n boundPortObject.cancelled = false;\n if (boundPortObject.completionPromise) {\n boundPortObject.completionPromise.then(portNum => callback(null, portNum), error => callback(error, 0));\n }\n else {\n deferredCallback(null, boundPortObject.portNumber);\n }\n return;\n }\n boundPortObject = {\n mapKey: (0, uri_parser_1.uriToString)(portUri),\n originalUri: portUri,\n completionPromise: null,\n cancelled: false,\n portNumber: 0,\n credentials: creds,\n listeningServers: new Set(),\n };\n const splitPort = (0, uri_parser_1.splitHostPort)(portUri.path);\n const completionPromise = this.bindPort(portUri, boundPortObject);\n boundPortObject.completionPromise = completionPromise;\n /* If the port number is 0, defer populating the map entry until after the\n * bind operation completes and we have a specific port number. Otherwise,\n * populate it immediately. */\n if ((splitPort === null || splitPort === void 0 ? void 0 : splitPort.port) === 0) {\n completionPromise.then(portNum => {\n const finalUri = {\n scheme: portUri.scheme,\n authority: portUri.authority,\n path: (0, uri_parser_1.combineHostPort)({ host: splitPort.host, port: portNum }),\n };\n boundPortObject.mapKey = (0, uri_parser_1.uriToString)(finalUri);\n boundPortObject.completionPromise = null;\n boundPortObject.portNumber = portNum;\n this.boundPorts.set(boundPortObject.mapKey, boundPortObject);\n callback(null, portNum);\n }, error => {\n callback(error, 0);\n });\n }\n else {\n this.boundPorts.set(boundPortObject.mapKey, boundPortObject);\n completionPromise.then(portNum => {\n boundPortObject.completionPromise = null;\n boundPortObject.portNumber = portNum;\n callback(null, portNum);\n }, error => {\n callback(error, 0);\n });\n }\n }\n closeServer(server, callback) {\n this.trace('Closing server with address ' + JSON.stringify(server.address()));\n const serverInfo = this.http2Servers.get(server);\n server.close(() => {\n if (serverInfo) {\n this.listenerChildrenTracker.unrefChild(serverInfo.channelzRef);\n (0, channelz_1.unregisterChannelzRef)(serverInfo.channelzRef);\n }\n this.http2Servers.delete(server);\n callback === null || callback === void 0 ? void 0 : callback();\n });\n }\n closeSession(session, callback) {\n var _b;\n this.trace('Closing session initiated by ' + ((_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress));\n const sessionInfo = this.sessions.get(session);\n const closeCallback = () => {\n if (sessionInfo) {\n this.sessionChildrenTracker.unrefChild(sessionInfo.ref);\n (0, channelz_1.unregisterChannelzRef)(sessionInfo.ref);\n }\n callback === null || callback === void 0 ? void 0 : callback();\n };\n if (session.closed) {\n queueMicrotask(closeCallback);\n }\n else {\n session.close(closeCallback);\n }\n }\n completeUnbind(boundPortObject) {\n for (const server of boundPortObject.listeningServers) {\n const serverInfo = this.http2Servers.get(server);\n this.closeServer(server, () => {\n boundPortObject.listeningServers.delete(server);\n });\n if (serverInfo) {\n for (const session of serverInfo.sessions) {\n this.closeSession(session);\n }\n }\n }\n this.boundPorts.delete(boundPortObject.mapKey);\n }\n /**\n * Unbind a previously bound port, or cancel an in-progress bindAsync\n * operation. If port 0 was bound, only the actual bound port can be\n * unbound. For example, if bindAsync was called with \"localhost:0\" and the\n * bound port result was 54321, it can be unbound as \"localhost:54321\".\n * @param port\n */\n unbind(port) {\n this.trace('unbind port=' + port);\n const portUri = this.normalizePort(port);\n const splitPort = (0, uri_parser_1.splitHostPort)(portUri.path);\n if ((splitPort === null || splitPort === void 0 ? void 0 : splitPort.port) === 0) {\n throw new Error('Cannot unbind port 0');\n }\n const boundPortObject = this.boundPorts.get((0, uri_parser_1.uriToString)(portUri));\n if (boundPortObject) {\n this.trace('unbinding ' +\n boundPortObject.mapKey +\n ' originally bound as ' +\n (0, uri_parser_1.uriToString)(boundPortObject.originalUri));\n /* If the bind operation is pending, the cancelled flag will trigger\n * the unbind operation later. */\n if (boundPortObject.completionPromise) {\n boundPortObject.cancelled = true;\n }\n else {\n this.completeUnbind(boundPortObject);\n }\n }\n }\n /**\n * Gracefully close all connections associated with a previously bound port.\n * After the grace time, forcefully close all remaining open connections.\n *\n * If port 0 was bound, only the actual bound port can be\n * drained. For example, if bindAsync was called with \"localhost:0\" and the\n * bound port result was 54321, it can be drained as \"localhost:54321\".\n * @param port\n * @param graceTimeMs\n * @returns\n */\n drain(port, graceTimeMs) {\n var _b, _c;\n this.trace('drain port=' + port + ' graceTimeMs=' + graceTimeMs);\n const portUri = this.normalizePort(port);\n const splitPort = (0, uri_parser_1.splitHostPort)(portUri.path);\n if ((splitPort === null || splitPort === void 0 ? void 0 : splitPort.port) === 0) {\n throw new Error('Cannot drain port 0');\n }\n const boundPortObject = this.boundPorts.get((0, uri_parser_1.uriToString)(portUri));\n if (!boundPortObject) {\n return;\n }\n const allSessions = new Set();\n for (const http2Server of boundPortObject.listeningServers) {\n const serverEntry = this.http2Servers.get(http2Server);\n if (serverEntry) {\n for (const session of serverEntry.sessions) {\n allSessions.add(session);\n this.closeSession(session, () => {\n allSessions.delete(session);\n });\n }\n }\n }\n /* After the grace time ends, send another goaway to all remaining sessions\n * with the CANCEL code. */\n (_c = (_b = setTimeout(() => {\n for (const session of allSessions) {\n session.destroy(http2.constants.NGHTTP2_CANCEL);\n }\n }, graceTimeMs)).unref) === null || _c === void 0 ? void 0 : _c.call(_b);\n }\n forceShutdown() {\n for (const boundPortObject of this.boundPorts.values()) {\n boundPortObject.cancelled = true;\n }\n this.boundPorts.clear();\n // Close the server if it is still running.\n for (const server of this.http2Servers.keys()) {\n this.closeServer(server);\n }\n // Always destroy any available sessions. It's possible that one or more\n // tryShutdown() calls are in progress. Don't wait on them to finish.\n this.sessions.forEach((channelzInfo, session) => {\n this.closeSession(session);\n // Cast NGHTTP2_CANCEL to any because TypeScript doesn't seem to\n // recognize destroy(code) as a valid signature.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n session.destroy(http2.constants.NGHTTP2_CANCEL);\n });\n this.sessions.clear();\n (0, channelz_1.unregisterChannelzRef)(this.channelzRef);\n this.shutdown = true;\n }\n register(name, handler, serialize, deserialize, type) {\n if (this.handlers.has(name)) {\n return false;\n }\n this.handlers.set(name, {\n func: handler,\n serialize,\n deserialize,\n type,\n path: name,\n });\n return true;\n }\n unregister(name) {\n return this.handlers.delete(name);\n }\n /**\n * @deprecated No longer needed as of version 1.10.x\n */\n start() {\n if (this.http2Servers.size === 0 ||\n [...this.http2Servers.keys()].every(server => !server.listening)) {\n throw new Error('server must be bound in order to start');\n }\n if (this.started === true) {\n throw new Error('server is already started');\n }\n this.started = true;\n }\n tryShutdown(callback) {\n var _b;\n const wrappedCallback = (error) => {\n (0, channelz_1.unregisterChannelzRef)(this.channelzRef);\n callback(error);\n };\n let pendingChecks = 0;\n function maybeCallback() {\n pendingChecks--;\n if (pendingChecks === 0) {\n wrappedCallback();\n }\n }\n this.shutdown = true;\n for (const [serverKey, server] of this.http2Servers.entries()) {\n pendingChecks++;\n const serverString = server.channelzRef.name;\n this.trace('Waiting for server ' + serverString + ' to close');\n this.closeServer(serverKey, () => {\n this.trace('Server ' + serverString + ' finished closing');\n maybeCallback();\n });\n for (const session of server.sessions.keys()) {\n pendingChecks++;\n const sessionString = (_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress;\n this.trace('Waiting for session ' + sessionString + ' to close');\n this.closeSession(session, () => {\n this.trace('Session ' + sessionString + ' finished closing');\n maybeCallback();\n });\n }\n }\n if (pendingChecks === 0) {\n wrappedCallback();\n }\n }\n addHttp2Port() {\n throw new Error('Not yet implemented');\n }\n /**\n * Get the channelz reference object for this server. The returned value is\n * garbage if channelz is disabled for this server.\n * @returns\n */\n getChannelzRef() {\n return this.channelzRef;\n }\n _verifyContentType(stream, headers) {\n const contentType = headers[http2.constants.HTTP2_HEADER_CONTENT_TYPE];\n if (typeof contentType !== 'string' ||\n !contentType.startsWith('application/grpc')) {\n stream.respond({\n [http2.constants.HTTP2_HEADER_STATUS]: http2.constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE,\n }, { endStream: true });\n return false;\n }\n return true;\n }\n _retrieveHandler(path) {\n this.trace('Received call to method ' +\n path +\n ' at address ' +\n this.serverAddressString);\n const handler = this.handlers.get(path);\n if (handler === undefined) {\n this.trace('No handler registered for method ' +\n path +\n '. Sending UNIMPLEMENTED status.');\n return null;\n }\n return handler;\n }\n _respondWithError(err, stream, channelzSessionInfo = null) {\n var _b, _c;\n const trailersToSend = Object.assign({ 'grpc-status': (_b = err.code) !== null && _b !== void 0 ? _b : constants_1.Status.INTERNAL, 'grpc-message': err.details, [http2.constants.HTTP2_HEADER_STATUS]: http2.constants.HTTP_STATUS_OK, [http2.constants.HTTP2_HEADER_CONTENT_TYPE]: 'application/grpc+proto' }, (_c = err.metadata) === null || _c === void 0 ? void 0 : _c.toHttp2Headers());\n stream.respond(trailersToSend, { endStream: true });\n this.callTracker.addCallFailed();\n channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallFailed();\n }\n _channelzHandler(stream, headers) {\n // for handling idle timeout\n this.onStreamOpened(stream);\n const channelzSessionInfo = this.sessions.get(stream.session);\n this.callTracker.addCallStarted();\n channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallStarted();\n if (!this._verifyContentType(stream, headers)) {\n this.callTracker.addCallFailed();\n channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallFailed();\n return;\n }\n const path = headers[HTTP2_HEADER_PATH];\n const handler = this._retrieveHandler(path);\n if (!handler) {\n this._respondWithError(getUnimplementedStatusResponse(path), stream, channelzSessionInfo);\n return;\n }\n const callEventTracker = {\n addMessageSent: () => {\n if (channelzSessionInfo) {\n channelzSessionInfo.messagesSent += 1;\n channelzSessionInfo.lastMessageSentTimestamp = new Date();\n }\n },\n addMessageReceived: () => {\n if (channelzSessionInfo) {\n channelzSessionInfo.messagesReceived += 1;\n channelzSessionInfo.lastMessageReceivedTimestamp = new Date();\n }\n },\n onCallEnd: status => {\n if (status.code === constants_1.Status.OK) {\n this.callTracker.addCallSucceeded();\n }\n else {\n this.callTracker.addCallFailed();\n }\n },\n onStreamEnd: success => {\n if (channelzSessionInfo) {\n if (success) {\n channelzSessionInfo.streamTracker.addCallSucceeded();\n }\n else {\n channelzSessionInfo.streamTracker.addCallFailed();\n }\n }\n },\n };\n const call = (0, server_interceptors_1.getServerInterceptingCall)(this.interceptors, stream, headers, callEventTracker, handler, this.options);\n if (!this._runHandlerForCall(call, handler)) {\n this.callTracker.addCallFailed();\n channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallFailed();\n call.sendStatus({\n code: constants_1.Status.INTERNAL,\n details: `Unknown handler type: ${handler.type}`,\n });\n }\n }\n _streamHandler(stream, headers) {\n // for handling idle timeout\n this.onStreamOpened(stream);\n if (this._verifyContentType(stream, headers) !== true) {\n return;\n }\n const path = headers[HTTP2_HEADER_PATH];\n const handler = this._retrieveHandler(path);\n if (!handler) {\n this._respondWithError(getUnimplementedStatusResponse(path), stream, null);\n return;\n }\n const call = (0, server_interceptors_1.getServerInterceptingCall)(this.interceptors, stream, headers, null, handler, this.options);\n if (!this._runHandlerForCall(call, handler)) {\n call.sendStatus({\n code: constants_1.Status.INTERNAL,\n details: `Unknown handler type: ${handler.type}`,\n });\n }\n }\n _runHandlerForCall(call, handler) {\n const { type } = handler;\n if (type === 'unary') {\n handleUnary(call, handler);\n }\n else if (type === 'clientStream') {\n handleClientStreaming(call, handler);\n }\n else if (type === 'serverStream') {\n handleServerStreaming(call, handler);\n }\n else if (type === 'bidi') {\n handleBidiStreaming(call, handler);\n }\n else {\n return false;\n }\n return true;\n }\n _setupHandlers(http2Server) {\n if (http2Server === null) {\n return;\n }\n const serverAddress = http2Server.address();\n let serverAddressString = 'null';\n if (serverAddress) {\n if (typeof serverAddress === 'string') {\n serverAddressString = serverAddress;\n }\n else {\n serverAddressString = serverAddress.address + ':' + serverAddress.port;\n }\n }\n this.serverAddressString = serverAddressString;\n const handler = this.channelzEnabled\n ? this._channelzHandler\n : this._streamHandler;\n const sessionHandler = this.channelzEnabled\n ? this._channelzSessionHandler(http2Server)\n : this._sessionHandler(http2Server);\n http2Server.on('stream', handler.bind(this));\n http2Server.on('session', sessionHandler);\n }\n _sessionHandler(http2Server) {\n return (session) => {\n var _b, _c, _d;\n (_b = this.http2Servers.get(http2Server)) === null || _b === void 0 ? void 0 : _b.sessions.add(session);\n let connectionAgeTimer = null;\n let connectionAgeGraceTimer = null;\n let keeapliveTimeTimer = null;\n let keepaliveTimeoutTimer = null;\n let sessionClosedByServer = false;\n const idleTimeoutObj = this.enableIdleTimeout(session);\n if (this.maxConnectionAgeMs !== UNLIMITED_CONNECTION_AGE_MS) {\n // Apply a random jitter within a +/-10% range\n const jitterMagnitude = this.maxConnectionAgeMs / 10;\n const jitter = Math.random() * jitterMagnitude * 2 - jitterMagnitude;\n connectionAgeTimer = setTimeout(() => {\n var _b, _c;\n sessionClosedByServer = true;\n this.trace('Connection dropped by max connection age: ' +\n ((_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress));\n try {\n session.goaway(http2.constants.NGHTTP2_NO_ERROR, ~(1 << 31), kMaxAge);\n }\n catch (e) {\n // The goaway can't be sent because the session is already closed\n session.destroy();\n return;\n }\n session.close();\n /* Allow a grace period after sending the GOAWAY before forcibly\n * closing the connection. */\n if (this.maxConnectionAgeGraceMs !== UNLIMITED_CONNECTION_AGE_MS) {\n connectionAgeGraceTimer = setTimeout(() => {\n session.destroy();\n }, this.maxConnectionAgeGraceMs);\n (_c = connectionAgeGraceTimer.unref) === null || _c === void 0 ? void 0 : _c.call(connectionAgeGraceTimer);\n }\n }, this.maxConnectionAgeMs + jitter);\n (_c = connectionAgeTimer.unref) === null || _c === void 0 ? void 0 : _c.call(connectionAgeTimer);\n }\n if (this.keepaliveTimeMs < KEEPALIVE_MAX_TIME_MS) {\n keeapliveTimeTimer = setInterval(() => {\n var _b;\n keepaliveTimeoutTimer = setTimeout(() => {\n sessionClosedByServer = true;\n session.close();\n }, this.keepaliveTimeoutMs);\n (_b = keepaliveTimeoutTimer.unref) === null || _b === void 0 ? void 0 : _b.call(keepaliveTimeoutTimer);\n try {\n session.ping((err, duration, payload) => {\n if (keepaliveTimeoutTimer) {\n clearTimeout(keepaliveTimeoutTimer);\n }\n if (err) {\n sessionClosedByServer = true;\n this.trace('Connection dropped due to error of a ping frame ' +\n err.message +\n ' return in ' +\n duration);\n session.close();\n }\n });\n }\n catch (e) {\n clearTimeout(keepaliveTimeoutTimer);\n // The ping can't be sent because the session is already closed\n session.destroy();\n }\n }, this.keepaliveTimeMs);\n (_d = keeapliveTimeTimer.unref) === null || _d === void 0 ? void 0 : _d.call(keeapliveTimeTimer);\n }\n session.on('close', () => {\n var _b, _c;\n if (!sessionClosedByServer) {\n this.trace(`Connection dropped by client ${(_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress}`);\n }\n if (connectionAgeTimer) {\n clearTimeout(connectionAgeTimer);\n }\n if (connectionAgeGraceTimer) {\n clearTimeout(connectionAgeGraceTimer);\n }\n if (keeapliveTimeTimer) {\n clearInterval(keeapliveTimeTimer);\n if (keepaliveTimeoutTimer) {\n clearTimeout(keepaliveTimeoutTimer);\n }\n }\n if (idleTimeoutObj !== null) {\n clearTimeout(idleTimeoutObj.timeout);\n this.sessionIdleTimeouts.delete(session);\n }\n (_c = this.http2Servers.get(http2Server)) === null || _c === void 0 ? void 0 : _c.sessions.delete(session);\n });\n };\n }\n _channelzSessionHandler(http2Server) {\n return (session) => {\n var _b, _c, _d, _e, _f;\n const channelzRef = (0, channelz_1.registerChannelzSocket)((_c = (_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress) !== null && _c !== void 0 ? _c : 'unknown', this.getChannelzSessionInfo.bind(this, session), this.channelzEnabled);\n const channelzSessionInfo = {\n ref: channelzRef,\n streamTracker: new channelz_1.ChannelzCallTracker(),\n messagesSent: 0,\n messagesReceived: 0,\n keepAlivesSent: 0,\n lastMessageSentTimestamp: null,\n lastMessageReceivedTimestamp: null,\n };\n (_d = this.http2Servers.get(http2Server)) === null || _d === void 0 ? void 0 : _d.sessions.add(session);\n this.sessions.set(session, channelzSessionInfo);\n const clientAddress = `${session.socket.remoteAddress}:${session.socket.remotePort}`;\n this.channelzTrace.addTrace('CT_INFO', 'Connection established by client ' + clientAddress);\n this.trace('Connection established by client ' + clientAddress);\n this.sessionChildrenTracker.refChild(channelzRef);\n let connectionAgeTimer = null;\n let connectionAgeGraceTimer = null;\n let keeapliveTimeTimer = null;\n let keepaliveTimeoutTimer = null;\n let sessionClosedByServer = false;\n const idleTimeoutObj = this.enableIdleTimeout(session);\n if (this.maxConnectionAgeMs !== UNLIMITED_CONNECTION_AGE_MS) {\n // Apply a random jitter within a +/-10% range\n const jitterMagnitude = this.maxConnectionAgeMs / 10;\n const jitter = Math.random() * jitterMagnitude * 2 - jitterMagnitude;\n connectionAgeTimer = setTimeout(() => {\n var _b;\n sessionClosedByServer = true;\n this.channelzTrace.addTrace('CT_INFO', 'Connection dropped by max connection age from ' + clientAddress);\n try {\n session.goaway(http2.constants.NGHTTP2_NO_ERROR, ~(1 << 31), kMaxAge);\n }\n catch (e) {\n // The goaway can't be sent because the session is already closed\n session.destroy();\n return;\n }\n session.close();\n /* Allow a grace period after sending the GOAWAY before forcibly\n * closing the connection. */\n if (this.maxConnectionAgeGraceMs !== UNLIMITED_CONNECTION_AGE_MS) {\n connectionAgeGraceTimer = setTimeout(() => {\n session.destroy();\n }, this.maxConnectionAgeGraceMs);\n (_b = connectionAgeGraceTimer.unref) === null || _b === void 0 ? void 0 : _b.call(connectionAgeGraceTimer);\n }\n }, this.maxConnectionAgeMs + jitter);\n (_e = connectionAgeTimer.unref) === null || _e === void 0 ? void 0 : _e.call(connectionAgeTimer);\n }\n if (this.keepaliveTimeMs < KEEPALIVE_MAX_TIME_MS) {\n keeapliveTimeTimer = setInterval(() => {\n var _b;\n keepaliveTimeoutTimer = setTimeout(() => {\n sessionClosedByServer = true;\n this.channelzTrace.addTrace('CT_INFO', 'Connection dropped by keepalive timeout from ' + clientAddress);\n session.close();\n }, this.keepaliveTimeoutMs);\n (_b = keepaliveTimeoutTimer.unref) === null || _b === void 0 ? void 0 : _b.call(keepaliveTimeoutTimer);\n try {\n session.ping((err, duration, payload) => {\n if (keepaliveTimeoutTimer) {\n clearTimeout(keepaliveTimeoutTimer);\n }\n if (err) {\n sessionClosedByServer = true;\n this.channelzTrace.addTrace('CT_INFO', 'Connection dropped due to error of a ping frame ' +\n err.message +\n ' return in ' +\n duration);\n session.close();\n }\n });\n channelzSessionInfo.keepAlivesSent += 1;\n }\n catch (e) {\n clearTimeout(keepaliveTimeoutTimer);\n // The ping can't be sent because the session is already closed\n session.destroy();\n }\n }, this.keepaliveTimeMs);\n (_f = keeapliveTimeTimer.unref) === null || _f === void 0 ? void 0 : _f.call(keeapliveTimeTimer);\n }\n session.on('close', () => {\n var _b;\n if (!sessionClosedByServer) {\n this.channelzTrace.addTrace('CT_INFO', 'Connection dropped by client ' + clientAddress);\n }\n this.sessionChildrenTracker.unrefChild(channelzRef);\n (0, channelz_1.unregisterChannelzRef)(channelzRef);\n if (connectionAgeTimer) {\n clearTimeout(connectionAgeTimer);\n }\n if (connectionAgeGraceTimer) {\n clearTimeout(connectionAgeGraceTimer);\n }\n if (keeapliveTimeTimer) {\n clearInterval(keeapliveTimeTimer);\n if (keepaliveTimeoutTimer) {\n clearTimeout(keepaliveTimeoutTimer);\n }\n }\n if (idleTimeoutObj !== null) {\n clearTimeout(idleTimeoutObj.timeout);\n this.sessionIdleTimeouts.delete(session);\n }\n (_b = this.http2Servers.get(http2Server)) === null || _b === void 0 ? void 0 : _b.sessions.delete(session);\n this.sessions.delete(session);\n });\n };\n }\n enableIdleTimeout(session) {\n var _b, _c;\n if (this.sessionIdleTimeout >= MAX_CONNECTION_IDLE_MS) {\n return null;\n }\n const idleTimeoutObj = {\n activeStreams: 0,\n lastIdle: Date.now(),\n onClose: this.onStreamClose.bind(this, session),\n timeout: setTimeout(this.onIdleTimeout, this.sessionIdleTimeout, this, session),\n };\n (_c = (_b = idleTimeoutObj.timeout).unref) === null || _c === void 0 ? void 0 : _c.call(_b);\n this.sessionIdleTimeouts.set(session, idleTimeoutObj);\n const { socket } = session;\n this.trace('Enable idle timeout for ' +\n socket.remoteAddress +\n ':' +\n socket.remotePort);\n return idleTimeoutObj;\n }\n onIdleTimeout(ctx, session) {\n const { socket } = session;\n const sessionInfo = ctx.sessionIdleTimeouts.get(session);\n // if it is called while we have activeStreams - timer will not be rescheduled\n // until last active stream is closed, then it will call .refresh() on the timer\n // important part is to not clearTimeout(timer) or it becomes unusable\n // for future refreshes\n if (sessionInfo !== undefined &&\n sessionInfo.activeStreams === 0 &&\n Date.now() - sessionInfo.lastIdle >= ctx.sessionIdleTimeout) {\n ctx.trace('Session idle timeout triggered for ' +\n (socket === null || socket === void 0 ? void 0 : socket.remoteAddress) +\n ':' +\n (socket === null || socket === void 0 ? void 0 : socket.remotePort) +\n ' last idle at ' +\n sessionInfo.lastIdle);\n ctx.closeSession(session);\n }\n }\n onStreamOpened(stream) {\n const session = stream.session;\n const idleTimeoutObj = this.sessionIdleTimeouts.get(session);\n if (idleTimeoutObj) {\n idleTimeoutObj.activeStreams += 1;\n stream.once('close', idleTimeoutObj.onClose);\n }\n }\n onStreamClose(session) {\n var _b, _c;\n const idleTimeoutObj = this.sessionIdleTimeouts.get(session);\n if (idleTimeoutObj) {\n idleTimeoutObj.activeStreams -= 1;\n if (idleTimeoutObj.activeStreams === 0) {\n idleTimeoutObj.lastIdle = Date.now();\n idleTimeoutObj.timeout.refresh();\n this.trace('Session onStreamClose' +\n ((_b = session.socket) === null || _b === void 0 ? void 0 : _b.remoteAddress) +\n ':' +\n ((_c = session.socket) === null || _c === void 0 ? void 0 : _c.remotePort) +\n ' at ' +\n idleTimeoutObj.lastIdle);\n }\n }\n }\n },\n (() => {\n const _metadata = typeof Symbol === \"function\" && Symbol.metadata ? Object.create(null) : void 0;\n _start_decorators = [deprecate('Calling start() is no longer necessary. It can be safely omitted.')];\n __esDecorate(_a, null, _start_decorators, { kind: \"method\", name: \"start\", static: false, private: false, access: { has: obj => \"start\" in obj, get: obj => obj.start }, metadata: _metadata }, null, _instanceExtraInitializers);\n if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });\n })(),\n _a;\n})();\nexports.Server = Server;\nasync function handleUnary(call, handler) {\n let stream;\n function respond(err, value, trailer, flags) {\n if (err) {\n call.sendStatus((0, server_call_1.serverErrorToStatus)(err, trailer));\n return;\n }\n call.sendMessage(value, () => {\n call.sendStatus({\n code: constants_1.Status.OK,\n details: 'OK',\n metadata: trailer !== null && trailer !== void 0 ? trailer : null,\n });\n });\n }\n let requestMetadata;\n let requestMessage = null;\n call.start({\n onReceiveMetadata(metadata) {\n requestMetadata = metadata;\n call.startRead();\n },\n onReceiveMessage(message) {\n if (requestMessage) {\n call.sendStatus({\n code: constants_1.Status.UNIMPLEMENTED,\n details: `Received a second request message for server streaming method ${handler.path}`,\n metadata: null,\n });\n return;\n }\n requestMessage = message;\n call.startRead();\n },\n onReceiveHalfClose() {\n if (!requestMessage) {\n call.sendStatus({\n code: constants_1.Status.UNIMPLEMENTED,\n details: `Received no request message for server streaming method ${handler.path}`,\n metadata: null,\n });\n return;\n }\n stream = new server_call_1.ServerWritableStreamImpl(handler.path, call, requestMetadata, requestMessage);\n try {\n handler.func(stream, respond);\n }\n catch (err) {\n call.sendStatus({\n code: constants_1.Status.UNKNOWN,\n details: `Server method handler threw error ${err.message}`,\n metadata: null,\n });\n }\n },\n onCancel() {\n if (stream) {\n stream.cancelled = true;\n stream.emit('cancelled', 'cancelled');\n }\n },\n });\n}\nfunction handleClientStreaming(call, handler) {\n let stream;\n function respond(err, value, trailer, flags) {\n if (err) {\n call.sendStatus((0, server_call_1.serverErrorToStatus)(err, trailer));\n return;\n }\n call.sendMessage(value, () => {\n call.sendStatus({\n code: constants_1.Status.OK,\n details: 'OK',\n metadata: trailer !== null && trailer !== void 0 ? trailer : null,\n });\n });\n }\n call.start({\n onReceiveMetadata(metadata) {\n stream = new server_call_1.ServerDuplexStreamImpl(handler.path, call, metadata);\n try {\n handler.func(stream, respond);\n }\n catch (err) {\n call.sendStatus({\n code: constants_1.Status.UNKNOWN,\n details: `Server method handler threw error ${err.message}`,\n metadata: null,\n });\n }\n },\n onReceiveMessage(message) {\n stream.push(message);\n },\n onReceiveHalfClose() {\n stream.push(null);\n },\n onCancel() {\n if (stream) {\n stream.cancelled = true;\n stream.emit('cancelled', 'cancelled');\n stream.destroy();\n }\n },\n });\n}\nfunction handleServerStreaming(call, handler) {\n let stream;\n let requestMetadata;\n let requestMessage = null;\n call.start({\n onReceiveMetadata(metadata) {\n requestMetadata = metadata;\n call.startRead();\n },\n onReceiveMessage(message) {\n if (requestMessage) {\n call.sendStatus({\n code: constants_1.Status.UNIMPLEMENTED,\n details: `Received a second request message for server streaming method ${handler.path}`,\n metadata: null,\n });\n return;\n }\n requestMessage = message;\n call.startRead();\n },\n onReceiveHalfClose() {\n if (!requestMessage) {\n call.sendStatus({\n code: constants_1.Status.UNIMPLEMENTED,\n details: `Received no request message for server streaming method ${handler.path}`,\n metadata: null,\n });\n return;\n }\n stream = new server_call_1.ServerWritableStreamImpl(handler.path, call, requestMetadata, requestMessage);\n try {\n handler.func(stream);\n }\n catch (err) {\n call.sendStatus({\n code: constants_1.Status.UNKNOWN,\n details: `Server method handler threw error ${err.message}`,\n metadata: null,\n });\n }\n },\n onCancel() {\n if (stream) {\n stream.cancelled = true;\n stream.emit('cancelled', 'cancelled');\n stream.destroy();\n }\n },\n });\n}\nfunction handleBidiStreaming(call, handler) {\n let stream;\n call.start({\n onReceiveMetadata(metadata) {\n stream = new server_call_1.ServerDuplexStreamImpl(handler.path, call, metadata);\n try {\n handler.func(stream);\n }\n catch (err) {\n call.sendStatus({\n code: constants_1.Status.UNKNOWN,\n details: `Server method handler threw error ${err.message}`,\n metadata: null,\n });\n }\n },\n onReceiveMessage(message) {\n stream.push(message);\n },\n onReceiveHalfClose() {\n stream.push(null);\n },\n onCancel() {\n if (stream) {\n stream.cancelled = true;\n stream.emit('cancelled', 'cancelled');\n stream.destroy();\n }\n },\n });\n}\n//# sourceMappingURL=server.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extractAndSelectServiceConfig = exports.validateServiceConfig = exports.validateRetryThrottling = void 0;\n/* This file implements gRFC A2 and the service config spec:\n * https://github.com/grpc/proposal/blob/master/A2-service-configs-in-dns.md\n * https://github.com/grpc/grpc/blob/master/doc/service_config.md. Each\n * function here takes an object with unknown structure and returns its\n * specific object type if the input has the right structure, and throws an\n * error otherwise. */\n/* The any type is purposely used here. All functions validate their input at\n * runtime */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst os = require(\"os\");\nconst constants_1 = require(\"./constants\");\n/**\n * Recognizes a number with up to 9 digits after the decimal point, followed by\n * an \"s\", representing a number of seconds.\n */\nconst DURATION_REGEX = /^\\d+(\\.\\d{1,9})?s$/;\n/**\n * Client language name used for determining whether this client matches a\n * `ServiceConfigCanaryConfig`'s `clientLanguage` list.\n */\nconst CLIENT_LANGUAGE_STRING = 'node';\nfunction validateName(obj) {\n // In this context, and unset field and '' are considered the same\n if ('service' in obj && obj.service !== '') {\n if (typeof obj.service !== 'string') {\n throw new Error(`Invalid method config name: invalid service: expected type string, got ${typeof obj.service}`);\n }\n if ('method' in obj && obj.method !== '') {\n if (typeof obj.method !== 'string') {\n throw new Error(`Invalid method config name: invalid method: expected type string, got ${typeof obj.service}`);\n }\n return {\n service: obj.service,\n method: obj.method,\n };\n }\n else {\n return {\n service: obj.service,\n };\n }\n }\n else {\n if ('method' in obj && obj.method !== undefined) {\n throw new Error(`Invalid method config name: method set with empty or unset service`);\n }\n return {};\n }\n}\nfunction validateRetryPolicy(obj) {\n if (!('maxAttempts' in obj) ||\n !Number.isInteger(obj.maxAttempts) ||\n obj.maxAttempts < 2) {\n throw new Error('Invalid method config retry policy: maxAttempts must be an integer at least 2');\n }\n if (!('initialBackoff' in obj) ||\n typeof obj.initialBackoff !== 'string' ||\n !DURATION_REGEX.test(obj.initialBackoff)) {\n throw new Error('Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer followed by s');\n }\n if (!('maxBackoff' in obj) ||\n typeof obj.maxBackoff !== 'string' ||\n !DURATION_REGEX.test(obj.maxBackoff)) {\n throw new Error('Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer followed by s');\n }\n if (!('backoffMultiplier' in obj) ||\n typeof obj.backoffMultiplier !== 'number' ||\n obj.backoffMultiplier <= 0) {\n throw new Error('Invalid method config retry policy: backoffMultiplier must be a number greater than 0');\n }\n if (!('retryableStatusCodes' in obj && Array.isArray(obj.retryableStatusCodes))) {\n throw new Error('Invalid method config retry policy: retryableStatusCodes is required');\n }\n if (obj.retryableStatusCodes.length === 0) {\n throw new Error('Invalid method config retry policy: retryableStatusCodes must be non-empty');\n }\n for (const value of obj.retryableStatusCodes) {\n if (typeof value === 'number') {\n if (!Object.values(constants_1.Status).includes(value)) {\n throw new Error('Invalid method config retry policy: retryableStatusCodes value not in status code range');\n }\n }\n else if (typeof value === 'string') {\n if (!Object.values(constants_1.Status).includes(value.toUpperCase())) {\n throw new Error('Invalid method config retry policy: retryableStatusCodes value not a status code name');\n }\n }\n else {\n throw new Error('Invalid method config retry policy: retryableStatusCodes value must be a string or number');\n }\n }\n return {\n maxAttempts: obj.maxAttempts,\n initialBackoff: obj.initialBackoff,\n maxBackoff: obj.maxBackoff,\n backoffMultiplier: obj.backoffMultiplier,\n retryableStatusCodes: obj.retryableStatusCodes,\n };\n}\nfunction validateHedgingPolicy(obj) {\n if (!('maxAttempts' in obj) ||\n !Number.isInteger(obj.maxAttempts) ||\n obj.maxAttempts < 2) {\n throw new Error('Invalid method config hedging policy: maxAttempts must be an integer at least 2');\n }\n if ('hedgingDelay' in obj &&\n (typeof obj.hedgingDelay !== 'string' ||\n !DURATION_REGEX.test(obj.hedgingDelay))) {\n throw new Error('Invalid method config hedging policy: hedgingDelay must be a string consisting of a positive integer followed by s');\n }\n if ('nonFatalStatusCodes' in obj && Array.isArray(obj.nonFatalStatusCodes)) {\n for (const value of obj.nonFatalStatusCodes) {\n if (typeof value === 'number') {\n if (!Object.values(constants_1.Status).includes(value)) {\n throw new Error('Invlid method config hedging policy: nonFatalStatusCodes value not in status code range');\n }\n }\n else if (typeof value === 'string') {\n if (!Object.values(constants_1.Status).includes(value.toUpperCase())) {\n throw new Error('Invlid method config hedging policy: nonFatalStatusCodes value not a status code name');\n }\n }\n else {\n throw new Error('Invlid method config hedging policy: nonFatalStatusCodes value must be a string or number');\n }\n }\n }\n const result = {\n maxAttempts: obj.maxAttempts,\n };\n if (obj.hedgingDelay) {\n result.hedgingDelay = obj.hedgingDelay;\n }\n if (obj.nonFatalStatusCodes) {\n result.nonFatalStatusCodes = obj.nonFatalStatusCodes;\n }\n return result;\n}\nfunction validateMethodConfig(obj) {\n var _a;\n const result = {\n name: [],\n };\n if (!('name' in obj) || !Array.isArray(obj.name)) {\n throw new Error('Invalid method config: invalid name array');\n }\n for (const name of obj.name) {\n result.name.push(validateName(name));\n }\n if ('waitForReady' in obj) {\n if (typeof obj.waitForReady !== 'boolean') {\n throw new Error('Invalid method config: invalid waitForReady');\n }\n result.waitForReady = obj.waitForReady;\n }\n if ('timeout' in obj) {\n if (typeof obj.timeout === 'object') {\n if (!('seconds' in obj.timeout) ||\n !(typeof obj.timeout.seconds === 'number')) {\n throw new Error('Invalid method config: invalid timeout.seconds');\n }\n if (!('nanos' in obj.timeout) ||\n !(typeof obj.timeout.nanos === 'number')) {\n throw new Error('Invalid method config: invalid timeout.nanos');\n }\n result.timeout = obj.timeout;\n }\n else if (typeof obj.timeout === 'string' &&\n DURATION_REGEX.test(obj.timeout)) {\n const timeoutParts = obj.timeout\n .substring(0, obj.timeout.length - 1)\n .split('.');\n result.timeout = {\n seconds: timeoutParts[0] | 0,\n nanos: ((_a = timeoutParts[1]) !== null && _a !== void 0 ? _a : 0) | 0,\n };\n }\n else {\n throw new Error('Invalid method config: invalid timeout');\n }\n }\n if ('maxRequestBytes' in obj) {\n if (typeof obj.maxRequestBytes !== 'number') {\n throw new Error('Invalid method config: invalid maxRequestBytes');\n }\n result.maxRequestBytes = obj.maxRequestBytes;\n }\n if ('maxResponseBytes' in obj) {\n if (typeof obj.maxResponseBytes !== 'number') {\n throw new Error('Invalid method config: invalid maxRequestBytes');\n }\n result.maxResponseBytes = obj.maxResponseBytes;\n }\n if ('retryPolicy' in obj) {\n if ('hedgingPolicy' in obj) {\n throw new Error('Invalid method config: retryPolicy and hedgingPolicy cannot both be specified');\n }\n else {\n result.retryPolicy = validateRetryPolicy(obj.retryPolicy);\n }\n }\n else if ('hedgingPolicy' in obj) {\n result.hedgingPolicy = validateHedgingPolicy(obj.hedgingPolicy);\n }\n return result;\n}\nfunction validateRetryThrottling(obj) {\n if (!('maxTokens' in obj) ||\n typeof obj.maxTokens !== 'number' ||\n obj.maxTokens <= 0 ||\n obj.maxTokens > 1000) {\n throw new Error('Invalid retryThrottling: maxTokens must be a number in (0, 1000]');\n }\n if (!('tokenRatio' in obj) ||\n typeof obj.tokenRatio !== 'number' ||\n obj.tokenRatio <= 0) {\n throw new Error('Invalid retryThrottling: tokenRatio must be a number greater than 0');\n }\n return {\n maxTokens: +obj.maxTokens.toFixed(3),\n tokenRatio: +obj.tokenRatio.toFixed(3),\n };\n}\nexports.validateRetryThrottling = validateRetryThrottling;\nfunction validateLoadBalancingConfig(obj) {\n if (!(typeof obj === 'object' && obj !== null)) {\n throw new Error(`Invalid loadBalancingConfig: unexpected type ${typeof obj}`);\n }\n const keys = Object.keys(obj);\n if (keys.length > 1) {\n throw new Error(`Invalid loadBalancingConfig: unexpected multiple keys ${keys}`);\n }\n if (keys.length === 0) {\n throw new Error('Invalid loadBalancingConfig: load balancing policy name required');\n }\n return {\n [keys[0]]: obj[keys[0]],\n };\n}\nfunction validateServiceConfig(obj) {\n const result = {\n loadBalancingConfig: [],\n methodConfig: [],\n };\n if ('loadBalancingPolicy' in obj) {\n if (typeof obj.loadBalancingPolicy === 'string') {\n result.loadBalancingPolicy = obj.loadBalancingPolicy;\n }\n else {\n throw new Error('Invalid service config: invalid loadBalancingPolicy');\n }\n }\n if ('loadBalancingConfig' in obj) {\n if (Array.isArray(obj.loadBalancingConfig)) {\n for (const config of obj.loadBalancingConfig) {\n result.loadBalancingConfig.push(validateLoadBalancingConfig(config));\n }\n }\n else {\n throw new Error('Invalid service config: invalid loadBalancingConfig');\n }\n }\n if ('methodConfig' in obj) {\n if (Array.isArray(obj.methodConfig)) {\n for (const methodConfig of obj.methodConfig) {\n result.methodConfig.push(validateMethodConfig(methodConfig));\n }\n }\n }\n if ('retryThrottling' in obj) {\n result.retryThrottling = validateRetryThrottling(obj.retryThrottling);\n }\n // Validate method name uniqueness\n const seenMethodNames = [];\n for (const methodConfig of result.methodConfig) {\n for (const name of methodConfig.name) {\n for (const seenName of seenMethodNames) {\n if (name.service === seenName.service &&\n name.method === seenName.method) {\n throw new Error(`Invalid service config: duplicate name ${name.service}/${name.method}`);\n }\n }\n seenMethodNames.push(name);\n }\n }\n return result;\n}\nexports.validateServiceConfig = validateServiceConfig;\nfunction validateCanaryConfig(obj) {\n if (!('serviceConfig' in obj)) {\n throw new Error('Invalid service config choice: missing service config');\n }\n const result = {\n serviceConfig: validateServiceConfig(obj.serviceConfig),\n };\n if ('clientLanguage' in obj) {\n if (Array.isArray(obj.clientLanguage)) {\n result.clientLanguage = [];\n for (const lang of obj.clientLanguage) {\n if (typeof lang === 'string') {\n result.clientLanguage.push(lang);\n }\n else {\n throw new Error('Invalid service config choice: invalid clientLanguage');\n }\n }\n }\n else {\n throw new Error('Invalid service config choice: invalid clientLanguage');\n }\n }\n if ('clientHostname' in obj) {\n if (Array.isArray(obj.clientHostname)) {\n result.clientHostname = [];\n for (const lang of obj.clientHostname) {\n if (typeof lang === 'string') {\n result.clientHostname.push(lang);\n }\n else {\n throw new Error('Invalid service config choice: invalid clientHostname');\n }\n }\n }\n else {\n throw new Error('Invalid service config choice: invalid clientHostname');\n }\n }\n if ('percentage' in obj) {\n if (typeof obj.percentage === 'number' &&\n 0 <= obj.percentage &&\n obj.percentage <= 100) {\n result.percentage = obj.percentage;\n }\n else {\n throw new Error('Invalid service config choice: invalid percentage');\n }\n }\n // Validate that no unexpected fields are present\n const allowedFields = [\n 'clientLanguage',\n 'percentage',\n 'clientHostname',\n 'serviceConfig',\n ];\n for (const field in obj) {\n if (!allowedFields.includes(field)) {\n throw new Error(`Invalid service config choice: unexpected field ${field}`);\n }\n }\n return result;\n}\nfunction validateAndSelectCanaryConfig(obj, percentage) {\n if (!Array.isArray(obj)) {\n throw new Error('Invalid service config list');\n }\n for (const config of obj) {\n const validatedConfig = validateCanaryConfig(config);\n /* For each field, we check if it is present, then only discard the\n * config if the field value does not match the current client */\n if (typeof validatedConfig.percentage === 'number' &&\n percentage > validatedConfig.percentage) {\n continue;\n }\n if (Array.isArray(validatedConfig.clientHostname)) {\n let hostnameMatched = false;\n for (const hostname of validatedConfig.clientHostname) {\n if (hostname === os.hostname()) {\n hostnameMatched = true;\n }\n }\n if (!hostnameMatched) {\n continue;\n }\n }\n if (Array.isArray(validatedConfig.clientLanguage)) {\n let languageMatched = false;\n for (const language of validatedConfig.clientLanguage) {\n if (language === CLIENT_LANGUAGE_STRING) {\n languageMatched = true;\n }\n }\n if (!languageMatched) {\n continue;\n }\n }\n return validatedConfig.serviceConfig;\n }\n throw new Error('No matching service config found');\n}\n/**\n * Find the \"grpc_config\" record among the TXT records, parse its value as JSON, validate its contents,\n * and select a service config with selection fields that all match this client. Most of these steps\n * can fail with an error; the caller must handle any errors thrown this way.\n * @param txtRecord The TXT record array that is output from a successful call to dns.resolveTxt\n * @param percentage A number chosen from the range [0, 100) that is used to select which config to use\n * @return The service configuration to use, given the percentage value, or null if the service config\n * data has a valid format but none of the options match the current client.\n */\nfunction extractAndSelectServiceConfig(txtRecord, percentage) {\n for (const record of txtRecord) {\n if (record.length > 0 && record[0].startsWith('grpc_config=')) {\n /* Treat the list of strings in this record as a single string and remove\n * \"grpc_config=\" from the beginning. The rest should be a JSON string */\n const recordString = record.join('').substring('grpc_config='.length);\n const recordJson = JSON.parse(recordString);\n return validateAndSelectCanaryConfig(recordJson, percentage);\n }\n }\n return null;\n}\nexports.extractAndSelectServiceConfig = extractAndSelectServiceConfig;\n//# sourceMappingURL=service-config.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StatusBuilder = void 0;\n/**\n * A builder for gRPC status objects.\n */\nclass StatusBuilder {\n constructor() {\n this.code = null;\n this.details = null;\n this.metadata = null;\n }\n /**\n * Adds a status code to the builder.\n */\n withCode(code) {\n this.code = code;\n return this;\n }\n /**\n * Adds details to the builder.\n */\n withDetails(details) {\n this.details = details;\n return this;\n }\n /**\n * Adds metadata to the builder.\n */\n withMetadata(metadata) {\n this.metadata = metadata;\n return this;\n }\n /**\n * Builds the status object.\n */\n build() {\n const status = {};\n if (this.code !== null) {\n status.code = this.code;\n }\n if (this.details !== null) {\n status.details = this.details;\n }\n if (this.metadata !== null) {\n status.metadata = this.metadata;\n }\n return status;\n }\n}\nexports.StatusBuilder = StatusBuilder;\n//# sourceMappingURL=status-builder.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StreamDecoder = void 0;\nvar ReadState;\n(function (ReadState) {\n ReadState[ReadState[\"NO_DATA\"] = 0] = \"NO_DATA\";\n ReadState[ReadState[\"READING_SIZE\"] = 1] = \"READING_SIZE\";\n ReadState[ReadState[\"READING_MESSAGE\"] = 2] = \"READING_MESSAGE\";\n})(ReadState || (ReadState = {}));\nclass StreamDecoder {\n constructor() {\n this.readState = ReadState.NO_DATA;\n this.readCompressFlag = Buffer.alloc(1);\n this.readPartialSize = Buffer.alloc(4);\n this.readSizeRemaining = 4;\n this.readMessageSize = 0;\n this.readPartialMessage = [];\n this.readMessageRemaining = 0;\n }\n write(data) {\n let readHead = 0;\n let toRead;\n const result = [];\n while (readHead < data.length) {\n switch (this.readState) {\n case ReadState.NO_DATA:\n this.readCompressFlag = data.slice(readHead, readHead + 1);\n readHead += 1;\n this.readState = ReadState.READING_SIZE;\n this.readPartialSize.fill(0);\n this.readSizeRemaining = 4;\n this.readMessageSize = 0;\n this.readMessageRemaining = 0;\n this.readPartialMessage = [];\n break;\n case ReadState.READING_SIZE:\n toRead = Math.min(data.length - readHead, this.readSizeRemaining);\n data.copy(this.readPartialSize, 4 - this.readSizeRemaining, readHead, readHead + toRead);\n this.readSizeRemaining -= toRead;\n readHead += toRead;\n // readSizeRemaining >=0 here\n if (this.readSizeRemaining === 0) {\n this.readMessageSize = this.readPartialSize.readUInt32BE(0);\n this.readMessageRemaining = this.readMessageSize;\n if (this.readMessageRemaining > 0) {\n this.readState = ReadState.READING_MESSAGE;\n }\n else {\n const message = Buffer.concat([this.readCompressFlag, this.readPartialSize], 5);\n this.readState = ReadState.NO_DATA;\n result.push(message);\n }\n }\n break;\n case ReadState.READING_MESSAGE:\n toRead = Math.min(data.length - readHead, this.readMessageRemaining);\n this.readPartialMessage.push(data.slice(readHead, readHead + toRead));\n this.readMessageRemaining -= toRead;\n readHead += toRead;\n // readMessageRemaining >=0 here\n if (this.readMessageRemaining === 0) {\n // At this point, we have read a full message\n const framedMessageBuffers = [\n this.readCompressFlag,\n this.readPartialSize,\n ].concat(this.readPartialMessage);\n const framedMessage = Buffer.concat(framedMessageBuffers, this.readMessageSize + 5);\n this.readState = ReadState.NO_DATA;\n result.push(framedMessage);\n }\n break;\n default:\n throw new Error('Unexpected read state');\n }\n }\n return result;\n }\n}\nexports.StreamDecoder = StreamDecoder;\n//# sourceMappingURL=stream-decoder.js.map","\"use strict\";\n/*\n * Copyright 2021 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EndpointMap = exports.endpointHasAddress = exports.endpointToString = exports.endpointEqual = exports.stringToSubchannelAddress = exports.subchannelAddressToString = exports.subchannelAddressEqual = exports.isTcpSubchannelAddress = void 0;\nconst net_1 = require(\"net\");\nfunction isTcpSubchannelAddress(address) {\n return 'port' in address;\n}\nexports.isTcpSubchannelAddress = isTcpSubchannelAddress;\nfunction subchannelAddressEqual(address1, address2) {\n if (!address1 && !address2) {\n return true;\n }\n if (!address1 || !address2) {\n return false;\n }\n if (isTcpSubchannelAddress(address1)) {\n return (isTcpSubchannelAddress(address2) &&\n address1.host === address2.host &&\n address1.port === address2.port);\n }\n else {\n return !isTcpSubchannelAddress(address2) && address1.path === address2.path;\n }\n}\nexports.subchannelAddressEqual = subchannelAddressEqual;\nfunction subchannelAddressToString(address) {\n if (isTcpSubchannelAddress(address)) {\n if ((0, net_1.isIPv6)(address.host)) {\n return '[' + address.host + ']:' + address.port;\n }\n else {\n return address.host + ':' + address.port;\n }\n }\n else {\n return address.path;\n }\n}\nexports.subchannelAddressToString = subchannelAddressToString;\nconst DEFAULT_PORT = 443;\nfunction stringToSubchannelAddress(addressString, port) {\n if ((0, net_1.isIP)(addressString)) {\n return {\n host: addressString,\n port: port !== null && port !== void 0 ? port : DEFAULT_PORT,\n };\n }\n else {\n return {\n path: addressString,\n };\n }\n}\nexports.stringToSubchannelAddress = stringToSubchannelAddress;\nfunction endpointEqual(endpoint1, endpoint2) {\n if (endpoint1.addresses.length !== endpoint2.addresses.length) {\n return false;\n }\n for (let i = 0; i < endpoint1.addresses.length; i++) {\n if (!subchannelAddressEqual(endpoint1.addresses[i], endpoint2.addresses[i])) {\n return false;\n }\n }\n return true;\n}\nexports.endpointEqual = endpointEqual;\nfunction endpointToString(endpoint) {\n return ('[' + endpoint.addresses.map(subchannelAddressToString).join(', ') + ']');\n}\nexports.endpointToString = endpointToString;\nfunction endpointHasAddress(endpoint, expectedAddress) {\n for (const address of endpoint.addresses) {\n if (subchannelAddressEqual(address, expectedAddress)) {\n return true;\n }\n }\n return false;\n}\nexports.endpointHasAddress = endpointHasAddress;\nfunction endpointEqualUnordered(endpoint1, endpoint2) {\n if (endpoint1.addresses.length !== endpoint2.addresses.length) {\n return false;\n }\n for (const address1 of endpoint1.addresses) {\n let matchFound = false;\n for (const address2 of endpoint2.addresses) {\n if (subchannelAddressEqual(address1, address2)) {\n matchFound = true;\n break;\n }\n }\n if (!matchFound) {\n return false;\n }\n }\n return true;\n}\nclass EndpointMap {\n constructor() {\n this.map = new Set();\n }\n get size() {\n return this.map.size;\n }\n getForSubchannelAddress(address) {\n for (const entry of this.map) {\n if (endpointHasAddress(entry.key, address)) {\n return entry.value;\n }\n }\n return undefined;\n }\n /**\n * Delete any entries in this map with keys that are not in endpoints\n * @param endpoints\n */\n deleteMissing(endpoints) {\n const removedValues = [];\n for (const entry of this.map) {\n let foundEntry = false;\n for (const endpoint of endpoints) {\n if (endpointEqualUnordered(endpoint, entry.key)) {\n foundEntry = true;\n }\n }\n if (!foundEntry) {\n removedValues.push(entry.value);\n this.map.delete(entry);\n }\n }\n return removedValues;\n }\n get(endpoint) {\n for (const entry of this.map) {\n if (endpointEqualUnordered(endpoint, entry.key)) {\n return entry.value;\n }\n }\n return undefined;\n }\n set(endpoint, mapEntry) {\n for (const entry of this.map) {\n if (endpointEqualUnordered(endpoint, entry.key)) {\n entry.value = mapEntry;\n return;\n }\n }\n this.map.add({ key: endpoint, value: mapEntry });\n }\n delete(endpoint) {\n for (const entry of this.map) {\n if (endpointEqualUnordered(endpoint, entry.key)) {\n this.map.delete(entry);\n return;\n }\n }\n }\n has(endpoint) {\n for (const entry of this.map) {\n if (endpointEqualUnordered(endpoint, entry.key)) {\n return true;\n }\n }\n return false;\n }\n clear() {\n this.map.clear();\n }\n *keys() {\n for (const entry of this.map) {\n yield entry.key;\n }\n }\n *values() {\n for (const entry of this.map) {\n yield entry.value;\n }\n }\n *entries() {\n for (const entry of this.map) {\n yield [entry.key, entry.value];\n }\n }\n}\nexports.EndpointMap = EndpointMap;\n//# sourceMappingURL=subchannel-address.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Http2SubchannelCall = void 0;\nconst http2 = require(\"http2\");\nconst os = require(\"os\");\nconst constants_1 = require(\"./constants\");\nconst metadata_1 = require(\"./metadata\");\nconst stream_decoder_1 = require(\"./stream-decoder\");\nconst logging = require(\"./logging\");\nconst constants_2 = require(\"./constants\");\nconst TRACER_NAME = 'subchannel_call';\n/**\n * Should do approximately the same thing as util.getSystemErrorName but the\n * TypeScript types don't have that function for some reason so I just made my\n * own.\n * @param errno\n */\nfunction getSystemErrorName(errno) {\n for (const [name, num] of Object.entries(os.constants.errno)) {\n if (num === errno) {\n return name;\n }\n }\n return 'Unknown system error ' + errno;\n}\nfunction mapHttpStatusCode(code) {\n const details = `Received HTTP status code ${code}`;\n let mappedStatusCode;\n switch (code) {\n // TODO(murgatroid99): handle 100 and 101\n case 400:\n mappedStatusCode = constants_1.Status.INTERNAL;\n break;\n case 401:\n mappedStatusCode = constants_1.Status.UNAUTHENTICATED;\n break;\n case 403:\n mappedStatusCode = constants_1.Status.PERMISSION_DENIED;\n break;\n case 404:\n mappedStatusCode = constants_1.Status.UNIMPLEMENTED;\n break;\n case 429:\n case 502:\n case 503:\n case 504:\n mappedStatusCode = constants_1.Status.UNAVAILABLE;\n break;\n default:\n mappedStatusCode = constants_1.Status.UNKNOWN;\n }\n return {\n code: mappedStatusCode,\n details: details,\n metadata: new metadata_1.Metadata()\n };\n}\nclass Http2SubchannelCall {\n constructor(http2Stream, callEventTracker, listener, transport, callId) {\n this.http2Stream = http2Stream;\n this.callEventTracker = callEventTracker;\n this.listener = listener;\n this.transport = transport;\n this.callId = callId;\n this.decoder = new stream_decoder_1.StreamDecoder();\n this.isReadFilterPending = false;\n this.isPushPending = false;\n this.canPush = false;\n /**\n * Indicates that an 'end' event has come from the http2 stream, so there\n * will be no more data events.\n */\n this.readsClosed = false;\n this.statusOutput = false;\n this.unpushedReadMessages = [];\n // This is populated (non-null) if and only if the call has ended\n this.finalStatus = null;\n this.internalError = null;\n this.serverEndedCall = false;\n http2Stream.on('response', (headers, flags) => {\n let headersString = '';\n for (const header of Object.keys(headers)) {\n headersString += '\\t\\t' + header + ': ' + headers[header] + '\\n';\n }\n this.trace('Received server headers:\\n' + headersString);\n this.httpStatusCode = headers[':status'];\n if (flags & http2.constants.NGHTTP2_FLAG_END_STREAM) {\n this.handleTrailers(headers);\n }\n else {\n let metadata;\n try {\n metadata = metadata_1.Metadata.fromHttp2Headers(headers);\n }\n catch (error) {\n this.endCall({\n code: constants_1.Status.UNKNOWN,\n details: error.message,\n metadata: new metadata_1.Metadata(),\n });\n return;\n }\n this.listener.onReceiveMetadata(metadata);\n }\n });\n http2Stream.on('trailers', (headers) => {\n this.handleTrailers(headers);\n });\n http2Stream.on('data', (data) => {\n /* If the status has already been output, allow the http2 stream to\n * drain without processing the data. */\n if (this.statusOutput) {\n return;\n }\n this.trace('receive HTTP/2 data frame of length ' + data.length);\n const messages = this.decoder.write(data);\n for (const message of messages) {\n this.trace('parsed message of length ' + message.length);\n this.callEventTracker.addMessageReceived();\n this.tryPush(message);\n }\n });\n http2Stream.on('end', () => {\n this.readsClosed = true;\n this.maybeOutputStatus();\n });\n http2Stream.on('close', () => {\n this.serverEndedCall = true;\n /* Use process.next tick to ensure that this code happens after any\n * \"error\" event that may be emitted at about the same time, so that\n * we can bubble up the error message from that event. */\n process.nextTick(() => {\n var _a;\n this.trace('HTTP/2 stream closed with code ' + http2Stream.rstCode);\n /* If we have a final status with an OK status code, that means that\n * we have received all of the messages and we have processed the\n * trailers and the call completed successfully, so it doesn't matter\n * how the stream ends after that */\n if (((_a = this.finalStatus) === null || _a === void 0 ? void 0 : _a.code) === constants_1.Status.OK) {\n return;\n }\n let code;\n let details = '';\n switch (http2Stream.rstCode) {\n case http2.constants.NGHTTP2_NO_ERROR:\n /* If we get a NO_ERROR code and we already have a status, the\n * stream completed properly and we just haven't fully processed\n * it yet */\n if (this.finalStatus !== null) {\n return;\n }\n if (this.httpStatusCode && this.httpStatusCode !== 200) {\n const mappedStatus = mapHttpStatusCode(this.httpStatusCode);\n code = mappedStatus.code;\n details = mappedStatus.details;\n }\n else {\n code = constants_1.Status.INTERNAL;\n details = `Received RST_STREAM with code ${http2Stream.rstCode} (Call ended without gRPC status)`;\n }\n break;\n case http2.constants.NGHTTP2_REFUSED_STREAM:\n code = constants_1.Status.UNAVAILABLE;\n details = 'Stream refused by server';\n break;\n case http2.constants.NGHTTP2_CANCEL:\n code = constants_1.Status.CANCELLED;\n details = 'Call cancelled';\n break;\n case http2.constants.NGHTTP2_ENHANCE_YOUR_CALM:\n code = constants_1.Status.RESOURCE_EXHAUSTED;\n details = 'Bandwidth exhausted or memory limit exceeded';\n break;\n case http2.constants.NGHTTP2_INADEQUATE_SECURITY:\n code = constants_1.Status.PERMISSION_DENIED;\n details = 'Protocol not secure enough';\n break;\n case http2.constants.NGHTTP2_INTERNAL_ERROR:\n code = constants_1.Status.INTERNAL;\n if (this.internalError === null) {\n /* This error code was previously handled in the default case, and\n * there are several instances of it online, so I wanted to\n * preserve the original error message so that people find existing\n * information in searches, but also include the more recognizable\n * \"Internal server error\" message. */\n details = `Received RST_STREAM with code ${http2Stream.rstCode} (Internal server error)`;\n }\n else {\n if (this.internalError.code === 'ECONNRESET' ||\n this.internalError.code === 'ETIMEDOUT') {\n code = constants_1.Status.UNAVAILABLE;\n details = this.internalError.message;\n }\n else {\n /* The \"Received RST_STREAM with code ...\" error is preserved\n * here for continuity with errors reported online, but the\n * error message at the end will probably be more relevant in\n * most cases. */\n details = `Received RST_STREAM with code ${http2Stream.rstCode} triggered by internal client error: ${this.internalError.message}`;\n }\n }\n break;\n default:\n code = constants_1.Status.INTERNAL;\n details = `Received RST_STREAM with code ${http2Stream.rstCode}`;\n }\n // This is a no-op if trailers were received at all.\n // This is OK, because status codes emitted here correspond to more\n // catastrophic issues that prevent us from receiving trailers in the\n // first place.\n this.endCall({\n code,\n details,\n metadata: new metadata_1.Metadata(),\n rstCode: http2Stream.rstCode,\n });\n });\n });\n http2Stream.on('error', (err) => {\n /* We need an error handler here to stop \"Uncaught Error\" exceptions\n * from bubbling up. However, errors here should all correspond to\n * \"close\" events, where we will handle the error more granularly */\n /* Specifically looking for stream errors that were *not* constructed\n * from a RST_STREAM response here:\n * https://github.com/nodejs/node/blob/8b8620d580314050175983402dfddf2674e8e22a/lib/internal/http2/core.js#L2267\n */\n if (err.code !== 'ERR_HTTP2_STREAM_ERROR') {\n this.trace('Node error event: message=' +\n err.message +\n ' code=' +\n err.code +\n ' errno=' +\n getSystemErrorName(err.errno) +\n ' syscall=' +\n err.syscall);\n this.internalError = err;\n }\n this.callEventTracker.onStreamEnd(false);\n });\n }\n getDeadlineInfo() {\n return [`remote_addr=${this.getPeer()}`];\n }\n onDisconnect() {\n this.endCall({\n code: constants_1.Status.UNAVAILABLE,\n details: 'Connection dropped',\n metadata: new metadata_1.Metadata(),\n });\n }\n outputStatus() {\n /* Precondition: this.finalStatus !== null */\n if (!this.statusOutput) {\n this.statusOutput = true;\n this.trace('ended with status: code=' +\n this.finalStatus.code +\n ' details=\"' +\n this.finalStatus.details +\n '\"');\n this.callEventTracker.onCallEnd(this.finalStatus);\n /* We delay the actual action of bubbling up the status to insulate the\n * cleanup code in this class from any errors that may be thrown in the\n * upper layers as a result of bubbling up the status. In particular,\n * if the status is not OK, the \"error\" event may be emitted\n * synchronously at the top level, which will result in a thrown error if\n * the user does not handle that event. */\n process.nextTick(() => {\n this.listener.onReceiveStatus(this.finalStatus);\n });\n /* Leave the http2 stream in flowing state to drain incoming messages, to\n * ensure that the stream closure completes. The call stream already does\n * not push more messages after the status is output, so the messages go\n * nowhere either way. */\n this.http2Stream.resume();\n }\n }\n trace(text) {\n logging.trace(constants_2.LogVerbosity.DEBUG, TRACER_NAME, '[' + this.callId + '] ' + text);\n }\n /**\n * On first call, emits a 'status' event with the given StatusObject.\n * Subsequent calls are no-ops.\n * @param status The status of the call.\n */\n endCall(status) {\n /* If the status is OK and a new status comes in (e.g. from a\n * deserialization failure), that new status takes priority */\n if (this.finalStatus === null || this.finalStatus.code === constants_1.Status.OK) {\n this.finalStatus = status;\n this.maybeOutputStatus();\n }\n this.destroyHttp2Stream();\n }\n maybeOutputStatus() {\n if (this.finalStatus !== null) {\n /* The combination check of readsClosed and that the two message buffer\n * arrays are empty checks that there all incoming data has been fully\n * processed */\n if (this.finalStatus.code !== constants_1.Status.OK ||\n (this.readsClosed &&\n this.unpushedReadMessages.length === 0 &&\n !this.isReadFilterPending &&\n !this.isPushPending)) {\n this.outputStatus();\n }\n }\n }\n push(message) {\n this.trace('pushing to reader message of length ' +\n (message instanceof Buffer ? message.length : null));\n this.canPush = false;\n this.isPushPending = true;\n process.nextTick(() => {\n this.isPushPending = false;\n /* If we have already output the status any later messages should be\n * ignored, and can cause out-of-order operation errors higher up in the\n * stack. Checking as late as possible here to avoid any race conditions.\n */\n if (this.statusOutput) {\n return;\n }\n this.listener.onReceiveMessage(message);\n this.maybeOutputStatus();\n });\n }\n tryPush(messageBytes) {\n if (this.canPush) {\n this.http2Stream.pause();\n this.push(messageBytes);\n }\n else {\n this.trace('unpushedReadMessages.push message of length ' + messageBytes.length);\n this.unpushedReadMessages.push(messageBytes);\n }\n }\n handleTrailers(headers) {\n this.serverEndedCall = true;\n this.callEventTracker.onStreamEnd(true);\n let headersString = '';\n for (const header of Object.keys(headers)) {\n headersString += '\\t\\t' + header + ': ' + headers[header] + '\\n';\n }\n this.trace('Received server trailers:\\n' + headersString);\n let metadata;\n try {\n metadata = metadata_1.Metadata.fromHttp2Headers(headers);\n }\n catch (e) {\n metadata = new metadata_1.Metadata();\n }\n const metadataMap = metadata.getMap();\n let status;\n if (typeof metadataMap['grpc-status'] === 'string') {\n const receivedStatus = Number(metadataMap['grpc-status']);\n this.trace('received status code ' + receivedStatus + ' from server');\n metadata.remove('grpc-status');\n let details = '';\n if (typeof metadataMap['grpc-message'] === 'string') {\n try {\n details = decodeURI(metadataMap['grpc-message']);\n }\n catch (e) {\n details = metadataMap['grpc-message'];\n }\n metadata.remove('grpc-message');\n this.trace('received status details string \"' + details + '\" from server');\n }\n status = {\n code: receivedStatus,\n details: details,\n metadata: metadata\n };\n }\n else if (this.httpStatusCode) {\n status = mapHttpStatusCode(this.httpStatusCode);\n status.metadata = metadata;\n }\n else {\n status = {\n code: constants_1.Status.UNKNOWN,\n details: 'No status information received',\n metadata: metadata\n };\n }\n // This is a no-op if the call was already ended when handling headers.\n this.endCall(status);\n }\n destroyHttp2Stream() {\n var _a;\n // The http2 stream could already have been destroyed if cancelWithStatus\n // is called in response to an internal http2 error.\n if (this.http2Stream.destroyed) {\n return;\n }\n /* If the server ended the call, sending an RST_STREAM is redundant, so we\n * just half close on the client side instead to finish closing the stream.\n */\n if (this.serverEndedCall) {\n this.http2Stream.end();\n }\n else {\n /* If the call has ended with an OK status, communicate that when closing\n * the stream, partly to avoid a situation in which we detect an error\n * RST_STREAM as a result after we have the status */\n let code;\n if (((_a = this.finalStatus) === null || _a === void 0 ? void 0 : _a.code) === constants_1.Status.OK) {\n code = http2.constants.NGHTTP2_NO_ERROR;\n }\n else {\n code = http2.constants.NGHTTP2_CANCEL;\n }\n this.trace('close http2 stream with code ' + code);\n this.http2Stream.close(code);\n }\n }\n cancelWithStatus(status, details) {\n this.trace('cancelWithStatus code: ' + status + ' details: \"' + details + '\"');\n this.endCall({ code: status, details, metadata: new metadata_1.Metadata() });\n }\n getStatus() {\n return this.finalStatus;\n }\n getPeer() {\n return this.transport.getPeerName();\n }\n getCallNumber() {\n return this.callId;\n }\n startRead() {\n /* If the stream has ended with an error, we should not emit any more\n * messages and we should communicate that the stream has ended */\n if (this.finalStatus !== null && this.finalStatus.code !== constants_1.Status.OK) {\n this.readsClosed = true;\n this.maybeOutputStatus();\n return;\n }\n this.canPush = true;\n if (this.unpushedReadMessages.length > 0) {\n const nextMessage = this.unpushedReadMessages.shift();\n this.push(nextMessage);\n return;\n }\n /* Only resume reading from the http2Stream if we don't have any pending\n * messages to emit */\n this.http2Stream.resume();\n }\n sendMessageWithContext(context, message) {\n this.trace('write() called with message of length ' + message.length);\n const cb = (error) => {\n /* nextTick here ensures that no stream action can be taken in the call\n * stack of the write callback, in order to hopefully work around\n * https://github.com/nodejs/node/issues/49147 */\n process.nextTick(() => {\n var _a;\n let code = constants_1.Status.UNAVAILABLE;\n if ((error === null || error === void 0 ? void 0 : error.code) ===\n 'ERR_STREAM_WRITE_AFTER_END') {\n code = constants_1.Status.INTERNAL;\n }\n if (error) {\n this.cancelWithStatus(code, `Write error: ${error.message}`);\n }\n (_a = context.callback) === null || _a === void 0 ? void 0 : _a.call(context);\n });\n };\n this.trace('sending data chunk of length ' + message.length);\n this.callEventTracker.addMessageSent();\n try {\n this.http2Stream.write(message, cb);\n }\n catch (error) {\n this.endCall({\n code: constants_1.Status.UNAVAILABLE,\n details: `Write failed with error ${error.message}`,\n metadata: new metadata_1.Metadata(),\n });\n }\n }\n halfClose() {\n this.trace('end() called');\n this.trace('calling end() on HTTP/2 stream');\n this.http2Stream.end();\n }\n}\nexports.Http2SubchannelCall = Http2SubchannelCall;\n//# sourceMappingURL=subchannel-call.js.map","\"use strict\";\n/*\n * Copyright 2022 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseSubchannelWrapper = void 0;\nclass BaseSubchannelWrapper {\n constructor(child) {\n this.child = child;\n this.healthy = true;\n this.healthListeners = new Set();\n child.addHealthStateWatcher(childHealthy => {\n /* A change to the child health state only affects this wrapper's overall\n * health state if this wrapper is reporting healthy. */\n if (this.healthy) {\n this.updateHealthListeners();\n }\n });\n }\n updateHealthListeners() {\n for (const listener of this.healthListeners) {\n listener(this.isHealthy());\n }\n }\n getConnectivityState() {\n return this.child.getConnectivityState();\n }\n addConnectivityStateListener(listener) {\n this.child.addConnectivityStateListener(listener);\n }\n removeConnectivityStateListener(listener) {\n this.child.removeConnectivityStateListener(listener);\n }\n startConnecting() {\n this.child.startConnecting();\n }\n getAddress() {\n return this.child.getAddress();\n }\n throttleKeepalive(newKeepaliveTime) {\n this.child.throttleKeepalive(newKeepaliveTime);\n }\n ref() {\n this.child.ref();\n }\n unref() {\n this.child.unref();\n }\n getChannelzRef() {\n return this.child.getChannelzRef();\n }\n isHealthy() {\n return this.healthy && this.child.isHealthy();\n }\n addHealthStateWatcher(listener) {\n this.healthListeners.add(listener);\n }\n removeHealthStateWatcher(listener) {\n this.healthListeners.delete(listener);\n }\n setHealthy(healthy) {\n if (healthy !== this.healthy) {\n this.healthy = healthy;\n /* A change to this wrapper's health state only affects the overall\n * reported health state if the child is healthy. */\n if (this.child.isHealthy()) {\n this.updateHealthListeners();\n }\n }\n }\n getRealSubchannel() {\n return this.child.getRealSubchannel();\n }\n realSubchannelEquals(other) {\n return this.getRealSubchannel() === other.getRealSubchannel();\n }\n}\nexports.BaseSubchannelWrapper = BaseSubchannelWrapper;\n//# sourceMappingURL=subchannel-interface.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSubchannelPool = exports.SubchannelPool = void 0;\nconst channel_options_1 = require(\"./channel-options\");\nconst subchannel_1 = require(\"./subchannel\");\nconst subchannel_address_1 = require(\"./subchannel-address\");\nconst uri_parser_1 = require(\"./uri-parser\");\nconst transport_1 = require(\"./transport\");\n// 10 seconds in milliseconds. This value is arbitrary.\n/**\n * The amount of time in between checks for dropping subchannels that have no\n * other references\n */\nconst REF_CHECK_INTERVAL = 10000;\nclass SubchannelPool {\n /**\n * A pool of subchannels use for making connections. Subchannels with the\n * exact same parameters will be reused.\n */\n constructor() {\n this.pool = Object.create(null);\n /**\n * A timer of a task performing a periodic subchannel cleanup.\n */\n this.cleanupTimer = null;\n }\n /**\n * Unrefs all unused subchannels and cancels the cleanup task if all\n * subchannels have been unrefed.\n */\n unrefUnusedSubchannels() {\n let allSubchannelsUnrefed = true;\n /* These objects are created with Object.create(null), so they do not\n * have a prototype, which means that for (... in ...) loops over them\n * do not need to be filtered */\n // eslint-disable-disable-next-line:forin\n for (const channelTarget in this.pool) {\n const subchannelObjArray = this.pool[channelTarget];\n const refedSubchannels = subchannelObjArray.filter(value => !value.subchannel.unrefIfOneRef());\n if (refedSubchannels.length > 0) {\n allSubchannelsUnrefed = false;\n }\n /* For each subchannel in the pool, try to unref it if it has\n * exactly one ref (which is the ref from the pool itself). If that\n * does happen, remove the subchannel from the pool */\n this.pool[channelTarget] = refedSubchannels;\n }\n /* Currently we do not delete keys with empty values. If that results\n * in significant memory usage we should change it. */\n // Cancel the cleanup task if all subchannels have been unrefed.\n if (allSubchannelsUnrefed && this.cleanupTimer !== null) {\n clearInterval(this.cleanupTimer);\n this.cleanupTimer = null;\n }\n }\n /**\n * Ensures that the cleanup task is spawned.\n */\n ensureCleanupTask() {\n var _a, _b;\n if (this.cleanupTimer === null) {\n this.cleanupTimer = setInterval(() => {\n this.unrefUnusedSubchannels();\n }, REF_CHECK_INTERVAL);\n // Unref because this timer should not keep the event loop running.\n // Call unref only if it exists to address electron/electron#21162\n (_b = (_a = this.cleanupTimer).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n }\n /**\n * Get a subchannel if one already exists with exactly matching parameters.\n * Otherwise, create and save a subchannel with those parameters.\n * @param channelTarget\n * @param subchannelTarget\n * @param channelArguments\n * @param channelCredentials\n */\n getOrCreateSubchannel(channelTargetUri, subchannelTarget, channelArguments, channelCredentials) {\n this.ensureCleanupTask();\n const channelTarget = (0, uri_parser_1.uriToString)(channelTargetUri);\n if (channelTarget in this.pool) {\n const subchannelObjArray = this.pool[channelTarget];\n for (const subchannelObj of subchannelObjArray) {\n if ((0, subchannel_address_1.subchannelAddressEqual)(subchannelTarget, subchannelObj.subchannelAddress) &&\n (0, channel_options_1.channelOptionsEqual)(channelArguments, subchannelObj.channelArguments) &&\n channelCredentials._equals(subchannelObj.channelCredentials)) {\n return subchannelObj.subchannel;\n }\n }\n }\n // If we get here, no matching subchannel was found\n const subchannel = new subchannel_1.Subchannel(channelTargetUri, subchannelTarget, channelArguments, channelCredentials, new transport_1.Http2SubchannelConnector(channelTargetUri));\n if (!(channelTarget in this.pool)) {\n this.pool[channelTarget] = [];\n }\n this.pool[channelTarget].push({\n subchannelAddress: subchannelTarget,\n channelArguments,\n channelCredentials,\n subchannel,\n });\n subchannel.ref();\n return subchannel;\n }\n}\nexports.SubchannelPool = SubchannelPool;\nconst globalSubchannelPool = new SubchannelPool();\n/**\n * Get either the global subchannel pool, or a new subchannel pool.\n * @param global\n */\nfunction getSubchannelPool(global) {\n if (global) {\n return globalSubchannelPool;\n }\n else {\n return new SubchannelPool();\n }\n}\nexports.getSubchannelPool = getSubchannelPool;\n//# sourceMappingURL=subchannel-pool.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Subchannel = void 0;\nconst connectivity_state_1 = require(\"./connectivity-state\");\nconst backoff_timeout_1 = require(\"./backoff-timeout\");\nconst logging = require(\"./logging\");\nconst constants_1 = require(\"./constants\");\nconst uri_parser_1 = require(\"./uri-parser\");\nconst subchannel_address_1 = require(\"./subchannel-address\");\nconst channelz_1 = require(\"./channelz\");\nconst TRACER_NAME = 'subchannel';\n/* setInterval and setTimeout only accept signed 32 bit integers. JS doesn't\n * have a constant for the max signed 32 bit integer, so this is a simple way\n * to calculate it */\nconst KEEPALIVE_MAX_TIME_MS = ~(1 << 31);\nclass Subchannel {\n /**\n * A class representing a connection to a single backend.\n * @param channelTarget The target string for the channel as a whole\n * @param subchannelAddress The address for the backend that this subchannel\n * will connect to\n * @param options The channel options, plus any specific subchannel options\n * for this subchannel\n * @param credentials The channel credentials used to establish this\n * connection\n */\n constructor(channelTarget, subchannelAddress, options, credentials, connector) {\n var _a;\n this.channelTarget = channelTarget;\n this.subchannelAddress = subchannelAddress;\n this.options = options;\n this.credentials = credentials;\n this.connector = connector;\n /**\n * The subchannel's current connectivity state. Invariant: `session` === `null`\n * if and only if `connectivityState` is IDLE or TRANSIENT_FAILURE.\n */\n this.connectivityState = connectivity_state_1.ConnectivityState.IDLE;\n /**\n * The underlying http2 session used to make requests.\n */\n this.transport = null;\n /**\n * Indicates that the subchannel should transition from TRANSIENT_FAILURE to\n * CONNECTING instead of IDLE when the backoff timeout ends.\n */\n this.continueConnecting = false;\n /**\n * A list of listener functions that will be called whenever the connectivity\n * state changes. Will be modified by `addConnectivityStateListener` and\n * `removeConnectivityStateListener`\n */\n this.stateListeners = new Set();\n /**\n * Tracks channels and subchannel pools with references to this subchannel\n */\n this.refcount = 0;\n // Channelz info\n this.channelzEnabled = true;\n const backoffOptions = {\n initialDelay: options['grpc.initial_reconnect_backoff_ms'],\n maxDelay: options['grpc.max_reconnect_backoff_ms'],\n };\n this.backoffTimeout = new backoff_timeout_1.BackoffTimeout(() => {\n this.handleBackoffTimer();\n }, backoffOptions);\n this.backoffTimeout.unref();\n this.subchannelAddressString = (0, subchannel_address_1.subchannelAddressToString)(subchannelAddress);\n this.keepaliveTime = (_a = options['grpc.keepalive_time_ms']) !== null && _a !== void 0 ? _a : -1;\n if (options['grpc.enable_channelz'] === 0) {\n this.channelzEnabled = false;\n this.channelzTrace = new channelz_1.ChannelzTraceStub();\n this.callTracker = new channelz_1.ChannelzCallTrackerStub();\n this.childrenTracker = new channelz_1.ChannelzChildrenTrackerStub();\n this.streamTracker = new channelz_1.ChannelzCallTrackerStub();\n }\n else {\n this.channelzTrace = new channelz_1.ChannelzTrace();\n this.callTracker = new channelz_1.ChannelzCallTracker();\n this.childrenTracker = new channelz_1.ChannelzChildrenTracker();\n this.streamTracker = new channelz_1.ChannelzCallTracker();\n }\n this.channelzRef = (0, channelz_1.registerChannelzSubchannel)(this.subchannelAddressString, () => this.getChannelzInfo(), this.channelzEnabled);\n this.channelzTrace.addTrace('CT_INFO', 'Subchannel created');\n this.trace('Subchannel constructed with options ' +\n JSON.stringify(options, undefined, 2));\n }\n getChannelzInfo() {\n return {\n state: this.connectivityState,\n trace: this.channelzTrace,\n callTracker: this.callTracker,\n children: this.childrenTracker.getChildLists(),\n target: this.subchannelAddressString,\n };\n }\n trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '(' +\n this.channelzRef.id +\n ') ' +\n this.subchannelAddressString +\n ' ' +\n text);\n }\n refTrace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, 'subchannel_refcount', '(' +\n this.channelzRef.id +\n ') ' +\n this.subchannelAddressString +\n ' ' +\n text);\n }\n handleBackoffTimer() {\n if (this.continueConnecting) {\n this.transitionToState([connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE], connectivity_state_1.ConnectivityState.CONNECTING);\n }\n else {\n this.transitionToState([connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE], connectivity_state_1.ConnectivityState.IDLE);\n }\n }\n /**\n * Start a backoff timer with the current nextBackoff timeout\n */\n startBackoff() {\n this.backoffTimeout.runOnce();\n }\n stopBackoff() {\n this.backoffTimeout.stop();\n this.backoffTimeout.reset();\n }\n startConnectingInternal() {\n let options = this.options;\n if (options['grpc.keepalive_time_ms']) {\n const adjustedKeepaliveTime = Math.min(this.keepaliveTime, KEEPALIVE_MAX_TIME_MS);\n options = Object.assign(Object.assign({}, options), { 'grpc.keepalive_time_ms': adjustedKeepaliveTime });\n }\n this.connector\n .connect(this.subchannelAddress, this.credentials, options)\n .then(transport => {\n if (this.transitionToState([connectivity_state_1.ConnectivityState.CONNECTING], connectivity_state_1.ConnectivityState.READY)) {\n this.transport = transport;\n if (this.channelzEnabled) {\n this.childrenTracker.refChild(transport.getChannelzRef());\n }\n transport.addDisconnectListener(tooManyPings => {\n this.transitionToState([connectivity_state_1.ConnectivityState.READY], connectivity_state_1.ConnectivityState.IDLE);\n if (tooManyPings && this.keepaliveTime > 0) {\n this.keepaliveTime *= 2;\n logging.log(constants_1.LogVerbosity.ERROR, `Connection to ${(0, uri_parser_1.uriToString)(this.channelTarget)} at ${this.subchannelAddressString} rejected by server because of excess pings. Increasing ping interval to ${this.keepaliveTime} ms`);\n }\n });\n }\n else {\n /* If we can't transition from CONNECTING to READY here, we will\n * not be using this transport, so release its resources. */\n transport.shutdown();\n }\n }, error => {\n this.transitionToState([connectivity_state_1.ConnectivityState.CONNECTING], connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE, `${error}`);\n });\n }\n /**\n * Initiate a state transition from any element of oldStates to the new\n * state. If the current connectivityState is not in oldStates, do nothing.\n * @param oldStates The set of states to transition from\n * @param newState The state to transition to\n * @returns True if the state changed, false otherwise\n */\n transitionToState(oldStates, newState, errorMessage) {\n var _a, _b;\n if (oldStates.indexOf(this.connectivityState) === -1) {\n return false;\n }\n this.trace(connectivity_state_1.ConnectivityState[this.connectivityState] +\n ' -> ' +\n connectivity_state_1.ConnectivityState[newState]);\n if (this.channelzEnabled) {\n this.channelzTrace.addTrace('CT_INFO', 'Connectivity state change to ' + connectivity_state_1.ConnectivityState[newState]);\n }\n const previousState = this.connectivityState;\n this.connectivityState = newState;\n switch (newState) {\n case connectivity_state_1.ConnectivityState.READY:\n this.stopBackoff();\n break;\n case connectivity_state_1.ConnectivityState.CONNECTING:\n this.startBackoff();\n this.startConnectingInternal();\n this.continueConnecting = false;\n break;\n case connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE:\n if (this.channelzEnabled && this.transport) {\n this.childrenTracker.unrefChild(this.transport.getChannelzRef());\n }\n (_a = this.transport) === null || _a === void 0 ? void 0 : _a.shutdown();\n this.transport = null;\n /* If the backoff timer has already ended by the time we get to the\n * TRANSIENT_FAILURE state, we want to immediately transition out of\n * TRANSIENT_FAILURE as though the backoff timer is ending right now */\n if (!this.backoffTimeout.isRunning()) {\n process.nextTick(() => {\n this.handleBackoffTimer();\n });\n }\n break;\n case connectivity_state_1.ConnectivityState.IDLE:\n if (this.channelzEnabled && this.transport) {\n this.childrenTracker.unrefChild(this.transport.getChannelzRef());\n }\n (_b = this.transport) === null || _b === void 0 ? void 0 : _b.shutdown();\n this.transport = null;\n break;\n default:\n throw new Error(`Invalid state: unknown ConnectivityState ${newState}`);\n }\n for (const listener of this.stateListeners) {\n listener(this, previousState, newState, this.keepaliveTime, errorMessage);\n }\n return true;\n }\n ref() {\n this.refTrace('refcount ' + this.refcount + ' -> ' + (this.refcount + 1));\n this.refcount += 1;\n }\n unref() {\n this.refTrace('refcount ' + this.refcount + ' -> ' + (this.refcount - 1));\n this.refcount -= 1;\n if (this.refcount === 0) {\n this.channelzTrace.addTrace('CT_INFO', 'Shutting down');\n (0, channelz_1.unregisterChannelzRef)(this.channelzRef);\n process.nextTick(() => {\n this.transitionToState([connectivity_state_1.ConnectivityState.CONNECTING, connectivity_state_1.ConnectivityState.READY], connectivity_state_1.ConnectivityState.IDLE);\n });\n }\n }\n unrefIfOneRef() {\n if (this.refcount === 1) {\n this.unref();\n return true;\n }\n return false;\n }\n createCall(metadata, host, method, listener) {\n if (!this.transport) {\n throw new Error('Cannot create call, subchannel not READY');\n }\n let statsTracker;\n if (this.channelzEnabled) {\n this.callTracker.addCallStarted();\n this.streamTracker.addCallStarted();\n statsTracker = {\n onCallEnd: status => {\n if (status.code === constants_1.Status.OK) {\n this.callTracker.addCallSucceeded();\n }\n else {\n this.callTracker.addCallFailed();\n }\n },\n };\n }\n else {\n statsTracker = {};\n }\n return this.transport.createCall(metadata, host, method, listener, statsTracker);\n }\n /**\n * If the subchannel is currently IDLE, start connecting and switch to the\n * CONNECTING state. If the subchannel is current in TRANSIENT_FAILURE,\n * the next time it would transition to IDLE, start connecting again instead.\n * Otherwise, do nothing.\n */\n startConnecting() {\n process.nextTick(() => {\n /* First, try to transition from IDLE to connecting. If that doesn't happen\n * because the state is not currently IDLE, check if it is\n * TRANSIENT_FAILURE, and if so indicate that it should go back to\n * connecting after the backoff timer ends. Otherwise do nothing */\n if (!this.transitionToState([connectivity_state_1.ConnectivityState.IDLE], connectivity_state_1.ConnectivityState.CONNECTING)) {\n if (this.connectivityState === connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) {\n this.continueConnecting = true;\n }\n }\n });\n }\n /**\n * Get the subchannel's current connectivity state.\n */\n getConnectivityState() {\n return this.connectivityState;\n }\n /**\n * Add a listener function to be called whenever the subchannel's\n * connectivity state changes.\n * @param listener\n */\n addConnectivityStateListener(listener) {\n this.stateListeners.add(listener);\n }\n /**\n * Remove a listener previously added with `addConnectivityStateListener`\n * @param listener A reference to a function previously passed to\n * `addConnectivityStateListener`\n */\n removeConnectivityStateListener(listener) {\n this.stateListeners.delete(listener);\n }\n /**\n * Reset the backoff timeout, and immediately start connecting if in backoff.\n */\n resetBackoff() {\n process.nextTick(() => {\n this.backoffTimeout.reset();\n this.transitionToState([connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE], connectivity_state_1.ConnectivityState.CONNECTING);\n });\n }\n getAddress() {\n return this.subchannelAddressString;\n }\n getChannelzRef() {\n return this.channelzRef;\n }\n isHealthy() {\n return true;\n }\n addHealthStateWatcher(listener) {\n // Do nothing with the listener\n }\n removeHealthStateWatcher(listener) {\n // Do nothing with the listener\n }\n getRealSubchannel() {\n return this;\n }\n realSubchannelEquals(other) {\n return other.getRealSubchannel() === this;\n }\n throttleKeepalive(newKeepaliveTime) {\n if (newKeepaliveTime > this.keepaliveTime) {\n this.keepaliveTime = newKeepaliveTime;\n }\n }\n}\nexports.Subchannel = Subchannel;\n//# sourceMappingURL=subchannel.js.map","\"use strict\";\n/*\n * Copyright 2019 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDefaultRootsData = exports.CIPHER_SUITES = void 0;\nconst fs = require(\"fs\");\nexports.CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES;\nconst DEFAULT_ROOTS_FILE_PATH = process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH;\nlet defaultRootsData = null;\nfunction getDefaultRootsData() {\n if (DEFAULT_ROOTS_FILE_PATH) {\n if (defaultRootsData === null) {\n defaultRootsData = fs.readFileSync(DEFAULT_ROOTS_FILE_PATH);\n }\n return defaultRootsData;\n }\n return null;\n}\nexports.getDefaultRootsData = getDefaultRootsData;\n//# sourceMappingURL=tls-helpers.js.map","\"use strict\";\n/*\n * Copyright 2023 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Http2SubchannelConnector = void 0;\nconst http2 = require(\"http2\");\nconst tls_1 = require(\"tls\");\nconst channelz_1 = require(\"./channelz\");\nconst constants_1 = require(\"./constants\");\nconst http_proxy_1 = require(\"./http_proxy\");\nconst logging = require(\"./logging\");\nconst resolver_1 = require(\"./resolver\");\nconst subchannel_address_1 = require(\"./subchannel-address\");\nconst uri_parser_1 = require(\"./uri-parser\");\nconst net = require(\"net\");\nconst subchannel_call_1 = require(\"./subchannel-call\");\nconst call_number_1 = require(\"./call-number\");\nconst TRACER_NAME = 'transport';\nconst FLOW_CONTROL_TRACER_NAME = 'transport_flowctrl';\nconst clientVersion = require('../../package.json').version;\nconst { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_CONTENT_TYPE, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_TE, HTTP2_HEADER_USER_AGENT, } = http2.constants;\nconst KEEPALIVE_TIMEOUT_MS = 20000;\nconst tooManyPingsData = Buffer.from('too_many_pings', 'ascii');\nclass Http2Transport {\n constructor(session, subchannelAddress, options, \n /**\n * Name of the remote server, if it is not the same as the subchannel\n * address, i.e. if connecting through an HTTP CONNECT proxy.\n */\n remoteName) {\n this.session = session;\n this.remoteName = remoteName;\n /**\n * The amount of time in between sending pings\n */\n this.keepaliveTimeMs = -1;\n /**\n * The amount of time to wait for an acknowledgement after sending a ping\n */\n this.keepaliveTimeoutMs = KEEPALIVE_TIMEOUT_MS;\n /**\n * Timer reference for timeout that indicates when to send the next ping\n */\n this.keepaliveTimerId = null;\n /**\n * Indicates that the keepalive timer ran out while there were no active\n * calls, and a ping should be sent the next time a call starts.\n */\n this.pendingSendKeepalivePing = false;\n /**\n * Timer reference tracking when the most recent ping will be considered lost\n */\n this.keepaliveTimeoutId = null;\n /**\n * Indicates whether keepalive pings should be sent without any active calls\n */\n this.keepaliveWithoutCalls = false;\n this.activeCalls = new Set();\n this.disconnectListeners = [];\n this.disconnectHandled = false;\n this.channelzEnabled = true;\n this.keepalivesSent = 0;\n this.messagesSent = 0;\n this.messagesReceived = 0;\n this.lastMessageSentTimestamp = null;\n this.lastMessageReceivedTimestamp = null;\n /* Populate subchannelAddressString and channelzRef before doing anything\n * else, because they are used in the trace methods. */\n this.subchannelAddressString = (0, subchannel_address_1.subchannelAddressToString)(subchannelAddress);\n if (options['grpc.enable_channelz'] === 0) {\n this.channelzEnabled = false;\n this.streamTracker = new channelz_1.ChannelzCallTrackerStub();\n }\n else {\n this.streamTracker = new channelz_1.ChannelzCallTracker();\n }\n this.channelzRef = (0, channelz_1.registerChannelzSocket)(this.subchannelAddressString, () => this.getChannelzInfo(), this.channelzEnabled);\n // Build user-agent string.\n this.userAgent = [\n options['grpc.primary_user_agent'],\n `grpc-node-js/${clientVersion}`,\n options['grpc.secondary_user_agent'],\n ]\n .filter(e => e)\n .join(' '); // remove falsey values first\n if ('grpc.keepalive_time_ms' in options) {\n this.keepaliveTimeMs = options['grpc.keepalive_time_ms'];\n }\n if ('grpc.keepalive_timeout_ms' in options) {\n this.keepaliveTimeoutMs = options['grpc.keepalive_timeout_ms'];\n }\n if ('grpc.keepalive_permit_without_calls' in options) {\n this.keepaliveWithoutCalls =\n options['grpc.keepalive_permit_without_calls'] === 1;\n }\n else {\n this.keepaliveWithoutCalls = false;\n }\n session.once('close', () => {\n this.trace('session closed');\n this.stopKeepalivePings();\n this.handleDisconnect();\n });\n session.once('goaway', (errorCode, lastStreamID, opaqueData) => {\n let tooManyPings = false;\n /* See the last paragraph of\n * https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md#basic-keepalive */\n if (errorCode === http2.constants.NGHTTP2_ENHANCE_YOUR_CALM &&\n opaqueData &&\n opaqueData.equals(tooManyPingsData)) {\n tooManyPings = true;\n }\n this.trace('connection closed by GOAWAY with code ' +\n errorCode +\n ' and data ' +\n (opaqueData === null || opaqueData === void 0 ? void 0 : opaqueData.toString()));\n this.reportDisconnectToOwner(tooManyPings);\n });\n session.once('error', error => {\n /* Do nothing here. Any error should also trigger a close event, which is\n * where we want to handle that. */\n this.trace('connection closed with error ' + error.message);\n });\n if (logging.isTracerEnabled(TRACER_NAME)) {\n session.on('remoteSettings', (settings) => {\n this.trace('new settings received' +\n (this.session !== session ? ' on the old connection' : '') +\n ': ' +\n JSON.stringify(settings));\n });\n session.on('localSettings', (settings) => {\n this.trace('local settings acknowledged by remote' +\n (this.session !== session ? ' on the old connection' : '') +\n ': ' +\n JSON.stringify(settings));\n });\n }\n /* Start the keepalive timer last, because this can trigger trace logs,\n * which should only happen after everything else is set up. */\n if (this.keepaliveWithoutCalls) {\n this.maybeStartKeepalivePingTimer();\n }\n }\n getChannelzInfo() {\n var _a, _b, _c;\n const sessionSocket = this.session.socket;\n const remoteAddress = sessionSocket.remoteAddress\n ? (0, subchannel_address_1.stringToSubchannelAddress)(sessionSocket.remoteAddress, sessionSocket.remotePort)\n : null;\n const localAddress = sessionSocket.localAddress\n ? (0, subchannel_address_1.stringToSubchannelAddress)(sessionSocket.localAddress, sessionSocket.localPort)\n : null;\n let tlsInfo;\n if (this.session.encrypted) {\n const tlsSocket = sessionSocket;\n const cipherInfo = tlsSocket.getCipher();\n const certificate = tlsSocket.getCertificate();\n const peerCertificate = tlsSocket.getPeerCertificate();\n tlsInfo = {\n cipherSuiteStandardName: (_a = cipherInfo.standardName) !== null && _a !== void 0 ? _a : null,\n cipherSuiteOtherName: cipherInfo.standardName ? null : cipherInfo.name,\n localCertificate: certificate && 'raw' in certificate ? certificate.raw : null,\n remoteCertificate: peerCertificate && 'raw' in peerCertificate\n ? peerCertificate.raw\n : null,\n };\n }\n else {\n tlsInfo = null;\n }\n const socketInfo = {\n remoteAddress: remoteAddress,\n localAddress: localAddress,\n security: tlsInfo,\n remoteName: this.remoteName,\n streamsStarted: this.streamTracker.callsStarted,\n streamsSucceeded: this.streamTracker.callsSucceeded,\n streamsFailed: this.streamTracker.callsFailed,\n messagesSent: this.messagesSent,\n messagesReceived: this.messagesReceived,\n keepAlivesSent: this.keepalivesSent,\n lastLocalStreamCreatedTimestamp: this.streamTracker.lastCallStartedTimestamp,\n lastRemoteStreamCreatedTimestamp: null,\n lastMessageSentTimestamp: this.lastMessageSentTimestamp,\n lastMessageReceivedTimestamp: this.lastMessageReceivedTimestamp,\n localFlowControlWindow: (_b = this.session.state.localWindowSize) !== null && _b !== void 0 ? _b : null,\n remoteFlowControlWindow: (_c = this.session.state.remoteWindowSize) !== null && _c !== void 0 ? _c : null,\n };\n return socketInfo;\n }\n trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, '(' +\n this.channelzRef.id +\n ') ' +\n this.subchannelAddressString +\n ' ' +\n text);\n }\n keepaliveTrace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, 'keepalive', '(' +\n this.channelzRef.id +\n ') ' +\n this.subchannelAddressString +\n ' ' +\n text);\n }\n flowControlTrace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, FLOW_CONTROL_TRACER_NAME, '(' +\n this.channelzRef.id +\n ') ' +\n this.subchannelAddressString +\n ' ' +\n text);\n }\n internalsTrace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, 'transport_internals', '(' +\n this.channelzRef.id +\n ') ' +\n this.subchannelAddressString +\n ' ' +\n text);\n }\n /**\n * Indicate to the owner of this object that this transport should no longer\n * be used. That happens if the connection drops, or if the server sends a\n * GOAWAY.\n * @param tooManyPings If true, this was triggered by a GOAWAY with data\n * indicating that the session was closed becaues the client sent too many\n * pings.\n * @returns\n */\n reportDisconnectToOwner(tooManyPings) {\n if (this.disconnectHandled) {\n return;\n }\n this.disconnectHandled = true;\n this.disconnectListeners.forEach(listener => listener(tooManyPings));\n }\n /**\n * Handle connection drops, but not GOAWAYs.\n */\n handleDisconnect() {\n this.reportDisconnectToOwner(false);\n /* Give calls an event loop cycle to finish naturally before reporting the\n * disconnnection to them. */\n setImmediate(() => {\n for (const call of this.activeCalls) {\n call.onDisconnect();\n }\n });\n }\n addDisconnectListener(listener) {\n this.disconnectListeners.push(listener);\n }\n clearKeepaliveTimer() {\n if (!this.keepaliveTimerId) {\n return;\n }\n clearTimeout(this.keepaliveTimerId);\n this.keepaliveTimerId = null;\n }\n clearKeepaliveTimeout() {\n if (!this.keepaliveTimeoutId) {\n return;\n }\n clearTimeout(this.keepaliveTimeoutId);\n this.keepaliveTimeoutId = null;\n }\n canSendPing() {\n return (this.keepaliveTimeMs > 0 &&\n (this.keepaliveWithoutCalls || this.activeCalls.size > 0));\n }\n maybeSendPing() {\n var _a, _b;\n this.clearKeepaliveTimer();\n if (!this.canSendPing()) {\n this.pendingSendKeepalivePing = true;\n return;\n }\n if (this.channelzEnabled) {\n this.keepalivesSent += 1;\n }\n this.keepaliveTrace('Sending ping with timeout ' + this.keepaliveTimeoutMs + 'ms');\n if (!this.keepaliveTimeoutId) {\n this.keepaliveTimeoutId = setTimeout(() => {\n this.keepaliveTrace('Ping timeout passed without response');\n this.handleDisconnect();\n }, this.keepaliveTimeoutMs);\n (_b = (_a = this.keepaliveTimeoutId).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n try {\n this.session.ping((err, duration, payload) => {\n if (err) {\n this.keepaliveTrace('Ping failed with error ' + err.message);\n this.handleDisconnect();\n }\n this.keepaliveTrace('Received ping response');\n this.clearKeepaliveTimeout();\n this.maybeStartKeepalivePingTimer();\n });\n }\n catch (e) {\n /* If we fail to send a ping, the connection is no longer functional, so\n * we should discard it. */\n this.handleDisconnect();\n }\n }\n /**\n * Starts the keepalive ping timer if appropriate. If the timer already ran\n * out while there were no active requests, instead send a ping immediately.\n * If the ping timer is already running or a ping is currently in flight,\n * instead do nothing and wait for them to resolve.\n */\n maybeStartKeepalivePingTimer() {\n var _a, _b;\n if (!this.canSendPing()) {\n return;\n }\n if (this.pendingSendKeepalivePing) {\n this.pendingSendKeepalivePing = false;\n this.maybeSendPing();\n }\n else if (!this.keepaliveTimerId && !this.keepaliveTimeoutId) {\n this.keepaliveTrace('Starting keepalive timer for ' + this.keepaliveTimeMs + 'ms');\n this.keepaliveTimerId = setTimeout(() => {\n this.maybeSendPing();\n }, this.keepaliveTimeMs);\n (_b = (_a = this.keepaliveTimerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n /* Otherwise, there is already either a keepalive timer or a ping pending,\n * wait for those to resolve. */\n }\n stopKeepalivePings() {\n if (this.keepaliveTimerId) {\n clearTimeout(this.keepaliveTimerId);\n this.keepaliveTimerId = null;\n }\n this.clearKeepaliveTimeout();\n }\n removeActiveCall(call) {\n this.activeCalls.delete(call);\n if (this.activeCalls.size === 0) {\n this.session.unref();\n }\n }\n addActiveCall(call) {\n this.activeCalls.add(call);\n if (this.activeCalls.size === 1) {\n this.session.ref();\n if (!this.keepaliveWithoutCalls) {\n this.maybeStartKeepalivePingTimer();\n }\n }\n }\n createCall(metadata, host, method, listener, subchannelCallStatsTracker) {\n const headers = metadata.toHttp2Headers();\n headers[HTTP2_HEADER_AUTHORITY] = host;\n headers[HTTP2_HEADER_USER_AGENT] = this.userAgent;\n headers[HTTP2_HEADER_CONTENT_TYPE] = 'application/grpc';\n headers[HTTP2_HEADER_METHOD] = 'POST';\n headers[HTTP2_HEADER_PATH] = method;\n headers[HTTP2_HEADER_TE] = 'trailers';\n let http2Stream;\n /* In theory, if an error is thrown by session.request because session has\n * become unusable (e.g. because it has received a goaway), this subchannel\n * should soon see the corresponding close or goaway event anyway and leave\n * READY. But we have seen reports that this does not happen\n * (https://github.com/googleapis/nodejs-firestore/issues/1023#issuecomment-653204096)\n * so for defense in depth, we just discard the session when we see an\n * error here.\n */\n try {\n http2Stream = this.session.request(headers);\n }\n catch (e) {\n this.handleDisconnect();\n throw e;\n }\n this.flowControlTrace('local window size: ' +\n this.session.state.localWindowSize +\n ' remote window size: ' +\n this.session.state.remoteWindowSize);\n this.internalsTrace('session.closed=' +\n this.session.closed +\n ' session.destroyed=' +\n this.session.destroyed +\n ' session.socket.destroyed=' +\n this.session.socket.destroyed);\n let eventTracker;\n // eslint-disable-next-line prefer-const\n let call;\n if (this.channelzEnabled) {\n this.streamTracker.addCallStarted();\n eventTracker = {\n addMessageSent: () => {\n var _a;\n this.messagesSent += 1;\n this.lastMessageSentTimestamp = new Date();\n (_a = subchannelCallStatsTracker.addMessageSent) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker);\n },\n addMessageReceived: () => {\n var _a;\n this.messagesReceived += 1;\n this.lastMessageReceivedTimestamp = new Date();\n (_a = subchannelCallStatsTracker.addMessageReceived) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker);\n },\n onCallEnd: status => {\n var _a;\n (_a = subchannelCallStatsTracker.onCallEnd) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker, status);\n this.removeActiveCall(call);\n },\n onStreamEnd: success => {\n var _a;\n if (success) {\n this.streamTracker.addCallSucceeded();\n }\n else {\n this.streamTracker.addCallFailed();\n }\n (_a = subchannelCallStatsTracker.onStreamEnd) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker, success);\n },\n };\n }\n else {\n eventTracker = {\n addMessageSent: () => {\n var _a;\n (_a = subchannelCallStatsTracker.addMessageSent) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker);\n },\n addMessageReceived: () => {\n var _a;\n (_a = subchannelCallStatsTracker.addMessageReceived) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker);\n },\n onCallEnd: status => {\n var _a;\n (_a = subchannelCallStatsTracker.onCallEnd) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker, status);\n this.removeActiveCall(call);\n },\n onStreamEnd: success => {\n var _a;\n (_a = subchannelCallStatsTracker.onStreamEnd) === null || _a === void 0 ? void 0 : _a.call(subchannelCallStatsTracker, success);\n },\n };\n }\n call = new subchannel_call_1.Http2SubchannelCall(http2Stream, eventTracker, listener, this, (0, call_number_1.getNextCallNumber)());\n this.addActiveCall(call);\n return call;\n }\n getChannelzRef() {\n return this.channelzRef;\n }\n getPeerName() {\n return this.subchannelAddressString;\n }\n shutdown() {\n this.session.close();\n (0, channelz_1.unregisterChannelzRef)(this.channelzRef);\n }\n}\nclass Http2SubchannelConnector {\n constructor(channelTarget) {\n this.channelTarget = channelTarget;\n this.session = null;\n this.isShutdown = false;\n }\n trace(text) {\n logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, (0, uri_parser_1.uriToString)(this.channelTarget) + ' ' + text);\n }\n createSession(address, credentials, options, proxyConnectionResult) {\n if (this.isShutdown) {\n return Promise.reject();\n }\n return new Promise((resolve, reject) => {\n var _a, _b, _c, _d;\n let remoteName;\n if (proxyConnectionResult.realTarget) {\n remoteName = (0, uri_parser_1.uriToString)(proxyConnectionResult.realTarget);\n this.trace('creating HTTP/2 session through proxy to ' +\n (0, uri_parser_1.uriToString)(proxyConnectionResult.realTarget));\n }\n else {\n remoteName = null;\n this.trace('creating HTTP/2 session to ' + (0, subchannel_address_1.subchannelAddressToString)(address));\n }\n const targetAuthority = (0, resolver_1.getDefaultAuthority)((_a = proxyConnectionResult.realTarget) !== null && _a !== void 0 ? _a : this.channelTarget);\n let connectionOptions = credentials._getConnectionOptions() || {};\n connectionOptions.maxSendHeaderBlockLength = Number.MAX_SAFE_INTEGER;\n if ('grpc-node.max_session_memory' in options) {\n connectionOptions.maxSessionMemory =\n options['grpc-node.max_session_memory'];\n }\n else {\n /* By default, set a very large max session memory limit, to effectively\n * disable enforcement of the limit. Some testing indicates that Node's\n * behavior degrades badly when this limit is reached, so we solve that\n * by disabling the check entirely. */\n connectionOptions.maxSessionMemory = Number.MAX_SAFE_INTEGER;\n }\n let addressScheme = 'http://';\n if ('secureContext' in connectionOptions) {\n addressScheme = 'https://';\n // If provided, the value of grpc.ssl_target_name_override should be used\n // to override the target hostname when checking server identity.\n // This option is used for testing only.\n if (options['grpc.ssl_target_name_override']) {\n const sslTargetNameOverride = options['grpc.ssl_target_name_override'];\n const originalCheckServerIdentity = (_b = connectionOptions.checkServerIdentity) !== null && _b !== void 0 ? _b : tls_1.checkServerIdentity;\n connectionOptions.checkServerIdentity = (host, cert) => {\n return originalCheckServerIdentity(sslTargetNameOverride, cert);\n };\n connectionOptions.servername = sslTargetNameOverride;\n }\n else {\n const authorityHostname = (_d = (_c = (0, uri_parser_1.splitHostPort)(targetAuthority)) === null || _c === void 0 ? void 0 : _c.host) !== null && _d !== void 0 ? _d : 'localhost';\n // We want to always set servername to support SNI\n connectionOptions.servername = authorityHostname;\n }\n if (proxyConnectionResult.socket) {\n /* This is part of the workaround for\n * https://github.com/nodejs/node/issues/32922. Without that bug,\n * proxyConnectionResult.socket would always be a plaintext socket and\n * this would say\n * connectionOptions.socket = proxyConnectionResult.socket; */\n connectionOptions.createConnection = (authority, option) => {\n return proxyConnectionResult.socket;\n };\n }\n }\n else {\n /* In all but the most recent versions of Node, http2.connect does not use\n * the options when establishing plaintext connections, so we need to\n * establish that connection explicitly. */\n connectionOptions.createConnection = (authority, option) => {\n if (proxyConnectionResult.socket) {\n return proxyConnectionResult.socket;\n }\n else {\n /* net.NetConnectOpts is declared in a way that is more restrictive\n * than what net.connect will actually accept, so we use the type\n * assertion to work around that. */\n return net.connect(address);\n }\n };\n }\n connectionOptions = Object.assign(Object.assign(Object.assign({}, connectionOptions), address), { enableTrace: options['grpc-node.tls_enable_trace'] === 1 });\n /* http2.connect uses the options here:\n * https://github.com/nodejs/node/blob/70c32a6d190e2b5d7b9ff9d5b6a459d14e8b7d59/lib/internal/http2/core.js#L3028-L3036\n * The spread operator overides earlier values with later ones, so any port\n * or host values in the options will be used rather than any values extracted\n * from the first argument. In addition, the path overrides the host and port,\n * as documented for plaintext connections here:\n * https://nodejs.org/api/net.html#net_socket_connect_options_connectlistener\n * and for TLS connections here:\n * https://nodejs.org/api/tls.html#tls_tls_connect_options_callback. In\n * earlier versions of Node, http2.connect passes these options to\n * tls.connect but not net.connect, so in the insecure case we still need\n * to set the createConnection option above to create the connection\n * explicitly. We cannot do that in the TLS case because http2.connect\n * passes necessary additional options to tls.connect.\n * The first argument just needs to be parseable as a URL and the scheme\n * determines whether the connection will be established over TLS or not.\n */\n const session = http2.connect(addressScheme + targetAuthority, connectionOptions);\n this.session = session;\n let errorMessage = 'Failed to connect';\n session.unref();\n session.once('connect', () => {\n session.removeAllListeners();\n resolve(new Http2Transport(session, address, options, remoteName));\n this.session = null;\n });\n session.once('close', () => {\n this.session = null;\n // Leave time for error event to happen before rejecting\n setImmediate(() => {\n reject(`${errorMessage} (${new Date().toISOString()})`);\n });\n });\n session.once('error', error => {\n errorMessage = error.message;\n this.trace('connection failed with error ' + errorMessage);\n });\n });\n }\n connect(address, credentials, options) {\n var _a, _b, _c;\n if (this.isShutdown) {\n return Promise.reject();\n }\n /* Pass connection options through to the proxy so that it's able to\n * upgrade it's connection to support tls if needed.\n * This is a workaround for https://github.com/nodejs/node/issues/32922\n * See https://github.com/grpc/grpc-node/pull/1369 for more info. */\n const connectionOptions = credentials._getConnectionOptions() || {};\n if ('secureContext' in connectionOptions) {\n connectionOptions.ALPNProtocols = ['h2'];\n // If provided, the value of grpc.ssl_target_name_override should be used\n // to override the target hostname when checking server identity.\n // This option is used for testing only.\n if (options['grpc.ssl_target_name_override']) {\n const sslTargetNameOverride = options['grpc.ssl_target_name_override'];\n const originalCheckServerIdentity = (_a = connectionOptions.checkServerIdentity) !== null && _a !== void 0 ? _a : tls_1.checkServerIdentity;\n connectionOptions.checkServerIdentity = (host, cert) => {\n return originalCheckServerIdentity(sslTargetNameOverride, cert);\n };\n connectionOptions.servername = sslTargetNameOverride;\n }\n else {\n if ('grpc.http_connect_target' in options) {\n /* This is more or less how servername will be set in createSession\n * if a connection is successfully established through the proxy.\n * If the proxy is not used, these connectionOptions are discarded\n * anyway */\n const targetPath = (0, resolver_1.getDefaultAuthority)((_b = (0, uri_parser_1.parseUri)(options['grpc.http_connect_target'])) !== null && _b !== void 0 ? _b : {\n path: 'localhost',\n });\n const hostPort = (0, uri_parser_1.splitHostPort)(targetPath);\n connectionOptions.servername = (_c = hostPort === null || hostPort === void 0 ? void 0 : hostPort.host) !== null && _c !== void 0 ? _c : targetPath;\n }\n }\n if (options['grpc-node.tls_enable_trace']) {\n connectionOptions.enableTrace = true;\n }\n }\n return (0, http_proxy_1.getProxiedConnection)(address, options, connectionOptions).then(result => this.createSession(address, credentials, options, result));\n }\n shutdown() {\n var _a;\n this.isShutdown = true;\n (_a = this.session) === null || _a === void 0 ? void 0 : _a.close();\n this.session = null;\n }\n}\nexports.Http2SubchannelConnector = Http2SubchannelConnector;\n//# sourceMappingURL=transport.js.map","\"use strict\";\n/*\n * Copyright 2020 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uriToString = exports.combineHostPort = exports.splitHostPort = exports.parseUri = void 0;\n/*\n * The groups correspond to URI parts as follows:\n * 1. scheme\n * 2. authority\n * 3. path\n */\nconst URI_REGEX = /^(?:([A-Za-z0-9+.-]+):)?(?:\\/\\/([^/]*)\\/)?(.+)$/;\nfunction parseUri(uriString) {\n const parsedUri = URI_REGEX.exec(uriString);\n if (parsedUri === null) {\n return null;\n }\n return {\n scheme: parsedUri[1],\n authority: parsedUri[2],\n path: parsedUri[3],\n };\n}\nexports.parseUri = parseUri;\nconst NUMBER_REGEX = /^\\d+$/;\nfunction splitHostPort(path) {\n if (path.startsWith('[')) {\n const hostEnd = path.indexOf(']');\n if (hostEnd === -1) {\n return null;\n }\n const host = path.substring(1, hostEnd);\n /* Only an IPv6 address should be in bracketed notation, and an IPv6\n * address should have at least one colon */\n if (host.indexOf(':') === -1) {\n return null;\n }\n if (path.length > hostEnd + 1) {\n if (path[hostEnd + 1] === ':') {\n const portString = path.substring(hostEnd + 2);\n if (NUMBER_REGEX.test(portString)) {\n return {\n host: host,\n port: +portString,\n };\n }\n else {\n return null;\n }\n }\n else {\n return null;\n }\n }\n else {\n return {\n host,\n };\n }\n }\n else {\n const splitPath = path.split(':');\n /* Exactly one colon means that this is host:port. Zero colons means that\n * there is no port. And multiple colons means that this is a bare IPv6\n * address with no port */\n if (splitPath.length === 2) {\n if (NUMBER_REGEX.test(splitPath[1])) {\n return {\n host: splitPath[0],\n port: +splitPath[1],\n };\n }\n else {\n return null;\n }\n }\n else {\n return {\n host: path,\n };\n }\n }\n}\nexports.splitHostPort = splitHostPort;\nfunction combineHostPort(hostPort) {\n if (hostPort.port === undefined) {\n return hostPort.host;\n }\n else {\n // Only an IPv6 host should include a colon\n if (hostPort.host.includes(':')) {\n return `[${hostPort.host}]:${hostPort.port}`;\n }\n else {\n return `${hostPort.host}:${hostPort.port}`;\n }\n }\n}\nexports.combineHostPort = combineHostPort;\nfunction uriToString(uri) {\n let result = '';\n if (uri.scheme !== undefined) {\n result += uri.scheme + ':';\n }\n if (uri.authority !== undefined) {\n result += '//' + uri.authority + '/';\n }\n result += uri.path;\n return result;\n}\nexports.uriToString = uriToString;\n//# sourceMappingURL=uri-parser.js.map","\"use strict\";\n/**\n * @license\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loadFileDescriptorSetFromObject = exports.loadFileDescriptorSetFromBuffer = exports.fromJSON = exports.loadSync = exports.load = exports.IdempotencyLevel = exports.isAnyExtension = exports.Long = void 0;\nconst camelCase = require(\"lodash.camelcase\");\nconst Protobuf = require(\"protobufjs\");\nconst descriptor = require(\"protobufjs/ext/descriptor\");\nconst util_1 = require(\"./util\");\nconst Long = require(\"long\");\nexports.Long = Long;\nfunction isAnyExtension(obj) {\n return ('@type' in obj) && (typeof obj['@type'] === 'string');\n}\nexports.isAnyExtension = isAnyExtension;\nvar IdempotencyLevel;\n(function (IdempotencyLevel) {\n IdempotencyLevel[\"IDEMPOTENCY_UNKNOWN\"] = \"IDEMPOTENCY_UNKNOWN\";\n IdempotencyLevel[\"NO_SIDE_EFFECTS\"] = \"NO_SIDE_EFFECTS\";\n IdempotencyLevel[\"IDEMPOTENT\"] = \"IDEMPOTENT\";\n})(IdempotencyLevel = exports.IdempotencyLevel || (exports.IdempotencyLevel = {}));\nconst descriptorOptions = {\n longs: String,\n enums: String,\n bytes: String,\n defaults: true,\n oneofs: true,\n json: true,\n};\nfunction joinName(baseName, name) {\n if (baseName === '') {\n return name;\n }\n else {\n return baseName + '.' + name;\n }\n}\nfunction isHandledReflectionObject(obj) {\n return (obj instanceof Protobuf.Service ||\n obj instanceof Protobuf.Type ||\n obj instanceof Protobuf.Enum);\n}\nfunction isNamespaceBase(obj) {\n return obj instanceof Protobuf.Namespace || obj instanceof Protobuf.Root;\n}\nfunction getAllHandledReflectionObjects(obj, parentName) {\n const objName = joinName(parentName, obj.name);\n if (isHandledReflectionObject(obj)) {\n return [[objName, obj]];\n }\n else {\n if (isNamespaceBase(obj) && typeof obj.nested !== 'undefined') {\n return Object.keys(obj.nested)\n .map(name => {\n return getAllHandledReflectionObjects(obj.nested[name], objName);\n })\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);\n }\n }\n return [];\n}\nfunction createDeserializer(cls, options) {\n return function deserialize(argBuf) {\n return cls.toObject(cls.decode(argBuf), options);\n };\n}\nfunction createSerializer(cls) {\n return function serialize(arg) {\n if (Array.isArray(arg)) {\n throw new Error(`Failed to serialize message: expected object with ${cls.name} structure, got array instead`);\n }\n const message = cls.fromObject(arg);\n return cls.encode(message).finish();\n };\n}\nfunction mapMethodOptions(options) {\n return (options || []).reduce((obj, item) => {\n for (const [key, value] of Object.entries(item)) {\n switch (key) {\n case 'uninterpreted_option':\n obj.uninterpreted_option.push(item.uninterpreted_option);\n break;\n default:\n obj[key] = value;\n }\n }\n return obj;\n }, {\n deprecated: false,\n idempotency_level: IdempotencyLevel.IDEMPOTENCY_UNKNOWN,\n uninterpreted_option: [],\n });\n}\nfunction createMethodDefinition(method, serviceName, options, fileDescriptors) {\n /* This is only ever called after the corresponding root.resolveAll(), so we\n * can assume that the resolved request and response types are non-null */\n const requestType = method.resolvedRequestType;\n const responseType = method.resolvedResponseType;\n return {\n path: '/' + serviceName + '/' + method.name,\n requestStream: !!method.requestStream,\n responseStream: !!method.responseStream,\n requestSerialize: createSerializer(requestType),\n requestDeserialize: createDeserializer(requestType, options),\n responseSerialize: createSerializer(responseType),\n responseDeserialize: createDeserializer(responseType, options),\n // TODO(murgatroid99): Find a better way to handle this\n originalName: camelCase(method.name),\n requestType: createMessageDefinition(requestType, fileDescriptors),\n responseType: createMessageDefinition(responseType, fileDescriptors),\n options: mapMethodOptions(method.parsedOptions),\n };\n}\nfunction createServiceDefinition(service, name, options, fileDescriptors) {\n const def = {};\n for (const method of service.methodsArray) {\n def[method.name] = createMethodDefinition(method, name, options, fileDescriptors);\n }\n return def;\n}\nfunction createMessageDefinition(message, fileDescriptors) {\n const messageDescriptor = message.toDescriptor('proto3');\n return {\n format: 'Protocol Buffer 3 DescriptorProto',\n type: messageDescriptor.$type.toObject(messageDescriptor, descriptorOptions),\n fileDescriptorProtos: fileDescriptors,\n };\n}\nfunction createEnumDefinition(enumType, fileDescriptors) {\n const enumDescriptor = enumType.toDescriptor('proto3');\n return {\n format: 'Protocol Buffer 3 EnumDescriptorProto',\n type: enumDescriptor.$type.toObject(enumDescriptor, descriptorOptions),\n fileDescriptorProtos: fileDescriptors,\n };\n}\n/**\n * function createDefinition(obj: Protobuf.Service, name: string, options:\n * Options): ServiceDefinition; function createDefinition(obj: Protobuf.Type,\n * name: string, options: Options): MessageTypeDefinition; function\n * createDefinition(obj: Protobuf.Enum, name: string, options: Options):\n * EnumTypeDefinition;\n */\nfunction createDefinition(obj, name, options, fileDescriptors) {\n if (obj instanceof Protobuf.Service) {\n return createServiceDefinition(obj, name, options, fileDescriptors);\n }\n else if (obj instanceof Protobuf.Type) {\n return createMessageDefinition(obj, fileDescriptors);\n }\n else if (obj instanceof Protobuf.Enum) {\n return createEnumDefinition(obj, fileDescriptors);\n }\n else {\n throw new Error('Type mismatch in reflection object handling');\n }\n}\nfunction createPackageDefinition(root, options) {\n const def = {};\n root.resolveAll();\n const descriptorList = root.toDescriptor('proto3').file;\n const bufferList = descriptorList.map(value => Buffer.from(descriptor.FileDescriptorProto.encode(value).finish()));\n for (const [name, obj] of getAllHandledReflectionObjects(root, '')) {\n def[name] = createDefinition(obj, name, options, bufferList);\n }\n return def;\n}\nfunction createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options) {\n options = options || {};\n const root = Protobuf.Root.fromDescriptor(decodedDescriptorSet);\n root.resolveAll();\n return createPackageDefinition(root, options);\n}\n/**\n * Load a .proto file with the specified options.\n * @param filename One or multiple file paths to load. Can be an absolute path\n * or relative to an include path.\n * @param options.keepCase Preserve field names. The default is to change them\n * to camel case.\n * @param options.longs The type that should be used to represent `long` values.\n * Valid options are `Number` and `String`. Defaults to a `Long` object type\n * from a library.\n * @param options.enums The type that should be used to represent `enum` values.\n * The only valid option is `String`. Defaults to the numeric value.\n * @param options.bytes The type that should be used to represent `bytes`\n * values. Valid options are `Array` and `String`. The default is to use\n * `Buffer`.\n * @param options.defaults Set default values on output objects. Defaults to\n * `false`.\n * @param options.arrays Set empty arrays for missing array values even if\n * `defaults` is `false`. Defaults to `false`.\n * @param options.objects Set empty objects for missing object values even if\n * `defaults` is `false`. Defaults to `false`.\n * @param options.oneofs Set virtual oneof properties to the present field's\n * name\n * @param options.json Represent Infinity and NaN as strings in float fields,\n * and automatically decode google.protobuf.Any values.\n * @param options.includeDirs Paths to search for imported `.proto` files.\n */\nfunction load(filename, options) {\n return (0, util_1.loadProtosWithOptions)(filename, options).then(loadedRoot => {\n return createPackageDefinition(loadedRoot, options);\n });\n}\nexports.load = load;\nfunction loadSync(filename, options) {\n const loadedRoot = (0, util_1.loadProtosWithOptionsSync)(filename, options);\n return createPackageDefinition(loadedRoot, options);\n}\nexports.loadSync = loadSync;\nfunction fromJSON(json, options) {\n options = options || {};\n const loadedRoot = Protobuf.Root.fromJSON(json);\n loadedRoot.resolveAll();\n return createPackageDefinition(loadedRoot, options);\n}\nexports.fromJSON = fromJSON;\nfunction loadFileDescriptorSetFromBuffer(descriptorSet, options) {\n const decodedDescriptorSet = descriptor.FileDescriptorSet.decode(descriptorSet);\n return createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options);\n}\nexports.loadFileDescriptorSetFromBuffer = loadFileDescriptorSetFromBuffer;\nfunction loadFileDescriptorSetFromObject(descriptorSet, options) {\n const decodedDescriptorSet = descriptor.FileDescriptorSet.fromObject(descriptorSet);\n return createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options);\n}\nexports.loadFileDescriptorSetFromObject = loadFileDescriptorSetFromObject;\n(0, util_1.addCommonProtos)();\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @license\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.addCommonProtos = exports.loadProtosWithOptionsSync = exports.loadProtosWithOptions = void 0;\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst Protobuf = require(\"protobufjs\");\nfunction addIncludePathResolver(root, includePaths) {\n const originalResolvePath = root.resolvePath;\n root.resolvePath = (origin, target) => {\n if (path.isAbsolute(target)) {\n return target;\n }\n for (const directory of includePaths) {\n const fullPath = path.join(directory, target);\n try {\n fs.accessSync(fullPath, fs.constants.R_OK);\n return fullPath;\n }\n catch (err) {\n continue;\n }\n }\n process.emitWarning(`${target} not found in any of the include paths ${includePaths}`);\n return originalResolvePath(origin, target);\n };\n}\nasync function loadProtosWithOptions(filename, options) {\n const root = new Protobuf.Root();\n options = options || {};\n if (!!options.includeDirs) {\n if (!Array.isArray(options.includeDirs)) {\n return Promise.reject(new Error('The includeDirs option must be an array'));\n }\n addIncludePathResolver(root, options.includeDirs);\n }\n const loadedRoot = await root.load(filename, options);\n loadedRoot.resolveAll();\n return loadedRoot;\n}\nexports.loadProtosWithOptions = loadProtosWithOptions;\nfunction loadProtosWithOptionsSync(filename, options) {\n const root = new Protobuf.Root();\n options = options || {};\n if (!!options.includeDirs) {\n if (!Array.isArray(options.includeDirs)) {\n throw new Error('The includeDirs option must be an array');\n }\n addIncludePathResolver(root, options.includeDirs);\n }\n const loadedRoot = root.loadSync(filename, options);\n loadedRoot.resolveAll();\n return loadedRoot;\n}\nexports.loadProtosWithOptionsSync = loadProtosWithOptionsSync;\n/**\n * Load Google's well-known proto files that aren't exposed by Protobuf.js.\n */\nfunction addCommonProtos() {\n // Protobuf.js exposes: any, duration, empty, field_mask, struct, timestamp,\n // and wrappers. compiler/plugin is excluded in Protobuf.js and here.\n // Using constant strings for compatibility with tools like Webpack\n const apiDescriptor = require('protobufjs/google/protobuf/api.json');\n const descriptorDescriptor = require('protobufjs/google/protobuf/descriptor.json');\n const sourceContextDescriptor = require('protobufjs/google/protobuf/source_context.json');\n const typeDescriptor = require('protobufjs/google/protobuf/type.json');\n Protobuf.common('api', apiDescriptor.nested.google.nested.protobuf.nested);\n Protobuf.common('descriptor', descriptorDescriptor.nested.google.nested.protobuf.nested);\n Protobuf.common('source_context', sourceContextDescriptor.nested.google.nested.protobuf.nested);\n Protobuf.common('type', typeDescriptor.nested.google.nested.protobuf.nested);\n}\nexports.addCommonProtos = addCommonProtos;\n//# sourceMappingURL=util.js.map","\"use strict\";\nvar $protobuf = require(\"../..\");\nmodule.exports = exports = $protobuf.descriptor = $protobuf.Root.fromJSON(require(\"../../google/protobuf/descriptor.json\")).lookup(\".google.protobuf\");\n\nvar Namespace = $protobuf.Namespace,\n Root = $protobuf.Root,\n Enum = $protobuf.Enum,\n Type = $protobuf.Type,\n Field = $protobuf.Field,\n MapField = $protobuf.MapField,\n OneOf = $protobuf.OneOf,\n Service = $protobuf.Service,\n Method = $protobuf.Method;\n\n// --- Root ---\n\n/**\n * Properties of a FileDescriptorSet message.\n * @interface IFileDescriptorSet\n * @property {IFileDescriptorProto[]} file Files\n */\n\n/**\n * Properties of a FileDescriptorProto message.\n * @interface IFileDescriptorProto\n * @property {string} [name] File name\n * @property {string} [package] Package\n * @property {*} [dependency] Not supported\n * @property {*} [publicDependency] Not supported\n * @property {*} [weakDependency] Not supported\n * @property {IDescriptorProto[]} [messageType] Nested message types\n * @property {IEnumDescriptorProto[]} [enumType] Nested enums\n * @property {IServiceDescriptorProto[]} [service] Nested services\n * @property {IFieldDescriptorProto[]} [extension] Nested extension fields\n * @property {IFileOptions} [options] Options\n * @property {*} [sourceCodeInfo] Not supported\n * @property {string} [syntax=\"proto2\"] Syntax\n */\n\n/**\n * Properties of a FileOptions message.\n * @interface IFileOptions\n * @property {string} [javaPackage]\n * @property {string} [javaOuterClassname]\n * @property {boolean} [javaMultipleFiles]\n * @property {boolean} [javaGenerateEqualsAndHash]\n * @property {boolean} [javaStringCheckUtf8]\n * @property {IFileOptionsOptimizeMode} [optimizeFor=1]\n * @property {string} [goPackage]\n * @property {boolean} [ccGenericServices]\n * @property {boolean} [javaGenericServices]\n * @property {boolean} [pyGenericServices]\n * @property {boolean} [deprecated]\n * @property {boolean} [ccEnableArenas]\n * @property {string} [objcClassPrefix]\n * @property {string} [csharpNamespace]\n */\n\n/**\n * Values of he FileOptions.OptimizeMode enum.\n * @typedef IFileOptionsOptimizeMode\n * @type {number}\n * @property {number} SPEED=1\n * @property {number} CODE_SIZE=2\n * @property {number} LITE_RUNTIME=3\n */\n\n/**\n * Creates a root from a descriptor set.\n * @param {IFileDescriptorSet|Reader|Uint8Array} descriptor Descriptor\n * @returns {Root} Root instance\n */\nRoot.fromDescriptor = function fromDescriptor(descriptor) {\n\n // Decode the descriptor message if specified as a buffer:\n if (typeof descriptor.length === \"number\")\n descriptor = exports.FileDescriptorSet.decode(descriptor);\n\n var root = new Root();\n\n if (descriptor.file) {\n var fileDescriptor,\n filePackage;\n for (var j = 0, i; j < descriptor.file.length; ++j) {\n filePackage = root;\n if ((fileDescriptor = descriptor.file[j])[\"package\"] && fileDescriptor[\"package\"].length)\n filePackage = root.define(fileDescriptor[\"package\"]);\n if (fileDescriptor.name && fileDescriptor.name.length)\n root.files.push(filePackage.filename = fileDescriptor.name);\n if (fileDescriptor.messageType)\n for (i = 0; i < fileDescriptor.messageType.length; ++i)\n filePackage.add(Type.fromDescriptor(fileDescriptor.messageType[i], fileDescriptor.syntax));\n if (fileDescriptor.enumType)\n for (i = 0; i < fileDescriptor.enumType.length; ++i)\n filePackage.add(Enum.fromDescriptor(fileDescriptor.enumType[i]));\n if (fileDescriptor.extension)\n for (i = 0; i < fileDescriptor.extension.length; ++i)\n filePackage.add(Field.fromDescriptor(fileDescriptor.extension[i]));\n if (fileDescriptor.service)\n for (i = 0; i < fileDescriptor.service.length; ++i)\n filePackage.add(Service.fromDescriptor(fileDescriptor.service[i]));\n var opts = fromDescriptorOptions(fileDescriptor.options, exports.FileOptions);\n if (opts) {\n var ks = Object.keys(opts);\n for (i = 0; i < ks.length; ++i)\n filePackage.setOption(ks[i], opts[ks[i]]);\n }\n }\n }\n\n return root;\n};\n\n/**\n * Converts a root to a descriptor set.\n * @returns {Message} Descriptor\n * @param {string} [syntax=\"proto2\"] Syntax\n */\nRoot.prototype.toDescriptor = function toDescriptor(syntax) {\n var set = exports.FileDescriptorSet.create();\n Root_toDescriptorRecursive(this, set.file, syntax);\n return set;\n};\n\n// Traverses a namespace and assembles the descriptor set\nfunction Root_toDescriptorRecursive(ns, files, syntax) {\n\n // Create a new file\n var file = exports.FileDescriptorProto.create({ name: ns.filename || (ns.fullName.substring(1).replace(/\\./g, \"_\") || \"root\") + \".proto\" });\n if (syntax)\n file.syntax = syntax;\n if (!(ns instanceof Root))\n file[\"package\"] = ns.fullName.substring(1);\n\n // Add nested types\n for (var i = 0, nested; i < ns.nestedArray.length; ++i)\n if ((nested = ns._nestedArray[i]) instanceof Type)\n file.messageType.push(nested.toDescriptor(syntax));\n else if (nested instanceof Enum)\n file.enumType.push(nested.toDescriptor());\n else if (nested instanceof Field)\n file.extension.push(nested.toDescriptor(syntax));\n else if (nested instanceof Service)\n file.service.push(nested.toDescriptor());\n else if (nested instanceof /* plain */ Namespace)\n Root_toDescriptorRecursive(nested, files, syntax); // requires new file\n\n // Keep package-level options\n file.options = toDescriptorOptions(ns.options, exports.FileOptions);\n\n // And keep the file only if there is at least one nested object\n if (file.messageType.length + file.enumType.length + file.extension.length + file.service.length)\n files.push(file);\n}\n\n// --- Type ---\n\n/**\n * Properties of a DescriptorProto message.\n * @interface IDescriptorProto\n * @property {string} [name] Message type name\n * @property {IFieldDescriptorProto[]} [field] Fields\n * @property {IFieldDescriptorProto[]} [extension] Extension fields\n * @property {IDescriptorProto[]} [nestedType] Nested message types\n * @property {IEnumDescriptorProto[]} [enumType] Nested enums\n * @property {IDescriptorProtoExtensionRange[]} [extensionRange] Extension ranges\n * @property {IOneofDescriptorProto[]} [oneofDecl] Oneofs\n * @property {IMessageOptions} [options] Not supported\n * @property {IDescriptorProtoReservedRange[]} [reservedRange] Reserved ranges\n * @property {string[]} [reservedName] Reserved names\n */\n\n/**\n * Properties of a MessageOptions message.\n * @interface IMessageOptions\n * @property {boolean} [mapEntry=false] Whether this message is a map entry\n */\n\n/**\n * Properties of an ExtensionRange message.\n * @interface IDescriptorProtoExtensionRange\n * @property {number} [start] Start field id\n * @property {number} [end] End field id\n */\n\n/**\n * Properties of a ReservedRange message.\n * @interface IDescriptorProtoReservedRange\n * @property {number} [start] Start field id\n * @property {number} [end] End field id\n */\n\nvar unnamedMessageIndex = 0;\n\n/**\n * Creates a type from a descriptor.\n * @param {IDescriptorProto|Reader|Uint8Array} descriptor Descriptor\n * @param {string} [syntax=\"proto2\"] Syntax\n * @returns {Type} Type instance\n */\nType.fromDescriptor = function fromDescriptor(descriptor, syntax) {\n\n // Decode the descriptor message if specified as a buffer:\n if (typeof descriptor.length === \"number\")\n descriptor = exports.DescriptorProto.decode(descriptor);\n\n // Create the message type\n var type = new Type(descriptor.name.length ? descriptor.name : \"Type\" + unnamedMessageIndex++, fromDescriptorOptions(descriptor.options, exports.MessageOptions)),\n i;\n\n /* Oneofs */ if (descriptor.oneofDecl)\n for (i = 0; i < descriptor.oneofDecl.length; ++i)\n type.add(OneOf.fromDescriptor(descriptor.oneofDecl[i]));\n /* Fields */ if (descriptor.field)\n for (i = 0; i < descriptor.field.length; ++i) {\n var field = Field.fromDescriptor(descriptor.field[i], syntax);\n type.add(field);\n if (descriptor.field[i].hasOwnProperty(\"oneofIndex\")) // eslint-disable-line no-prototype-builtins\n type.oneofsArray[descriptor.field[i].oneofIndex].add(field);\n }\n /* Extension fields */ if (descriptor.extension)\n for (i = 0; i < descriptor.extension.length; ++i)\n type.add(Field.fromDescriptor(descriptor.extension[i], syntax));\n /* Nested types */ if (descriptor.nestedType)\n for (i = 0; i < descriptor.nestedType.length; ++i) {\n type.add(Type.fromDescriptor(descriptor.nestedType[i], syntax));\n if (descriptor.nestedType[i].options && descriptor.nestedType[i].options.mapEntry)\n type.setOption(\"map_entry\", true);\n }\n /* Nested enums */ if (descriptor.enumType)\n for (i = 0; i < descriptor.enumType.length; ++i)\n type.add(Enum.fromDescriptor(descriptor.enumType[i]));\n /* Extension ranges */ if (descriptor.extensionRange && descriptor.extensionRange.length) {\n type.extensions = [];\n for (i = 0; i < descriptor.extensionRange.length; ++i)\n type.extensions.push([ descriptor.extensionRange[i].start, descriptor.extensionRange[i].end ]);\n }\n /* Reserved... */ if (descriptor.reservedRange && descriptor.reservedRange.length || descriptor.reservedName && descriptor.reservedName.length) {\n type.reserved = [];\n /* Ranges */ if (descriptor.reservedRange)\n for (i = 0; i < descriptor.reservedRange.length; ++i)\n type.reserved.push([ descriptor.reservedRange[i].start, descriptor.reservedRange[i].end ]);\n /* Names */ if (descriptor.reservedName)\n for (i = 0; i < descriptor.reservedName.length; ++i)\n type.reserved.push(descriptor.reservedName[i]);\n }\n\n return type;\n};\n\n/**\n * Converts a type to a descriptor.\n * @returns {Message} Descriptor\n * @param {string} [syntax=\"proto2\"] Syntax\n */\nType.prototype.toDescriptor = function toDescriptor(syntax) {\n var descriptor = exports.DescriptorProto.create({ name: this.name }),\n i;\n\n /* Fields */ for (i = 0; i < this.fieldsArray.length; ++i) {\n var fieldDescriptor;\n descriptor.field.push(fieldDescriptor = this._fieldsArray[i].toDescriptor(syntax));\n if (this._fieldsArray[i] instanceof MapField) { // map fields are repeated FieldNameEntry\n var keyType = toDescriptorType(this._fieldsArray[i].keyType, this._fieldsArray[i].resolvedKeyType),\n valueType = toDescriptorType(this._fieldsArray[i].type, this._fieldsArray[i].resolvedType),\n valueTypeName = valueType === /* type */ 11 || valueType === /* enum */ 14\n ? this._fieldsArray[i].resolvedType && shortname(this.parent, this._fieldsArray[i].resolvedType) || this._fieldsArray[i].type\n : undefined;\n descriptor.nestedType.push(exports.DescriptorProto.create({\n name: fieldDescriptor.typeName,\n field: [\n exports.FieldDescriptorProto.create({ name: \"key\", number: 1, label: 1, type: keyType }), // can't reference a type or enum\n exports.FieldDescriptorProto.create({ name: \"value\", number: 2, label: 1, type: valueType, typeName: valueTypeName })\n ],\n options: exports.MessageOptions.create({ mapEntry: true })\n }));\n }\n }\n /* Oneofs */ for (i = 0; i < this.oneofsArray.length; ++i)\n descriptor.oneofDecl.push(this._oneofsArray[i].toDescriptor());\n /* Nested... */ for (i = 0; i < this.nestedArray.length; ++i) {\n /* Extension fields */ if (this._nestedArray[i] instanceof Field)\n descriptor.field.push(this._nestedArray[i].toDescriptor(syntax));\n /* Types */ else if (this._nestedArray[i] instanceof Type)\n descriptor.nestedType.push(this._nestedArray[i].toDescriptor(syntax));\n /* Enums */ else if (this._nestedArray[i] instanceof Enum)\n descriptor.enumType.push(this._nestedArray[i].toDescriptor());\n // plain nested namespaces become packages instead in Root#toDescriptor\n }\n /* Extension ranges */ if (this.extensions)\n for (i = 0; i < this.extensions.length; ++i)\n descriptor.extensionRange.push(exports.DescriptorProto.ExtensionRange.create({ start: this.extensions[i][0], end: this.extensions[i][1] }));\n /* Reserved... */ if (this.reserved)\n for (i = 0; i < this.reserved.length; ++i)\n /* Names */ if (typeof this.reserved[i] === \"string\")\n descriptor.reservedName.push(this.reserved[i]);\n /* Ranges */ else\n descriptor.reservedRange.push(exports.DescriptorProto.ReservedRange.create({ start: this.reserved[i][0], end: this.reserved[i][1] }));\n\n descriptor.options = toDescriptorOptions(this.options, exports.MessageOptions);\n\n return descriptor;\n};\n\n// --- Field ---\n\n/**\n * Properties of a FieldDescriptorProto message.\n * @interface IFieldDescriptorProto\n * @property {string} [name] Field name\n * @property {number} [number] Field id\n * @property {IFieldDescriptorProtoLabel} [label] Field rule\n * @property {IFieldDescriptorProtoType} [type] Field basic type\n * @property {string} [typeName] Field type name\n * @property {string} [extendee] Extended type name\n * @property {string} [defaultValue] Literal default value\n * @property {number} [oneofIndex] Oneof index if part of a oneof\n * @property {*} [jsonName] Not supported\n * @property {IFieldOptions} [options] Field options\n */\n\n/**\n * Values of the FieldDescriptorProto.Label enum.\n * @typedef IFieldDescriptorProtoLabel\n * @type {number}\n * @property {number} LABEL_OPTIONAL=1\n * @property {number} LABEL_REQUIRED=2\n * @property {number} LABEL_REPEATED=3\n */\n\n/**\n * Values of the FieldDescriptorProto.Type enum.\n * @typedef IFieldDescriptorProtoType\n * @type {number}\n * @property {number} TYPE_DOUBLE=1\n * @property {number} TYPE_FLOAT=2\n * @property {number} TYPE_INT64=3\n * @property {number} TYPE_UINT64=4\n * @property {number} TYPE_INT32=5\n * @property {number} TYPE_FIXED64=6\n * @property {number} TYPE_FIXED32=7\n * @property {number} TYPE_BOOL=8\n * @property {number} TYPE_STRING=9\n * @property {number} TYPE_GROUP=10\n * @property {number} TYPE_MESSAGE=11\n * @property {number} TYPE_BYTES=12\n * @property {number} TYPE_UINT32=13\n * @property {number} TYPE_ENUM=14\n * @property {number} TYPE_SFIXED32=15\n * @property {number} TYPE_SFIXED64=16\n * @property {number} TYPE_SINT32=17\n * @property {number} TYPE_SINT64=18\n */\n\n/**\n * Properties of a FieldOptions message.\n * @interface IFieldOptions\n * @property {boolean} [packed] Whether packed or not (defaults to `false` for proto2 and `true` for proto3)\n * @property {IFieldOptionsJSType} [jstype] JavaScript value type (not used by protobuf.js)\n */\n\n/**\n * Values of the FieldOptions.JSType enum.\n * @typedef IFieldOptionsJSType\n * @type {number}\n * @property {number} JS_NORMAL=0\n * @property {number} JS_STRING=1\n * @property {number} JS_NUMBER=2\n */\n\n// copied here from parse.js\nvar numberRe = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;\n\n/**\n * Creates a field from a descriptor.\n * @param {IFieldDescriptorProto|Reader|Uint8Array} descriptor Descriptor\n * @param {string} [syntax=\"proto2\"] Syntax\n * @returns {Field} Field instance\n */\nField.fromDescriptor = function fromDescriptor(descriptor, syntax) {\n\n // Decode the descriptor message if specified as a buffer:\n if (typeof descriptor.length === \"number\")\n descriptor = exports.DescriptorProto.decode(descriptor);\n\n if (typeof descriptor.number !== \"number\")\n throw Error(\"missing field id\");\n\n // Rewire field type\n var fieldType;\n if (descriptor.typeName && descriptor.typeName.length)\n fieldType = descriptor.typeName;\n else\n fieldType = fromDescriptorType(descriptor.type);\n\n // Rewire field rule\n var fieldRule;\n switch (descriptor.label) {\n // 0 is reserved for errors\n case 1: fieldRule = undefined; break;\n case 2: fieldRule = \"required\"; break;\n case 3: fieldRule = \"repeated\"; break;\n default: throw Error(\"illegal label: \" + descriptor.label);\n }\n\n\tvar extendee = descriptor.extendee;\n\tif (descriptor.extendee !== undefined) {\n\t\textendee = extendee.length ? extendee : undefined;\n\t}\n var field = new Field(\n descriptor.name.length ? descriptor.name : \"field\" + descriptor.number,\n descriptor.number,\n fieldType,\n fieldRule,\n extendee\n );\n\n field.options = fromDescriptorOptions(descriptor.options, exports.FieldOptions);\n\n if (descriptor.defaultValue && descriptor.defaultValue.length) {\n var defaultValue = descriptor.defaultValue;\n switch (defaultValue) {\n case \"true\": case \"TRUE\":\n defaultValue = true;\n break;\n case \"false\": case \"FALSE\":\n defaultValue = false;\n break;\n default:\n var match = numberRe.exec(defaultValue);\n if (match)\n defaultValue = parseInt(defaultValue); // eslint-disable-line radix\n break;\n }\n field.setOption(\"default\", defaultValue);\n }\n\n if (packableDescriptorType(descriptor.type)) {\n if (syntax === \"proto3\") { // defaults to packed=true (internal preset is packed=true)\n if (descriptor.options && !descriptor.options.packed)\n field.setOption(\"packed\", false);\n } else if (!(descriptor.options && descriptor.options.packed)) // defaults to packed=false\n field.setOption(\"packed\", false);\n }\n\n return field;\n};\n\n/**\n * Converts a field to a descriptor.\n * @returns {Message} Descriptor\n * @param {string} [syntax=\"proto2\"] Syntax\n */\nField.prototype.toDescriptor = function toDescriptor(syntax) {\n var descriptor = exports.FieldDescriptorProto.create({ name: this.name, number: this.id });\n\n if (this.map) {\n\n descriptor.type = 11; // message\n descriptor.typeName = $protobuf.util.ucFirst(this.name); // fieldName -> FieldNameEntry (built in Type#toDescriptor)\n descriptor.label = 3; // repeated\n\n } else {\n\n // Rewire field type\n switch (descriptor.type = toDescriptorType(this.type, this.resolve().resolvedType)) {\n case 10: // group\n case 11: // type\n case 14: // enum\n descriptor.typeName = this.resolvedType ? shortname(this.parent, this.resolvedType) : this.type;\n break;\n }\n\n // Rewire field rule\n switch (this.rule) {\n case \"repeated\": descriptor.label = 3; break;\n case \"required\": descriptor.label = 2; break;\n default: descriptor.label = 1; break;\n }\n\n }\n\n // Handle extension field\n descriptor.extendee = this.extensionField ? this.extensionField.parent.fullName : this.extend;\n\n // Handle part of oneof\n if (this.partOf)\n if ((descriptor.oneofIndex = this.parent.oneofsArray.indexOf(this.partOf)) < 0)\n throw Error(\"missing oneof\");\n\n if (this.options) {\n descriptor.options = toDescriptorOptions(this.options, exports.FieldOptions);\n if (this.options[\"default\"] != null)\n descriptor.defaultValue = String(this.options[\"default\"]);\n }\n\n if (syntax === \"proto3\") { // defaults to packed=true\n if (!this.packed)\n (descriptor.options || (descriptor.options = exports.FieldOptions.create())).packed = false;\n } else if (this.packed) // defaults to packed=false\n (descriptor.options || (descriptor.options = exports.FieldOptions.create())).packed = true;\n\n return descriptor;\n};\n\n// --- Enum ---\n\n/**\n * Properties of an EnumDescriptorProto message.\n * @interface IEnumDescriptorProto\n * @property {string} [name] Enum name\n * @property {IEnumValueDescriptorProto[]} [value] Enum values\n * @property {IEnumOptions} [options] Enum options\n */\n\n/**\n * Properties of an EnumValueDescriptorProto message.\n * @interface IEnumValueDescriptorProto\n * @property {string} [name] Name\n * @property {number} [number] Value\n * @property {*} [options] Not supported\n */\n\n/**\n * Properties of an EnumOptions message.\n * @interface IEnumOptions\n * @property {boolean} [allowAlias] Whether aliases are allowed\n * @property {boolean} [deprecated]\n */\n\nvar unnamedEnumIndex = 0;\n\n/**\n * Creates an enum from a descriptor.\n * @param {IEnumDescriptorProto|Reader|Uint8Array} descriptor Descriptor\n * @returns {Enum} Enum instance\n */\nEnum.fromDescriptor = function fromDescriptor(descriptor) {\n\n // Decode the descriptor message if specified as a buffer:\n if (typeof descriptor.length === \"number\")\n descriptor = exports.EnumDescriptorProto.decode(descriptor);\n\n // Construct values object\n var values = {};\n if (descriptor.value)\n for (var i = 0; i < descriptor.value.length; ++i) {\n var name = descriptor.value[i].name,\n value = descriptor.value[i].number || 0;\n values[name && name.length ? name : \"NAME\" + value] = value;\n }\n\n return new Enum(\n descriptor.name && descriptor.name.length ? descriptor.name : \"Enum\" + unnamedEnumIndex++,\n values,\n fromDescriptorOptions(descriptor.options, exports.EnumOptions)\n );\n};\n\n/**\n * Converts an enum to a descriptor.\n * @returns {Message} Descriptor\n */\nEnum.prototype.toDescriptor = function toDescriptor() {\n\n // Values\n var values = [];\n for (var i = 0, ks = Object.keys(this.values); i < ks.length; ++i)\n values.push(exports.EnumValueDescriptorProto.create({ name: ks[i], number: this.values[ks[i]] }));\n\n return exports.EnumDescriptorProto.create({\n name: this.name,\n value: values,\n options: toDescriptorOptions(this.options, exports.EnumOptions)\n });\n};\n\n// --- OneOf ---\n\n/**\n * Properties of a OneofDescriptorProto message.\n * @interface IOneofDescriptorProto\n * @property {string} [name] Oneof name\n * @property {*} [options] Not supported\n */\n\nvar unnamedOneofIndex = 0;\n\n/**\n * Creates a oneof from a descriptor.\n * @param {IOneofDescriptorProto|Reader|Uint8Array} descriptor Descriptor\n * @returns {OneOf} OneOf instance\n */\nOneOf.fromDescriptor = function fromDescriptor(descriptor) {\n\n // Decode the descriptor message if specified as a buffer:\n if (typeof descriptor.length === \"number\")\n descriptor = exports.OneofDescriptorProto.decode(descriptor);\n\n return new OneOf(\n // unnamedOneOfIndex is global, not per type, because we have no ref to a type here\n descriptor.name && descriptor.name.length ? descriptor.name : \"oneof\" + unnamedOneofIndex++\n // fromDescriptorOptions(descriptor.options, exports.OneofOptions) - only uninterpreted_option\n );\n};\n\n/**\n * Converts a oneof to a descriptor.\n * @returns {Message} Descriptor\n */\nOneOf.prototype.toDescriptor = function toDescriptor() {\n return exports.OneofDescriptorProto.create({\n name: this.name\n // options: toDescriptorOptions(this.options, exports.OneofOptions) - only uninterpreted_option\n });\n};\n\n// --- Service ---\n\n/**\n * Properties of a ServiceDescriptorProto message.\n * @interface IServiceDescriptorProto\n * @property {string} [name] Service name\n * @property {IMethodDescriptorProto[]} [method] Methods\n * @property {IServiceOptions} [options] Options\n */\n\n/**\n * Properties of a ServiceOptions message.\n * @interface IServiceOptions\n * @property {boolean} [deprecated]\n */\n\nvar unnamedServiceIndex = 0;\n\n/**\n * Creates a service from a descriptor.\n * @param {IServiceDescriptorProto|Reader|Uint8Array} descriptor Descriptor\n * @returns {Service} Service instance\n */\nService.fromDescriptor = function fromDescriptor(descriptor) {\n\n // Decode the descriptor message if specified as a buffer:\n if (typeof descriptor.length === \"number\")\n descriptor = exports.ServiceDescriptorProto.decode(descriptor);\n\n var service = new Service(descriptor.name && descriptor.name.length ? descriptor.name : \"Service\" + unnamedServiceIndex++, fromDescriptorOptions(descriptor.options, exports.ServiceOptions));\n if (descriptor.method)\n for (var i = 0; i < descriptor.method.length; ++i)\n service.add(Method.fromDescriptor(descriptor.method[i]));\n\n return service;\n};\n\n/**\n * Converts a service to a descriptor.\n * @returns {Message} Descriptor\n */\nService.prototype.toDescriptor = function toDescriptor() {\n\n // Methods\n var methods = [];\n for (var i = 0; i < this.methodsArray.length; ++i)\n methods.push(this._methodsArray[i].toDescriptor());\n\n return exports.ServiceDescriptorProto.create({\n name: this.name,\n method: methods,\n options: toDescriptorOptions(this.options, exports.ServiceOptions)\n });\n};\n\n// --- Method ---\n\n/**\n * Properties of a MethodDescriptorProto message.\n * @interface IMethodDescriptorProto\n * @property {string} [name] Method name\n * @property {string} [inputType] Request type name\n * @property {string} [outputType] Response type name\n * @property {IMethodOptions} [options] Not supported\n * @property {boolean} [clientStreaming=false] Whether requests are streamed\n * @property {boolean} [serverStreaming=false] Whether responses are streamed\n */\n\n/**\n * Properties of a MethodOptions message.\n * @interface IMethodOptions\n * @property {boolean} [deprecated]\n */\n\nvar unnamedMethodIndex = 0;\n\n/**\n * Creates a method from a descriptor.\n * @param {IMethodDescriptorProto|Reader|Uint8Array} descriptor Descriptor\n * @returns {Method} Reflected method instance\n */\nMethod.fromDescriptor = function fromDescriptor(descriptor) {\n\n // Decode the descriptor message if specified as a buffer:\n if (typeof descriptor.length === \"number\")\n descriptor = exports.MethodDescriptorProto.decode(descriptor);\n\n return new Method(\n // unnamedMethodIndex is global, not per service, because we have no ref to a service here\n descriptor.name && descriptor.name.length ? descriptor.name : \"Method\" + unnamedMethodIndex++,\n \"rpc\",\n descriptor.inputType,\n descriptor.outputType,\n Boolean(descriptor.clientStreaming),\n Boolean(descriptor.serverStreaming),\n fromDescriptorOptions(descriptor.options, exports.MethodOptions)\n );\n};\n\n/**\n * Converts a method to a descriptor.\n * @returns {Message} Descriptor\n */\nMethod.prototype.toDescriptor = function toDescriptor() {\n return exports.MethodDescriptorProto.create({\n name: this.name,\n inputType: this.resolvedRequestType ? this.resolvedRequestType.fullName : this.requestType,\n outputType: this.resolvedResponseType ? this.resolvedResponseType.fullName : this.responseType,\n clientStreaming: this.requestStream,\n serverStreaming: this.responseStream,\n options: toDescriptorOptions(this.options, exports.MethodOptions)\n });\n};\n\n// --- utility ---\n\n// Converts a descriptor type to a protobuf.js basic type\nfunction fromDescriptorType(type) {\n switch (type) {\n // 0 is reserved for errors\n case 1: return \"double\";\n case 2: return \"float\";\n case 3: return \"int64\";\n case 4: return \"uint64\";\n case 5: return \"int32\";\n case 6: return \"fixed64\";\n case 7: return \"fixed32\";\n case 8: return \"bool\";\n case 9: return \"string\";\n case 12: return \"bytes\";\n case 13: return \"uint32\";\n case 15: return \"sfixed32\";\n case 16: return \"sfixed64\";\n case 17: return \"sint32\";\n case 18: return \"sint64\";\n }\n throw Error(\"illegal type: \" + type);\n}\n\n// Tests if a descriptor type is packable\nfunction packableDescriptorType(type) {\n switch (type) {\n case 1: // double\n case 2: // float\n case 3: // int64\n case 4: // uint64\n case 5: // int32\n case 6: // fixed64\n case 7: // fixed32\n case 8: // bool\n case 13: // uint32\n case 14: // enum (!)\n case 15: // sfixed32\n case 16: // sfixed64\n case 17: // sint32\n case 18: // sint64\n return true;\n }\n return false;\n}\n\n// Converts a protobuf.js basic type to a descriptor type\nfunction toDescriptorType(type, resolvedType) {\n switch (type) {\n // 0 is reserved for errors\n case \"double\": return 1;\n case \"float\": return 2;\n case \"int64\": return 3;\n case \"uint64\": return 4;\n case \"int32\": return 5;\n case \"fixed64\": return 6;\n case \"fixed32\": return 7;\n case \"bool\": return 8;\n case \"string\": return 9;\n case \"bytes\": return 12;\n case \"uint32\": return 13;\n case \"sfixed32\": return 15;\n case \"sfixed64\": return 16;\n case \"sint32\": return 17;\n case \"sint64\": return 18;\n }\n if (resolvedType instanceof Enum)\n return 14;\n if (resolvedType instanceof Type)\n return resolvedType.group ? 10 : 11;\n throw Error(\"illegal type: \" + type);\n}\n\n// Converts descriptor options to an options object\nfunction fromDescriptorOptions(options, type) {\n if (!options)\n return undefined;\n var out = [];\n for (var i = 0, field, key, val; i < type.fieldsArray.length; ++i)\n if ((key = (field = type._fieldsArray[i]).name) !== \"uninterpretedOption\")\n if (options.hasOwnProperty(key)) { // eslint-disable-line no-prototype-builtins\n val = options[key];\n if (field.resolvedType instanceof Enum && typeof val === \"number\" && field.resolvedType.valuesById[val] !== undefined)\n val = field.resolvedType.valuesById[val];\n out.push(underScore(key), val);\n }\n return out.length ? $protobuf.util.toObject(out) : undefined;\n}\n\n// Converts an options object to descriptor options\nfunction toDescriptorOptions(options, type) {\n if (!options)\n return undefined;\n var out = [];\n for (var i = 0, ks = Object.keys(options), key, val; i < ks.length; ++i) {\n val = options[key = ks[i]];\n if (key === \"default\")\n continue;\n var field = type.fields[key];\n if (!field && !(field = type.fields[key = $protobuf.util.camelCase(key)]))\n continue;\n out.push(key, val);\n }\n return out.length ? type.fromObject($protobuf.util.toObject(out)) : undefined;\n}\n\n// Calculates the shortest relative path from `from` to `to`.\nfunction shortname(from, to) {\n var fromPath = from.fullName.split(\".\"),\n toPath = to.fullName.split(\".\"),\n i = 0,\n j = 0,\n k = toPath.length - 1;\n if (!(from instanceof Root) && to instanceof Namespace)\n while (i < fromPath.length && j < k && fromPath[i] === toPath[j]) {\n var other = to.lookup(fromPath[i++], true);\n if (other !== null && other !== to)\n break;\n ++j;\n }\n else\n for (; i < fromPath.length && j < k && fromPath[i] === toPath[j]; ++i, ++j);\n return toPath.slice(j).join(\".\");\n}\n\n// copied here from cli/targets/proto.js\nfunction underScore(str) {\n return str.substring(0,1)\n + str.substring(1)\n .replace(/([A-Z])(?=[a-z]|$)/g, function($0, $1) { return \"_\" + $1.toLowerCase(); });\n}\n\n// --- exports ---\n\n/**\n * Reflected file descriptor set.\n * @name FileDescriptorSet\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected file descriptor proto.\n * @name FileDescriptorProto\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected descriptor proto.\n * @name DescriptorProto\n * @type {Type}\n * @property {Type} ExtensionRange\n * @property {Type} ReservedRange\n * @const\n * @tstype $protobuf.Type & {\n * ExtensionRange: $protobuf.Type,\n * ReservedRange: $protobuf.Type\n * }\n */\n\n/**\n * Reflected field descriptor proto.\n * @name FieldDescriptorProto\n * @type {Type}\n * @property {Enum} Label\n * @property {Enum} Type\n * @const\n * @tstype $protobuf.Type & {\n * Label: $protobuf.Enum,\n * Type: $protobuf.Enum\n * }\n */\n\n/**\n * Reflected oneof descriptor proto.\n * @name OneofDescriptorProto\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected enum descriptor proto.\n * @name EnumDescriptorProto\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected service descriptor proto.\n * @name ServiceDescriptorProto\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected enum value descriptor proto.\n * @name EnumValueDescriptorProto\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected method descriptor proto.\n * @name MethodDescriptorProto\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected file options.\n * @name FileOptions\n * @type {Type}\n * @property {Enum} OptimizeMode\n * @const\n * @tstype $protobuf.Type & {\n * OptimizeMode: $protobuf.Enum\n * }\n */\n\n/**\n * Reflected message options.\n * @name MessageOptions\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected field options.\n * @name FieldOptions\n * @type {Type}\n * @property {Enum} CType\n * @property {Enum} JSType\n * @const\n * @tstype $protobuf.Type & {\n * CType: $protobuf.Enum,\n * JSType: $protobuf.Enum\n * }\n */\n\n/**\n * Reflected oneof options.\n * @name OneofOptions\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected enum options.\n * @name EnumOptions\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected enum value options.\n * @name EnumValueOptions\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected service options.\n * @name ServiceOptions\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected method options.\n * @name MethodOptions\n * @type {Type}\n * @const\n * @tstype $protobuf.Type\n */\n\n/**\n * Reflected uninterpretet option.\n * @name UninterpretedOption\n * @type {Type}\n * @property {Type} NamePart\n * @const\n * @tstype $protobuf.Type & {\n * NamePart: $protobuf.Type\n * }\n */\n\n/**\n * Reflected source code info.\n * @name SourceCodeInfo\n * @type {Type}\n * @property {Type} Location\n * @const\n * @tstype $protobuf.Type & {\n * Location: $protobuf.Type\n * }\n */\n\n/**\n * Reflected generated code info.\n * @name GeneratedCodeInfo\n * @type {Type}\n * @property {Type} Annotation\n * @const\n * @tstype $protobuf.Type & {\n * Annotation: $protobuf.Type\n * }\n */\n","// full library entry point.\n\n\"use strict\";\nmodule.exports = require(\"./src/index\");\n","\"use strict\";\nmodule.exports = common;\n\nvar commonRe = /\\/|\\./;\n\n/**\n * Provides common type definitions.\n * Can also be used to provide additional google types or your own custom types.\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\n * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\n * @returns {undefined}\n * @property {INamespace} google/protobuf/any.proto Any\n * @property {INamespace} google/protobuf/duration.proto Duration\n * @property {INamespace} google/protobuf/empty.proto Empty\n * @property {INamespace} google/protobuf/field_mask.proto FieldMask\n * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\n * @property {INamespace} google/protobuf/timestamp.proto Timestamp\n * @property {INamespace} google/protobuf/wrappers.proto Wrappers\n * @example\n * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension)\n * protobuf.common(\"descriptor\", descriptorJson);\n *\n * // manually provides a custom definition (uses my.foo namespace)\n * protobuf.common(\"my/foo/bar.proto\", myFooBarJson);\n */\nfunction common(name, json) {\n if (!commonRe.test(name)) {\n name = \"google/protobuf/\" + name + \".proto\";\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\n }\n common[name] = json;\n}\n\n// Not provided because of limited use (feel free to discuss or to provide yourself):\n//\n// google/protobuf/descriptor.proto\n// google/protobuf/source_context.proto\n// google/protobuf/type.proto\n//\n// Stripped and pre-parsed versions of these non-bundled files are instead available as part of\n// the repository or package within the google/protobuf directory.\n\ncommon(\"any\", {\n\n /**\n * Properties of a google.protobuf.Any message.\n * @interface IAny\n * @type {Object}\n * @property {string} [typeUrl]\n * @property {Uint8Array} [bytes]\n * @memberof common\n */\n Any: {\n fields: {\n type_url: {\n type: \"string\",\n id: 1\n },\n value: {\n type: \"bytes\",\n id: 2\n }\n }\n }\n});\n\nvar timeType;\n\ncommon(\"duration\", {\n\n /**\n * Properties of a google.protobuf.Duration message.\n * @interface IDuration\n * @type {Object}\n * @property {number|Long} [seconds]\n * @property {number} [nanos]\n * @memberof common\n */\n Duration: timeType = {\n fields: {\n seconds: {\n type: \"int64\",\n id: 1\n },\n nanos: {\n type: \"int32\",\n id: 2\n }\n }\n }\n});\n\ncommon(\"timestamp\", {\n\n /**\n * Properties of a google.protobuf.Timestamp message.\n * @interface ITimestamp\n * @type {Object}\n * @property {number|Long} [seconds]\n * @property {number} [nanos]\n * @memberof common\n */\n Timestamp: timeType\n});\n\ncommon(\"empty\", {\n\n /**\n * Properties of a google.protobuf.Empty message.\n * @interface IEmpty\n * @memberof common\n */\n Empty: {\n fields: {}\n }\n});\n\ncommon(\"struct\", {\n\n /**\n * Properties of a google.protobuf.Struct message.\n * @interface IStruct\n * @type {Object}\n * @property {Object.} [fields]\n * @memberof common\n */\n Struct: {\n fields: {\n fields: {\n keyType: \"string\",\n type: \"Value\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Value message.\n * @interface IValue\n * @type {Object}\n * @property {string} [kind]\n * @property {0} [nullValue]\n * @property {number} [numberValue]\n * @property {string} [stringValue]\n * @property {boolean} [boolValue]\n * @property {IStruct} [structValue]\n * @property {IListValue} [listValue]\n * @memberof common\n */\n Value: {\n oneofs: {\n kind: {\n oneof: [\n \"nullValue\",\n \"numberValue\",\n \"stringValue\",\n \"boolValue\",\n \"structValue\",\n \"listValue\"\n ]\n }\n },\n fields: {\n nullValue: {\n type: \"NullValue\",\n id: 1\n },\n numberValue: {\n type: \"double\",\n id: 2\n },\n stringValue: {\n type: \"string\",\n id: 3\n },\n boolValue: {\n type: \"bool\",\n id: 4\n },\n structValue: {\n type: \"Struct\",\n id: 5\n },\n listValue: {\n type: \"ListValue\",\n id: 6\n }\n }\n },\n\n NullValue: {\n values: {\n NULL_VALUE: 0\n }\n },\n\n /**\n * Properties of a google.protobuf.ListValue message.\n * @interface IListValue\n * @type {Object}\n * @property {Array.} [values]\n * @memberof common\n */\n ListValue: {\n fields: {\n values: {\n rule: \"repeated\",\n type: \"Value\",\n id: 1\n }\n }\n }\n});\n\ncommon(\"wrappers\", {\n\n /**\n * Properties of a google.protobuf.DoubleValue message.\n * @interface IDoubleValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n DoubleValue: {\n fields: {\n value: {\n type: \"double\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.FloatValue message.\n * @interface IFloatValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n FloatValue: {\n fields: {\n value: {\n type: \"float\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Int64Value message.\n * @interface IInt64Value\n * @type {Object}\n * @property {number|Long} [value]\n * @memberof common\n */\n Int64Value: {\n fields: {\n value: {\n type: \"int64\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.UInt64Value message.\n * @interface IUInt64Value\n * @type {Object}\n * @property {number|Long} [value]\n * @memberof common\n */\n UInt64Value: {\n fields: {\n value: {\n type: \"uint64\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Int32Value message.\n * @interface IInt32Value\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n Int32Value: {\n fields: {\n value: {\n type: \"int32\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.UInt32Value message.\n * @interface IUInt32Value\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n UInt32Value: {\n fields: {\n value: {\n type: \"uint32\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.BoolValue message.\n * @interface IBoolValue\n * @type {Object}\n * @property {boolean} [value]\n * @memberof common\n */\n BoolValue: {\n fields: {\n value: {\n type: \"bool\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.StringValue message.\n * @interface IStringValue\n * @type {Object}\n * @property {string} [value]\n * @memberof common\n */\n StringValue: {\n fields: {\n value: {\n type: \"string\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.BytesValue message.\n * @interface IBytesValue\n * @type {Object}\n * @property {Uint8Array} [value]\n * @memberof common\n */\n BytesValue: {\n fields: {\n value: {\n type: \"bytes\",\n id: 1\n }\n }\n }\n});\n\ncommon(\"field_mask\", {\n\n /**\n * Properties of a google.protobuf.FieldMask message.\n * @interface IDoubleValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n FieldMask: {\n fields: {\n paths: {\n rule: \"repeated\",\n type: \"string\",\n id: 1\n }\n }\n }\n});\n\n/**\n * Gets the root definition of the specified common proto file.\n *\n * Bundled definitions are:\n * - google/protobuf/any.proto\n * - google/protobuf/duration.proto\n * - google/protobuf/empty.proto\n * - google/protobuf/field_mask.proto\n * - google/protobuf/struct.proto\n * - google/protobuf/timestamp.proto\n * - google/protobuf/wrappers.proto\n *\n * @param {string} file Proto file name\n * @returns {INamespace|null} Root definition or `null` if not defined\n */\ncommon.get = function get(file) {\n return common[file] || null;\n};\n","\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(\"./enum\"),\n util = require(\"./util\");\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop) {\n var defaultAlreadyEmitted = false;\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(d%s){\", prop);\n for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n // enum unknown values passthrough\n if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen\n (\"default:\")\n (\"if(typeof(d%s)===\\\"number\\\"){m%s=d%s;break}\", prop, prop, prop);\n if (!field.repeated) gen // fallback to default value only for\n // arrays, to avoid leaving holes.\n (\"break\"); // for non-repeated fields, just ignore\n defaultAlreadyEmitted = true;\n }\n gen\n (\"case%j:\", keys[i])\n (\"case %i:\", values[keys[i]])\n (\"m%s=%j\", prop, values[keys[i]])\n (\"break\");\n } gen\n (\"}\");\n } else gen\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s=types[%i].fromObject(d%s)\", prop, fieldIndex, prop);\n } else {\n var isUnsigned = false;\n switch (field.type) {\n case \"double\":\n case \"float\": gen\n (\"m%s=Number(d%s)\", prop, prop); // also catches \"NaN\", \"Infinity\"\n break;\n case \"uint32\":\n case \"fixed32\": gen\n (\"m%s=d%s>>>0\", prop, prop);\n break;\n case \"int32\":\n case \"sint32\":\n case \"sfixed32\": gen\n (\"m%s=d%s|0\", prop, prop);\n break;\n case \"uint64\":\n isUnsigned = true;\n // eslint-disable-next-line no-fallthrough\n case \"int64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(util.Long)\")\n (\"(m%s=util.Long.fromValue(d%s)).unsigned=%j\", prop, prop, isUnsigned)\n (\"else if(typeof d%s===\\\"string\\\")\", prop)\n (\"m%s=parseInt(d%s,10)\", prop, prop)\n (\"else if(typeof d%s===\\\"number\\\")\", prop)\n (\"m%s=d%s\", prop, prop)\n (\"else if(typeof d%s===\\\"object\\\")\", prop)\n (\"m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)\", prop, prop, prop, isUnsigned ? \"true\" : \"\");\n break;\n case \"bytes\": gen\n (\"if(typeof d%s===\\\"string\\\")\", prop)\n (\"util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)\", prop, prop, prop)\n (\"else if(d%s.length >= 0)\", prop)\n (\"m%s=d%s\", prop, prop);\n break;\n case \"string\": gen\n (\"m%s=String(d%s)\", prop, prop);\n break;\n case \"bool\": gen\n (\"m%s=Boolean(d%s)\", prop, prop);\n break;\n /* default: gen\n (\"m%s=d%s\", prop, prop);\n break; */\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray;\n var gen = util.codegen([\"d\"], mtype.name + \"$fromObject\")\n (\"if(d instanceof this.ctor)\")\n (\"return d\");\n if (!fields.length) return gen\n (\"return new this.ctor\");\n gen\n (\"var m=new this.ctor\");\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n prop = util.safeProp(field.name);\n\n // Map fields\n if (field.map) { gen\n (\"if(d%s){\", prop)\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s={}\", prop)\n (\"for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n break;\n case \"bytes\": gen\n (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n break;\n default: gen\n (\"d%s=m%s\", prop, prop);\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);\n if (!fields.length)\n return util.codegen()(\"return {}\");\n var gen = util.codegen([\"m\", \"o\"], mtype.name + \"$toObject\")\n (\"if(!o)\")\n (\"o={}\")\n (\"var d={}\");\n\n var repeatedFields = [],\n mapFields = [],\n normalFields = [],\n i = 0;\n for (; i < fields.length; ++i)\n if (!fields[i].partOf)\n ( fields[i].resolve().repeated ? repeatedFields\n : fields[i].map ? mapFields\n : normalFields).push(fields[i]);\n\n if (repeatedFields.length) { gen\n (\"if(o.arrays||o.defaults){\");\n for (i = 0; i < repeatedFields.length; ++i) gen\n (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n gen\n (\"}\");\n }\n\n if (mapFields.length) { gen\n (\"if(o.objects||o.defaults){\");\n for (i = 0; i < mapFields.length; ++i) gen\n (\"d%s={}\", util.safeProp(mapFields[i].name));\n gen\n (\"}\");\n }\n\n if (normalFields.length) { gen\n (\"if(o.defaults){\");\n for (i = 0; i < normalFields.length; ++i) {\n var field = normalFields[i],\n prop = util.safeProp(field.name);\n if (field.resolvedType instanceof Enum) gen\n (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n else if (field.long) gen\n (\"if(util.Long){\")\n (\"var n=new util.Long(%i,%i,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n\", prop)\n (\"}else\")\n (\"d%s=o.longs===String?%j:%i\", prop, field.typeDefault.toString(), field.typeDefault.toNumber());\n else if (field.bytes) {\n var arrayDefault = \"[\" + Array.prototype.slice.call(field.typeDefault).join(\",\") + \"]\";\n gen\n (\"if(o.bytes===String)d%s=%j\", prop, String.fromCharCode.apply(String, field.typeDefault))\n (\"else{\")\n (\"d%s=%s\", prop, arrayDefault)\n (\"if(o.bytes!==Array)d%s=util.newBuffer(d%s)\", prop, prop)\n (\"}\");\n } else gen\n (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n } gen\n (\"}\");\n }\n var hasKs2 = false;\n for (i = 0; i < fields.length; ++i) {\n var field = fields[i],\n index = mtype._fieldsArray.indexOf(field),\n prop = util.safeProp(field.name);\n if (field.map) {\n if (!hasKs2) { hasKs2 = true; gen\n (\"var ks2\");\n } gen\n (\"if(m%s&&(ks2=Object.keys(m%s)).length){\", prop, prop)\n (\"d%s={}\", prop)\n (\"for(var j=0;j>>3){\");\n\n var i = 0;\n for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n ref = \"m\" + util.safeProp(field.name); gen\n (\"case %i: {\", field.id);\n\n // Map fields\n if (field.map) { gen\n (\"if(%s===util.emptyObject)\", ref)\n (\"%s={}\", ref)\n (\"var c2 = r.uint32()+r.pos\");\n\n if (types.defaults[field.keyType] !== undefined) gen\n (\"k=%j\", types.defaults[field.keyType]);\n else gen\n (\"k=null\");\n\n if (types.defaults[type] !== undefined) gen\n (\"value=%j\", types.defaults[type]);\n else gen\n (\"value=null\");\n\n gen\n (\"while(r.pos>>3){\")\n (\"case 1: k=r.%s(); break\", field.keyType)\n (\"case 2:\");\n\n if (types.basic[type] === undefined) gen\n (\"value=types[%i].decode(r,r.uint32())\", i); // can't be groups\n else gen\n (\"value=r.%s()\", type);\n\n gen\n (\"break\")\n (\"default:\")\n (\"r.skipType(tag2&7)\")\n (\"break\")\n (\"}\")\n (\"}\");\n\n if (types.long[field.keyType] !== undefined) gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=value\", ref);\n else gen\n (\"%s[k]=value\", ref);\n\n // Repeated fields\n } else if (field.repeated) { gen\n\n (\"if(!(%s&&%s.length))\", ref, ref)\n (\"%s=[]\", ref);\n\n // Packable (always check for forward and backward compatiblity)\n if (types.packed[type] !== undefined) gen\n (\"if((t&7)===2){\")\n (\"var c2=r.uint32()+r.pos\")\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\n : gen(\"types[%i].encode(%s,w.uint32(%i).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction encoder(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var gen = util.codegen([\"m\", \"w\"], mtype.name + \"$encode\")\n (\"if(!w)\")\n (\"w=Writer.create()\");\n\n var i, ref;\n\n // \"when a message is serialized its known fields should be written sequentially by field number\"\n var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);\n\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n index = mtype._fieldsArray.indexOf(field),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n wireType = types.basic[type];\n ref = \"m\" + util.safeProp(field.name);\n\n // Map fields\n if (field.map) {\n gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){\", ref, field.name) // !== undefined && !== null\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n if (wireType === undefined) gen\n (\"types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()\", index, ref); // can't be groups\n else gen\n (\".uint32(%i).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n gen\n (\"}\")\n (\"}\");\n\n // Repeated fields\n } else if (field.repeated) { gen\n (\"if(%s!=null&&%s.length){\", ref, ref); // !== undefined && !== null\n\n // Packed repeated\n if (field.packed && types.packed[type] !== undefined) { gen\n\n (\"w.uint32(%i).fork()\", (field.id << 3 | 2) >>> 0)\n (\"for(var i=0;i<%s.length;++i)\", ref)\n (\"w.%s(%s[i])\", type, ref)\n (\"w.ldelim()\");\n\n // Non-packed\n } else { gen\n\n (\"for(var i=0;i<%s.length;++i)\", ref);\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref + \"[i]\");\n else gen\n (\"w.uint32(%i).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n } gen\n (\"}\");\n\n // Non-repeated\n } else {\n if (field.optional) gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j))\", ref, field.name); // !== undefined && !== null\n\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref);\n else gen\n (\"w.uint32(%i).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n }\n }\n\n return gen\n (\"return w\");\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n","\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(\"./object\");\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar Namespace = require(\"./namespace\"),\n util = require(\"./util\");\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.} [values] Enum values as an object, by name\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this enum\n * @param {Object.} [comments] The value comments for this enum\n * @param {Object.>|undefined} [valuesOptions] The value options for this enum\n */\nfunction Enum(name, values, options, comment, comments, valuesOptions) {\n ReflectionObject.call(this, name, options);\n\n if (values && typeof values !== \"object\")\n throw TypeError(\"values must be an object\");\n\n /**\n * Enum values by id.\n * @type {Object.}\n */\n this.valuesById = {};\n\n /**\n * Enum values by name.\n * @type {Object.}\n */\n this.values = Object.create(this.valuesById); // toJSON, marker\n\n /**\n * Enum comment text.\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Value comment texts, if any.\n * @type {Object.}\n */\n this.comments = comments || {};\n\n /**\n * Values options, if any\n * @type {Object>|undefined}\n */\n this.valuesOptions = valuesOptions;\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n // compatible enum. This is used by pbts to write actual enum definitions that work for\n // static and reflection code alike instead of emitting generic object definitions.\n\n if (values)\n for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n if (typeof values[keys[i]] === \"number\") // use forward entries only\n this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * Enum descriptor.\n * @interface IEnum\n * @property {Object.} values Enum values\n * @property {Object.} [options] Enum options\n */\n\n/**\n * Constructs an enum from an enum descriptor.\n * @param {string} name Enum name\n * @param {IEnum} json Enum descriptor\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n var enm = new Enum(name, json.values, json.options, json.comment, json.comments);\n enm.reserved = json.reserved;\n return enm;\n};\n\n/**\n * Converts this enum to an enum descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IEnum} Enum descriptor\n */\nEnum.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"valuesOptions\" , this.valuesOptions,\n \"values\" , this.values,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"comment\" , keepComments ? this.comment : undefined,\n \"comments\" , keepComments ? this.comments : undefined\n ]);\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {string} [comment] Comment, if any\n * @param {Object.|undefined} [options] Options, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function add(name, id, comment, options) {\n // utilized by the parser but not by .fromJSON\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (!util.isInteger(id))\n throw TypeError(\"id must be an integer\");\n\n if (this.values[name] !== undefined)\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\n\n if (this.isReservedId(id))\n throw Error(\"id \" + id + \" is reserved in \" + this);\n\n if (this.isReservedName(name))\n throw Error(\"name '\" + name + \"' is reserved in \" + this);\n\n if (this.valuesById[id] !== undefined) {\n if (!(this.options && this.options.allow_alias))\n throw Error(\"duplicate id \" + id + \" in \" + this);\n this.values[name] = id;\n } else\n this.valuesById[this.values[name] = id] = name;\n\n if (options) {\n if (this.valuesOptions === undefined)\n this.valuesOptions = {};\n this.valuesOptions[name] = options || null;\n }\n\n this.comments[name] = comment || null;\n return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function remove(name) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n var val = this.values[name];\n if (val == null)\n throw Error(\"name '\" + name + \"' does not exist in \" + this);\n\n delete this.valuesById[val];\n delete this.values[name];\n delete this.comments[name];\n if (this.valuesOptions)\n delete this.valuesOptions[name];\n\n return this;\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n","\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(\"./object\");\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum = require(\"./enum\"),\n types = require(\"./types\"),\n util = require(\"./util\");\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @name Field\n * @classdesc Reflected message field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a field from a field descriptor.\n * @param {string} name Field name\n * @param {IField} json Field descriptor\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);\n};\n\n/**\n * Not an actual constructor. Use {@link Field} instead.\n * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports FieldBase\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction Field(name, id, type, rule, extend, options, comment) {\n\n if (util.isObject(rule)) {\n comment = extend;\n options = rule;\n rule = extend = undefined;\n } else if (util.isObject(extend)) {\n comment = options;\n options = extend;\n extend = undefined;\n }\n\n ReflectionObject.call(this, name, options);\n\n if (!util.isInteger(id) || id < 0)\n throw TypeError(\"id must be a non-negative integer\");\n\n if (!util.isString(type))\n throw TypeError(\"type must be a string\");\n\n if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n throw TypeError(\"rule must be a string rule\");\n\n if (extend !== undefined && !util.isString(extend))\n throw TypeError(\"extend must be a string\");\n\n /**\n * Field rule, if any.\n * @type {string|undefined}\n */\n if (rule === \"proto3_optional\") {\n rule = \"optional\";\n }\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n /**\n * Field type.\n * @type {string}\n */\n this.type = type; // toJSON\n\n /**\n * Unique field id.\n * @type {number}\n */\n this.id = id; // toJSON, marker\n\n /**\n * Extended type if different from parent.\n * @type {string|undefined}\n */\n this.extend = extend || undefined; // toJSON\n\n /**\n * Whether this field is required.\n * @type {boolean}\n */\n this.required = rule === \"required\";\n\n /**\n * Whether this field is optional.\n * @type {boolean}\n */\n this.optional = !this.required;\n\n /**\n * Whether this field is repeated.\n * @type {boolean}\n */\n this.repeated = rule === \"repeated\";\n\n /**\n * Whether this field is a map or not.\n * @type {boolean}\n */\n this.map = false;\n\n /**\n * Message this field belongs to.\n * @type {Type|null}\n */\n this.message = null;\n\n /**\n * OneOf this field belongs to, if any,\n * @type {OneOf|null}\n */\n this.partOf = null;\n\n /**\n * The field type's default value.\n * @type {*}\n */\n this.typeDefault = null;\n\n /**\n * The field's default value on prototypes.\n * @type {*}\n */\n this.defaultValue = null;\n\n /**\n * Whether this field's value should be treated as a long.\n * @type {boolean}\n */\n this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n /**\n * Whether this field's value is a buffer.\n * @type {boolean}\n */\n this.bytes = type === \"bytes\";\n\n /**\n * Resolved type if not a basic type.\n * @type {Type|Enum|null}\n */\n this.resolvedType = null;\n\n /**\n * Sister-field within the extended type if a declaring extension field.\n * @type {Field|null}\n */\n this.extensionField = null;\n\n /**\n * Sister-field within the declaring namespace if an extended field.\n * @type {Field|null}\n */\n this.declaringField = null;\n\n /**\n * Internally remembers whether this field is packed.\n * @type {boolean|null}\n * @private\n */\n this._packed = null;\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n get: function() {\n // defaults to packed=true if not explicity set to false\n if (this._packed === null)\n this._packed = this.getOption(\"packed\") !== false;\n return this._packed;\n }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (name === \"packed\") // clear cached before setting\n this._packed = null;\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Field descriptor.\n * @interface IField\n * @property {string} [rule=\"optional\"] Field rule\n * @property {string} type Field type\n * @property {number} id Field id\n * @property {Object.} [options] Field options\n */\n\n/**\n * Extension field descriptor.\n * @interface IExtensionField\n * @extends IField\n * @property {string} extend Extended type\n */\n\n/**\n * Converts this field to a field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IField} Field descriptor\n */\nField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"rule\" , this.rule !== \"optional\" && this.rule || undefined,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n if (this.resolved)\n return this;\n\n if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);\n if (this.resolvedType instanceof Type)\n this.typeDefault = null;\n else // instanceof Enum\n this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n } else if (this.options && this.options.proto3_optional) {\n // proto3 scalar value marked optional; should default to null\n this.typeDefault = null;\n }\n\n // use explicitly set default value if present\n if (this.options && this.options[\"default\"] != null) {\n this.typeDefault = this.options[\"default\"];\n if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n this.typeDefault = this.resolvedType.values[this.typeDefault];\n }\n\n // remove unnecessary options\n if (this.options) {\n if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n delete this.options.packed;\n if (!Object.keys(this.options).length)\n this.options = undefined;\n }\n\n // convert to internal data type if necesssary\n if (this.long) {\n this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === \"u\");\n\n /* istanbul ignore else */\n if (Object.freeze)\n Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n } else if (this.bytes && typeof this.typeDefault === \"string\") {\n var buf;\n if (util.base64.test(this.typeDefault))\n util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n else\n util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n this.typeDefault = buf;\n }\n\n // take special care of maps and repeated fields\n if (this.map)\n this.defaultValue = util.emptyObject;\n else if (this.repeated)\n this.defaultValue = util.emptyArray;\n else\n this.defaultValue = this.typeDefault;\n\n // ensure proper value on prototype\n if (this.parent instanceof Type)\n this.parent.ctor.prototype[this.name] = this.defaultValue;\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n\n/**\n * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).\n * @typedef FieldDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} fieldName Field name\n * @returns {undefined}\n */\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"string\"|\"bool\"|\"bytes\"|Object} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @param {T} [defaultValue] Default value\n * @returns {FieldDecorator} Decorator function\n * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]\n */\nField.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {\n\n // submessage: decorate the submessage and use its name as the type\n if (typeof fieldType === \"function\")\n fieldType = util.decorateType(fieldType).name;\n\n // enum reference: create a reflected copy of the enum and keep reuseing it\n else if (fieldType && typeof fieldType === \"object\")\n fieldType = util.decorateEnum(fieldType).name;\n\n return function fieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new Field(fieldName, fieldId, fieldType, fieldRule, { \"default\": defaultValue }));\n };\n};\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {Constructor|string} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @returns {FieldDecorator} Decorator function\n * @template T extends Message\n * @variation 2\n */\n// like Field.d but without a default value\n\n// Sets up cyclic dependencies (called in index-light)\nField._configure = function configure(Type_) {\n Type = Type_;\n};\n","\"use strict\";\nvar protobuf = module.exports = require(\"./index-minimal\");\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n if (typeof root === \"function\") {\n callback = root;\n root = new protobuf.Root();\n } else if (!root)\n root = new protobuf.Root();\n return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n if (!root)\n root = new protobuf.Root();\n return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder = require(\"./encoder\");\nprotobuf.decoder = require(\"./decoder\");\nprotobuf.verifier = require(\"./verifier\");\nprotobuf.converter = require(\"./converter\");\n\n// Reflection\nprotobuf.ReflectionObject = require(\"./object\");\nprotobuf.Namespace = require(\"./namespace\");\nprotobuf.Root = require(\"./root\");\nprotobuf.Enum = require(\"./enum\");\nprotobuf.Type = require(\"./type\");\nprotobuf.Field = require(\"./field\");\nprotobuf.OneOf = require(\"./oneof\");\nprotobuf.MapField = require(\"./mapfield\");\nprotobuf.Service = require(\"./service\");\nprotobuf.Method = require(\"./method\");\n\n// Runtime\nprotobuf.Message = require(\"./message\");\nprotobuf.wrappers = require(\"./wrappers\");\n\n// Utility\nprotobuf.types = require(\"./types\");\nprotobuf.util = require(\"./util\");\n\n// Set up possibly cyclic reflection dependencies\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);\nprotobuf.Root._configure(protobuf.Type);\nprotobuf.Field._configure(protobuf.Type);\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(\"./writer\");\nprotobuf.BufferWriter = require(\"./writer_buffer\");\nprotobuf.Reader = require(\"./reader\");\nprotobuf.BufferReader = require(\"./reader_buffer\");\n\n// Utility\nprotobuf.util = require(\"./util/minimal\");\nprotobuf.rpc = require(\"./rpc\");\nprotobuf.roots = require(\"./roots\");\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nvar protobuf = module.exports = require(\"./index-light\");\n\nprotobuf.build = \"full\";\n\n// Parser\nprotobuf.tokenize = require(\"./tokenize\");\nprotobuf.parse = require(\"./parse\");\nprotobuf.common = require(\"./common\");\n\n// Configure parser\nprotobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common);\n","\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(\"./field\");\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types = require(\"./types\"),\n util = require(\"./util\");\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction MapField(name, id, keyType, type, options, comment) {\n Field.call(this, name, id, type, undefined, undefined, options, comment);\n\n /* istanbul ignore if */\n if (!util.isString(keyType))\n throw TypeError(\"keyType must be a string\");\n\n /**\n * Key type.\n * @type {string}\n */\n this.keyType = keyType; // toJSON, marker\n\n /**\n * Resolved key type if not a basic type.\n * @type {ReflectionObject|null}\n */\n this.resolvedKeyType = null;\n\n // Overrides Field#map\n this.map = true;\n}\n\n/**\n * Map field descriptor.\n * @interface IMapField\n * @extends {IField}\n * @property {string} keyType Key type\n */\n\n/**\n * Extension map field descriptor.\n * @interface IExtensionMapField\n * @extends IMapField\n * @property {string} extend Extended type\n */\n\n/**\n * Constructs a map field from a map field descriptor.\n * @param {string} name Field name\n * @param {IMapField} json Map field descriptor\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);\n};\n\n/**\n * Converts this map field to a map field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMapField} Map field descriptor\n */\nMapField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"keyType\" , this.keyType,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n if (types.mapKey[this.keyType] === undefined)\n throw Error(\"invalid key type: \" + this.keyType);\n\n return Field.prototype.resolve.call(this);\n};\n\n/**\n * Map field decorator (TypeScript).\n * @name MapField.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"} fieldKeyType Field key type\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"|\"bytes\"|Object|Constructor<{}>} fieldValueType Field value type\n * @returns {FieldDecorator} Decorator function\n * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }\n */\nMapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {\n\n // submessage value: decorate the submessage and use its name as the type\n if (typeof fieldValueType === \"function\")\n fieldValueType = util.decorateType(fieldValueType).name;\n\n // enum reference value: create a reflected copy of the enum and keep reuseing it\n else if (fieldValueType && typeof fieldValueType === \"object\")\n fieldValueType = util.decorateEnum(fieldValueType).name;\n\n return function mapFieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));\n };\n};\n","\"use strict\";\nmodule.exports = Message;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new message instance.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Properties} [properties] Properties to set\n * @template T extends object = object\n */\nfunction Message(properties) {\n // not used internally\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n this[keys[i]] = properties[keys[i]];\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/*eslint-disable valid-jsdoc*/\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.create = function create(properties) {\n return this.$type.create(properties);\n};\n\n/**\n * Encodes a message of this type.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encode = function encode(message, writer) {\n return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decode = function decode(reader) {\n return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object\n * @returns {T} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.fromObject = function fromObject(object) {\n return this.$type.fromObject(object);\n};\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {T} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @template T extends Message\n * @this Constructor\n */\nMessage.toObject = function toObject(message, options) {\n return this.$type.toObject(message, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n return this.$type.toObject(this, util.toJSONOptions);\n};\n\n/*eslint-enable valid-jsdoc*/","\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(\"./object\");\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(\"./util\");\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this method\n * @param {Object.} [parsedOptions] Declared options, properly parsed into an object\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {\n\n /* istanbul ignore next */\n if (util.isObject(requestStream)) {\n options = requestStream;\n requestStream = responseStream = undefined;\n } else if (util.isObject(responseStream)) {\n options = responseStream;\n responseStream = undefined;\n }\n\n /* istanbul ignore if */\n if (!(type === undefined || util.isString(type)))\n throw TypeError(\"type must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(requestType))\n throw TypeError(\"requestType must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(responseType))\n throw TypeError(\"responseType must be a string\");\n\n ReflectionObject.call(this, name, options);\n\n /**\n * Method type.\n * @type {string}\n */\n this.type = type || \"rpc\"; // toJSON\n\n /**\n * Request type.\n * @type {string}\n */\n this.requestType = requestType; // toJSON, marker\n\n /**\n * Whether requests are streamed or not.\n * @type {boolean|undefined}\n */\n this.requestStream = requestStream ? true : undefined; // toJSON\n\n /**\n * Response type.\n * @type {string}\n */\n this.responseType = responseType; // toJSON\n\n /**\n * Whether responses are streamed or not.\n * @type {boolean|undefined}\n */\n this.responseStream = responseStream ? true : undefined; // toJSON\n\n /**\n * Resolved request type.\n * @type {Type|null}\n */\n this.resolvedRequestType = null;\n\n /**\n * Resolved response type.\n * @type {Type|null}\n */\n this.resolvedResponseType = null;\n\n /**\n * Comment for this method\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Options properly parsed into an object\n */\n this.parsedOptions = parsedOptions;\n}\n\n/**\n * Method descriptor.\n * @interface IMethod\n * @property {string} [type=\"rpc\"] Method type\n * @property {string} requestType Request type\n * @property {string} responseType Response type\n * @property {boolean} [requestStream=false] Whether requests are streamed\n * @property {boolean} [responseStream=false] Whether responses are streamed\n * @property {Object.} [options] Method options\n * @property {string} comment Method comments\n * @property {Object.} [parsedOptions] Method options properly parsed into an object\n */\n\n/**\n * Constructs a method from a method descriptor.\n * @param {string} name Method name\n * @param {IMethod} json Method descriptor\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions);\n};\n\n/**\n * Converts this method to a method descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMethod} Method descriptor\n */\nMethod.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"type\" , this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n \"requestType\" , this.requestType,\n \"requestStream\" , this.requestStream,\n \"responseType\" , this.responseType,\n \"responseStream\" , this.responseStream,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined,\n \"parsedOptions\" , this.parsedOptions,\n ]);\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n /* istanbul ignore if */\n if (this.resolved)\n return this;\n\n this.resolvedRequestType = this.parent.lookupType(this.requestType);\n this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n","\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(\"./object\");\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Field = require(\"./field\"),\n util = require(\"./util\"),\n OneOf = require(\"./oneof\");\n\nvar Type, // cyclic\n Service,\n Enum;\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.} json JSON object\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json) {\n return new Namespace(name, json.options).addJSON(json.nested);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array, toJSONOptions) {\n if (!(array && array.length))\n return undefined;\n var obj = {};\n for (var i = 0; i < array.length; ++i)\n obj[array[i].name] = array[i].toJSON(toJSONOptions);\n return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Tests if the specified id is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedId = function isReservedId(reserved, id) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (typeof reserved[i] !== \"string\" && reserved[i][0] <= id && reserved[i][1] > id)\n return true;\n return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedName = function isReservedName(reserved, name) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (reserved[i] === name)\n return true;\n return false;\n};\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n ReflectionObject.call(this, name, options);\n\n /**\n * Nested objects by name.\n * @type {Object.|undefined}\n */\n this.nested = undefined; // toJSON\n\n /**\n * Cached nested objects as an array.\n * @type {ReflectionObject[]|null}\n * @private\n */\n this._nestedArray = null;\n}\n\nfunction clearCache(namespace) {\n namespace._nestedArray = null;\n return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n get: function() {\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n }\n});\n\n/**\n * Namespace descriptor.\n * @interface INamespace\n * @property {Object.} [options] Namespace options\n * @property {Object.} [nested] Nested object descriptors\n */\n\n/**\n * Any extension field descriptor.\n * @typedef AnyExtensionField\n * @type {IExtensionField|IExtensionMapField}\n */\n\n/**\n * Any nested object descriptor.\n * @typedef AnyNestedObject\n * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}\n */\n\n/**\n * Converts this namespace to a namespace descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {INamespace} Namespace descriptor\n */\nNamespace.prototype.toJSON = function toJSON(toJSONOptions) {\n return util.toObject([\n \"options\" , this.options,\n \"nested\" , arrayToJSON(this.nestedArray, toJSONOptions)\n ]);\n};\n\n/**\n * Adds nested objects to this namespace from nested object descriptors.\n * @param {Object.} nestedJson Any nested object descriptors\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson) {\n var ns = this;\n /* istanbul ignore else */\n if (nestedJson) {\n for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n nested = nestedJson[names[i]];\n ns.add( // most to least likely\n ( nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : nested.id !== undefined\n ? Field.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n }\n return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n return this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n if (this.nested && this.nested[name] instanceof Enum)\n return this.nested[name].values;\n throw Error(\"no such enum: \" + name);\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n throw TypeError(\"object must be a valid nested object\");\n\n if (!this.nested)\n this.nested = {};\n else {\n var prev = this.get(object.name);\n if (prev) {\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n // replace plain namespace but keep existing nested elements and options\n var nested = prev.nestedArray;\n for (var i = 0; i < nested.length; ++i)\n object.add(nested[i]);\n this.remove(prev);\n if (!this.nested)\n this.nested = {};\n object.setOptions(prev.options, true);\n\n } else\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n }\n }\n this.nested[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n if (!(object instanceof ReflectionObject))\n throw TypeError(\"object must be a ReflectionObject\");\n if (object.parent !== this)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.nested[object.name];\n if (!Object.keys(this.nested).length)\n this.nested = undefined;\n\n object.onRemove(this);\n return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n if (util.isString(path))\n path = path.split(\".\");\n else if (!Array.isArray(path))\n throw TypeError(\"illegal path\");\n if (path && path.length && path[0] === \"\")\n throw Error(\"path must be relative\");\n\n var ptr = this;\n while (path.length > 0) {\n var part = path.shift();\n if (ptr.nested && ptr.nested[part]) {\n ptr = ptr.nested[part];\n if (!(ptr instanceof Namespace))\n throw Error(\"path conflicts with non-namespace objects\");\n } else\n ptr.add(ptr = new Namespace(part));\n }\n if (json)\n ptr.addJSON(json);\n return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n var nested = this.nestedArray, i = 0;\n while (i < nested.length)\n if (nested[i] instanceof Namespace)\n nested[i++].resolveAll();\n else\n nested[i++].resolve();\n return this.resolve();\n};\n\n/**\n * Recursively looks up the reflection object matching the specified path in the scope of this namespace.\n * @param {string|string[]} path Path to look up\n * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {\n\n /* istanbul ignore next */\n if (typeof filterTypes === \"boolean\") {\n parentAlreadyChecked = filterTypes;\n filterTypes = undefined;\n } else if (filterTypes && !Array.isArray(filterTypes))\n filterTypes = [ filterTypes ];\n\n if (util.isString(path) && path.length) {\n if (path === \".\")\n return this.root;\n path = path.split(\".\");\n } else if (!path.length)\n return this;\n\n // Start at root if path is absolute\n if (path[0] === \"\")\n return this.root.lookup(path.slice(1), filterTypes);\n\n // Test if the first part matches any nested object, and if so, traverse if path contains more\n var found = this.get(path[0]);\n if (found) {\n if (path.length === 1) {\n if (!filterTypes || filterTypes.indexOf(found.constructor) > -1)\n return found;\n } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true)))\n return found;\n\n // Otherwise try each nested namespace\n } else\n for (var i = 0; i < this.nestedArray.length; ++i)\n if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true)))\n return found;\n\n // If there hasn't been a match, try again at the parent\n if (this.parent === null || parentAlreadyChecked)\n return null;\n return this.parent.lookup(path, filterTypes);\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n var found = this.lookup(path, [ Type ]);\n if (!found)\n throw Error(\"no such type: \" + path);\n return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Enum} Looked up enum\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n var found = this.lookup(path, [ Enum ]);\n if (!found)\n throw Error(\"no such Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type or enum\n * @throws {Error} If `path` does not point to a type or enum\n */\nNamespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {\n var found = this.lookup(path, [ Type, Enum ]);\n if (!found)\n throw Error(\"no such Type or Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n var found = this.lookup(path, [ Service ]);\n if (!found)\n throw Error(\"no such Service '\" + path + \"' in \" + this);\n return found;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nNamespace._configure = function(Type_, Service_, Enum_) {\n Type = Type_;\n Service = Service_;\n Enum = Enum_;\n};\n","\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nvar util = require(\"./util\");\n\nvar Root; // cyclic\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (options && !util.isObject(options))\n throw TypeError(\"options must be an object\");\n\n /**\n * Options.\n * @type {Object.|undefined}\n */\n this.options = options; // toJSON\n\n /**\n * Parsed Options.\n * @type {Array.>|undefined}\n */\n this.parsedOptions = null;\n\n /**\n * Unique name within its namespace.\n * @type {string}\n */\n this.name = name;\n\n /**\n * Parent namespace.\n * @type {Namespace|null}\n */\n this.parent = null;\n\n /**\n * Whether already resolved or not.\n * @type {boolean}\n */\n this.resolved = false;\n\n /**\n * Comment text, if any.\n * @type {string|null}\n */\n this.comment = null;\n\n /**\n * Defining file name.\n * @type {string|null}\n */\n this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n /**\n * Reference to the root namespace.\n * @name ReflectionObject#root\n * @type {Root}\n * @readonly\n */\n root: {\n get: function() {\n var ptr = this;\n while (ptr.parent !== null)\n ptr = ptr.parent;\n return ptr;\n }\n },\n\n /**\n * Full name including leading dot.\n * @name ReflectionObject#fullName\n * @type {string}\n * @readonly\n */\n fullName: {\n get: function() {\n var path = [ this.name ],\n ptr = this.parent;\n while (ptr) {\n path.unshift(ptr.name);\n ptr = ptr.parent;\n }\n return path.join(\".\");\n }\n }\n});\n\n/**\n * Converts this reflection object to its descriptor representation.\n * @returns {Object.} Descriptor\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n if (this.parent && this.parent !== parent)\n this.parent.remove(this);\n this.parent = parent;\n this.resolved = false;\n var root = parent.root;\n if (root instanceof Root)\n root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n var root = parent.root;\n if (root instanceof Root)\n root._handleRemove(this);\n this.parent = null;\n this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n if (this.root instanceof Root)\n this.resolved = true; // only if part of a root\n return this;\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n if (this.options)\n return this.options[name];\n return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (!ifNotSet || !this.options || this.options[name] === undefined)\n (this.options || (this.options = {}))[name] = value;\n return this;\n};\n\n/**\n * Sets a parsed option.\n * @param {string} name parsed Option name\n * @param {*} value Option value\n * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\\empty, will add a new option with that value\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) {\n if (!this.parsedOptions) {\n this.parsedOptions = [];\n }\n var parsedOptions = this.parsedOptions;\n if (propName) {\n // If setting a sub property of an option then try to merge it\n // with an existing option\n var opt = parsedOptions.find(function (opt) {\n return Object.prototype.hasOwnProperty.call(opt, name);\n });\n if (opt) {\n // If we found an existing option - just merge the property value\n var newValue = opt[name];\n util.setProperty(newValue, propName, value);\n } else {\n // otherwise, create a new option, set it's property and add it to the list\n opt = {};\n opt[name] = util.setProperty({}, propName, value);\n parsedOptions.push(opt);\n }\n } else {\n // Always create a new option when setting the value of the option itself\n var newOpt = {};\n newOpt[name] = value;\n parsedOptions.push(newOpt);\n }\n return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n if (options)\n for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n this.setOption(keys[i], options[keys[i]], ifNotSet);\n return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n var className = this.constructor.className,\n fullName = this.fullName;\n if (fullName.length)\n return className + \" \" + fullName;\n return className;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nReflectionObject._configure = function(Root_) {\n Root = Root_;\n};\n","\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(\"./object\");\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(\"./field\"),\n util = require(\"./util\");\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object.} [fieldNames] Field names\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction OneOf(name, fieldNames, options, comment) {\n if (!Array.isArray(fieldNames)) {\n options = fieldNames;\n fieldNames = undefined;\n }\n ReflectionObject.call(this, name, options);\n\n /* istanbul ignore if */\n if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n throw TypeError(\"fieldNames must be an Array\");\n\n /**\n * Field names that belong to this oneof.\n * @type {string[]}\n */\n this.oneof = fieldNames || []; // toJSON, marker\n\n /**\n * Fields that belong to this oneof as an array for iteration.\n * @type {Field[]}\n * @readonly\n */\n this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Oneof descriptor.\n * @interface IOneOf\n * @property {Array.} oneof Oneof field names\n * @property {Object.} [options] Oneof options\n */\n\n/**\n * Constructs a oneof from a oneof descriptor.\n * @param {string} name Oneof name\n * @param {IOneOf} json Oneof descriptor\n * @returns {OneOf} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n return new OneOf(name, json.oneof, json.options, json.comment);\n};\n\n/**\n * Converts this oneof to a oneof descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IOneOf} Oneof descriptor\n */\nOneOf.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"oneof\" , this.oneof,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n if (oneof.parent)\n for (var i = 0; i < oneof.fieldsArray.length; ++i)\n if (!oneof.fieldsArray[i].parent)\n oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n if (field.parent && field.parent !== this.parent)\n field.parent.remove(field);\n this.oneof.push(field.name);\n this.fieldsArray.push(field);\n field.partOf = this; // field.parent remains null\n addFieldsToParent(this);\n return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n var index = this.fieldsArray.indexOf(field);\n\n /* istanbul ignore if */\n if (index < 0)\n throw Error(field + \" is not a member of \" + this);\n\n this.fieldsArray.splice(index, 1);\n index = this.oneof.indexOf(field.name);\n\n /* istanbul ignore else */\n if (index > -1) // theoretical\n this.oneof.splice(index, 1);\n\n field.partOf = null;\n return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n ReflectionObject.prototype.onAdd.call(this, parent);\n var self = this;\n // Collect present fields\n for (var i = 0; i < this.oneof.length; ++i) {\n var field = parent.get(this.oneof[i]);\n if (field && !field.partOf) {\n field.partOf = self;\n self.fieldsArray.push(field);\n }\n }\n // Add not yet present fields\n addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n for (var i = 0, field; i < this.fieldsArray.length; ++i)\n if ((field = this.fieldsArray[i]).parent)\n field.parent.remove(field);\n ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n/**\n * Decorator function as returned by {@link OneOf.d} (TypeScript).\n * @typedef OneOfDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} oneofName OneOf name\n * @returns {undefined}\n */\n\n/**\n * OneOf decorator (TypeScript).\n * @function\n * @param {...string} fieldNames Field names\n * @returns {OneOfDecorator} Decorator function\n * @template T extends string\n */\nOneOf.d = function decorateOneOf() {\n var fieldNames = new Array(arguments.length),\n index = 0;\n while (index < arguments.length)\n fieldNames[index] = arguments[index++];\n return function oneOfDecorator(prototype, oneofName) {\n util.decorateType(prototype.constructor)\n .add(new OneOf(oneofName, fieldNames));\n Object.defineProperty(prototype, oneofName, {\n get: util.oneOfGetter(fieldNames),\n set: util.oneOfSetter(fieldNames)\n });\n };\n};\n","\"use strict\";\nmodule.exports = parse;\n\nparse.filename = null;\nparse.defaults = { keepCase: false };\n\nvar tokenize = require(\"./tokenize\"),\n Root = require(\"./root\"),\n Type = require(\"./type\"),\n Field = require(\"./field\"),\n MapField = require(\"./mapfield\"),\n OneOf = require(\"./oneof\"),\n Enum = require(\"./enum\"),\n Service = require(\"./service\"),\n Method = require(\"./method\"),\n types = require(\"./types\"),\n util = require(\"./util\");\n\nvar base10Re = /^[1-9][0-9]*$/,\n base10NegRe = /^-?[1-9][0-9]*$/,\n base16Re = /^0[x][0-9a-fA-F]+$/,\n base16NegRe = /^-?0[x][0-9a-fA-F]+$/,\n base8Re = /^0[0-7]+$/,\n base8NegRe = /^-?0[0-7]+$/,\n numberRe = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,\n nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/,\n typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,\n fqTypeRefRe = /^(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;\n\n/**\n * Result object returned from {@link parse}.\n * @interface IParserResult\n * @property {string|undefined} package Package name, if declared\n * @property {string[]|undefined} imports Imports, if any\n * @property {string[]|undefined} weakImports Weak imports, if any\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\n * @property {Root} root Populated root instance\n */\n\n/**\n * Options modifying the behavior of {@link parse}.\n * @interface IParseOptions\n * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case\n * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments.\n * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist.\n */\n\n/**\n * Options modifying the behavior of JSON serialization.\n * @interface IToJSONOptions\n * @property {boolean} [keepComments=false] Serializes comments.\n */\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @param {string} source Source contents\n * @param {Root} root Root to populate\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {IParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {IParseOptions} defaults Default {@link IParseOptions}\n */\nfunction parse(source, root, options) {\n /* eslint-disable callback-return */\n if (!(root instanceof Root)) {\n options = root;\n root = new Root();\n }\n if (!options)\n options = parse.defaults;\n\n var preferTrailingComment = options.preferTrailingComment || false;\n var tn = tokenize(source, options.alternateCommentMode || false),\n next = tn.next,\n push = tn.push,\n peek = tn.peek,\n skip = tn.skip,\n cmnt = tn.cmnt;\n\n var head = true,\n pkg,\n imports,\n weakImports,\n syntax,\n isProto3 = false;\n\n var ptr = root;\n\n var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase;\n\n /* istanbul ignore next */\n function illegal(token, name, insideTryCatch) {\n var filename = parse.filename;\n if (!insideTryCatch)\n parse.filename = null;\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (\" + (filename ? filename + \", \" : \"\") + \"line \" + tn.line + \")\");\n }\n\n function readString() {\n var values = [],\n token;\n do {\n /* istanbul ignore if */\n if ((token = next()) !== \"\\\"\" && token !== \"'\")\n throw illegal(token);\n\n values.push(next());\n skip(token);\n token = peek();\n } while (token === \"\\\"\" || token === \"'\");\n return values.join(\"\");\n }\n\n function readValue(acceptTypeRef) {\n var token = next();\n switch (token) {\n case \"'\":\n case \"\\\"\":\n push(token);\n return readString();\n case \"true\": case \"TRUE\":\n return true;\n case \"false\": case \"FALSE\":\n return false;\n }\n try {\n return parseNumber(token, /* insideTryCatch */ true);\n } catch (e) {\n\n /* istanbul ignore else */\n if (acceptTypeRef && typeRefRe.test(token))\n return token;\n\n /* istanbul ignore next */\n throw illegal(token, \"value\");\n }\n }\n\n function readRanges(target, acceptStrings) {\n var token, start;\n do {\n if (acceptStrings && ((token = peek()) === \"\\\"\" || token === \"'\"))\n target.push(readString());\n else\n target.push([ start = parseId(next()), skip(\"to\", true) ? parseId(next()) : start ]);\n } while (skip(\",\", true));\n skip(\";\");\n }\n\n function parseNumber(token, insideTryCatch) {\n var sign = 1;\n if (token.charAt(0) === \"-\") {\n sign = -1;\n token = token.substring(1);\n }\n switch (token) {\n case \"inf\": case \"INF\": case \"Inf\":\n return sign * Infinity;\n case \"nan\": case \"NAN\": case \"Nan\": case \"NaN\":\n return NaN;\n case \"0\":\n return 0;\n }\n if (base10Re.test(token))\n return sign * parseInt(token, 10);\n if (base16Re.test(token))\n return sign * parseInt(token, 16);\n if (base8Re.test(token))\n return sign * parseInt(token, 8);\n\n /* istanbul ignore else */\n if (numberRe.test(token))\n return sign * parseFloat(token);\n\n /* istanbul ignore next */\n throw illegal(token, \"number\", insideTryCatch);\n }\n\n function parseId(token, acceptNegative) {\n switch (token) {\n case \"max\": case \"MAX\": case \"Max\":\n return 536870911;\n case \"0\":\n return 0;\n }\n\n /* istanbul ignore if */\n if (!acceptNegative && token.charAt(0) === \"-\")\n throw illegal(token, \"id\");\n\n if (base10NegRe.test(token))\n return parseInt(token, 10);\n if (base16NegRe.test(token))\n return parseInt(token, 16);\n\n /* istanbul ignore else */\n if (base8NegRe.test(token))\n return parseInt(token, 8);\n\n /* istanbul ignore next */\n throw illegal(token, \"id\");\n }\n\n function parsePackage() {\n\n /* istanbul ignore if */\n if (pkg !== undefined)\n throw illegal(\"package\");\n\n pkg = next();\n\n /* istanbul ignore if */\n if (!typeRefRe.test(pkg))\n throw illegal(pkg, \"name\");\n\n ptr = ptr.define(pkg);\n skip(\";\");\n }\n\n function parseImport() {\n var token = peek();\n var whichImports;\n switch (token) {\n case \"weak\":\n whichImports = weakImports || (weakImports = []);\n next();\n break;\n case \"public\":\n next();\n // eslint-disable-next-line no-fallthrough\n default:\n whichImports = imports || (imports = []);\n break;\n }\n token = readString();\n skip(\";\");\n whichImports.push(token);\n }\n\n function parseSyntax() {\n skip(\"=\");\n syntax = readString();\n isProto3 = syntax === \"proto3\";\n\n /* istanbul ignore if */\n if (!isProto3 && syntax !== \"proto2\")\n throw illegal(syntax, \"syntax\");\n\n skip(\";\");\n }\n\n function parseCommon(parent, token) {\n switch (token) {\n\n case \"option\":\n parseOption(parent, token);\n skip(\";\");\n return true;\n\n case \"message\":\n parseType(parent, token);\n return true;\n\n case \"enum\":\n parseEnum(parent, token);\n return true;\n\n case \"service\":\n parseService(parent, token);\n return true;\n\n case \"extend\":\n parseExtension(parent, token);\n return true;\n }\n return false;\n }\n\n function ifBlock(obj, fnIf, fnElse) {\n var trailingLine = tn.line;\n if (obj) {\n if(typeof obj.comment !== \"string\") {\n obj.comment = cmnt(); // try block-type comment\n }\n obj.filename = parse.filename;\n }\n if (skip(\"{\", true)) {\n var token;\n while ((token = next()) !== \"}\")\n fnIf(token);\n skip(\";\", true);\n } else {\n if (fnElse)\n fnElse();\n skip(\";\");\n if (obj && (typeof obj.comment !== \"string\" || preferTrailingComment))\n obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment\n }\n }\n\n function parseType(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"type name\");\n\n var type = new Type(token);\n ifBlock(type, function parseType_block(token) {\n if (parseCommon(type, token))\n return;\n\n switch (token) {\n\n case \"map\":\n parseMapField(type, token);\n break;\n\n case \"required\":\n case \"repeated\":\n parseField(type, token);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (isProto3) {\n parseField(type, \"proto3_optional\");\n } else {\n parseField(type, \"optional\");\n }\n break;\n\n case \"oneof\":\n parseOneOf(type, token);\n break;\n\n case \"extensions\":\n readRanges(type.extensions || (type.extensions = []));\n break;\n\n case \"reserved\":\n readRanges(type.reserved || (type.reserved = []), true);\n break;\n\n default:\n /* istanbul ignore if */\n if (!isProto3 || !typeRefRe.test(token))\n throw illegal(token);\n\n push(token);\n parseField(type, \"optional\");\n break;\n }\n });\n parent.add(type);\n }\n\n function parseField(parent, rule, extend) {\n var type = next();\n if (type === \"group\") {\n parseGroup(parent, rule);\n return;\n }\n // Type names can consume multiple tokens, in multiple variants:\n // package.subpackage field tokens: \"package.subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package . subpackage field tokens: \"package\" \".\" \"subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package. subpackage field tokens: \"package.\" \"subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package .subpackage field tokens: \"package\" \".subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // Keep reading tokens until we get a type name with no period at the end,\n // and the next token does not start with a period.\n while (type.endsWith(\".\") || peek().startsWith(\".\")) {\n type += next();\n }\n\n /* istanbul ignore if */\n if (!typeRefRe.test(type))\n throw illegal(type, \"type\");\n\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n name = applyCase(name);\n skip(\"=\");\n\n var field = new Field(name, parseId(next()), type, rule, extend);\n ifBlock(field, function parseField_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(field, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseField_line() {\n parseInlineOptions(field);\n });\n\n if (rule === \"proto3_optional\") {\n // for proto3 optional fields, we create a single-member Oneof to mimic \"optional\" behavior\n var oneof = new OneOf(\"_\" + name);\n field.setOption(\"proto3_optional\", true);\n oneof.add(field);\n parent.add(oneof);\n } else {\n parent.add(field);\n }\n\n // JSON defaults to packed=true if not set so we have to set packed=false explicity when\n // parsing proto2 descriptors without the option, where applicable. This must be done for\n // all known packable types and anything that could be an enum (= is not a basic type).\n if (!isProto3 && field.repeated && (types.packed[type] !== undefined || types.basic[type] === undefined))\n field.setOption(\"packed\", false, /* ifNotSet */ true);\n }\n\n function parseGroup(parent, rule) {\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n var fieldName = util.lcFirst(name);\n if (name === fieldName)\n name = util.ucFirst(name);\n skip(\"=\");\n var id = parseId(next());\n var type = new Type(name);\n type.group = true;\n var field = new Field(fieldName, id, name, rule);\n field.filename = parse.filename;\n ifBlock(type, function parseGroup_block(token) {\n switch (token) {\n\n case \"option\":\n parseOption(type, token);\n skip(\";\");\n break;\n\n case \"required\":\n case \"repeated\":\n parseField(type, token);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (isProto3) {\n parseField(type, \"proto3_optional\");\n } else {\n parseField(type, \"optional\");\n }\n break;\n\n case \"message\":\n parseType(type, token);\n break;\n\n case \"enum\":\n parseEnum(type, token);\n break;\n\n /* istanbul ignore next */\n default:\n throw illegal(token); // there are no groups with proto3 semantics\n }\n });\n parent.add(type)\n .add(field);\n }\n\n function parseMapField(parent) {\n skip(\"<\");\n var keyType = next();\n\n /* istanbul ignore if */\n if (types.mapKey[keyType] === undefined)\n throw illegal(keyType, \"type\");\n\n skip(\",\");\n var valueType = next();\n\n /* istanbul ignore if */\n if (!typeRefRe.test(valueType))\n throw illegal(valueType, \"type\");\n\n skip(\">\");\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n skip(\"=\");\n var field = new MapField(applyCase(name), parseId(next()), keyType, valueType);\n ifBlock(field, function parseMapField_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(field, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseMapField_line() {\n parseInlineOptions(field);\n });\n parent.add(field);\n }\n\n function parseOneOf(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var oneof = new OneOf(applyCase(token));\n ifBlock(oneof, function parseOneOf_block(token) {\n if (token === \"option\") {\n parseOption(oneof, token);\n skip(\";\");\n } else {\n push(token);\n parseField(oneof, \"optional\");\n }\n });\n parent.add(oneof);\n }\n\n function parseEnum(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var enm = new Enum(token);\n ifBlock(enm, function parseEnum_block(token) {\n switch(token) {\n case \"option\":\n parseOption(enm, token);\n skip(\";\");\n break;\n\n case \"reserved\":\n readRanges(enm.reserved || (enm.reserved = []), true);\n break;\n\n default:\n parseEnumValue(enm, token);\n }\n });\n parent.add(enm);\n }\n\n function parseEnumValue(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token))\n throw illegal(token, \"name\");\n\n skip(\"=\");\n var value = parseId(next(), true),\n dummy = {\n options: undefined\n };\n dummy.setOption = function(name, value) {\n if (this.options === undefined)\n this.options = {};\n this.options[name] = value;\n };\n ifBlock(dummy, function parseEnumValue_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(dummy, token); // skip\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseEnumValue_line() {\n parseInlineOptions(dummy); // skip\n });\n parent.add(token, value, dummy.comment, dummy.options);\n }\n\n function parseOption(parent, token) {\n var isCustom = skip(\"(\", true);\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var name = token;\n var option = name;\n var propName;\n\n if (isCustom) {\n skip(\")\");\n name = \"(\" + name + \")\";\n option = name;\n token = peek();\n if (fqTypeRefRe.test(token)) {\n propName = token.slice(1); //remove '.' before property name\n name += token;\n next();\n }\n }\n skip(\"=\");\n var optionValue = parseOptionValue(parent, name);\n setParsedOption(parent, option, optionValue, propName);\n }\n\n function parseOptionValue(parent, name) {\n // { a: \"foo\" b { c: \"bar\" } }\n if (skip(\"{\", true)) {\n var objectResult = {};\n\n while (!skip(\"}\", true)) {\n /* istanbul ignore if */\n if (!nameRe.test(token = next())) {\n throw illegal(token, \"name\");\n }\n if (token === null) {\n throw illegal(token, \"end of input\");\n }\n\n var value;\n var propName = token;\n\n skip(\":\", true);\n\n if (peek() === \"{\")\n value = parseOptionValue(parent, name + \".\" + token);\n else if (peek() === \"[\") {\n // option (my_option) = {\n // repeated_value: [ \"foo\", \"bar\" ]\n // };\n value = [];\n var lastValue;\n if (skip(\"[\", true)) {\n do {\n lastValue = readValue(true);\n value.push(lastValue);\n } while (skip(\",\", true));\n skip(\"]\");\n if (typeof lastValue !== \"undefined\") {\n setOption(parent, name + \".\" + token, lastValue);\n }\n }\n } else {\n value = readValue(true);\n setOption(parent, name + \".\" + token, value);\n }\n\n var prevValue = objectResult[propName];\n\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n\n objectResult[propName] = value;\n\n // Semicolons and commas can be optional\n skip(\",\", true);\n skip(\";\", true);\n }\n\n return objectResult;\n }\n\n var simpleValue = readValue(true);\n setOption(parent, name, simpleValue);\n return simpleValue;\n // Does not enforce a delimiter to be universal\n }\n\n function setOption(parent, name, value) {\n if (parent.setOption)\n parent.setOption(name, value);\n }\n\n function setParsedOption(parent, name, value, propName) {\n if (parent.setParsedOption)\n parent.setParsedOption(name, value, propName);\n }\n\n function parseInlineOptions(parent) {\n if (skip(\"[\", true)) {\n do {\n parseOption(parent, \"option\");\n } while (skip(\",\", true));\n skip(\"]\");\n }\n return parent;\n }\n\n function parseService(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"service name\");\n\n var service = new Service(token);\n ifBlock(service, function parseService_block(token) {\n if (parseCommon(service, token))\n return;\n\n /* istanbul ignore else */\n if (token === \"rpc\")\n parseMethod(service, token);\n else\n throw illegal(token);\n });\n parent.add(service);\n }\n\n function parseMethod(parent, token) {\n // Get the comment of the preceding line now (if one exists) in case the\n // method is defined across multiple lines.\n var commentText = cmnt();\n\n var type = token;\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var name = token,\n requestType, requestStream,\n responseType, responseStream;\n\n skip(\"(\");\n if (skip(\"stream\", true))\n requestStream = true;\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token);\n\n requestType = token;\n skip(\")\"); skip(\"returns\"); skip(\"(\");\n if (skip(\"stream\", true))\n responseStream = true;\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token);\n\n responseType = token;\n skip(\")\");\n\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\n method.comment = commentText;\n ifBlock(method, function parseMethod_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(method, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n });\n parent.add(method);\n }\n\n function parseExtension(parent, token) {\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token, \"reference\");\n\n var reference = token;\n ifBlock(null, function parseExtension_block(token) {\n switch (token) {\n\n case \"required\":\n case \"repeated\":\n parseField(parent, token, reference);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (isProto3) {\n parseField(parent, \"proto3_optional\", reference);\n } else {\n parseField(parent, \"optional\", reference);\n }\n break;\n\n default:\n /* istanbul ignore if */\n if (!isProto3 || !typeRefRe.test(token))\n throw illegal(token);\n push(token);\n parseField(parent, \"optional\", reference);\n break;\n }\n });\n }\n\n var token;\n while ((token = next()) !== null) {\n switch (token) {\n\n case \"package\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parsePackage();\n break;\n\n case \"import\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parseImport();\n break;\n\n case \"syntax\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parseSyntax();\n break;\n\n case \"option\":\n\n parseOption(ptr, token);\n skip(\";\");\n break;\n\n default:\n\n /* istanbul ignore else */\n if (parseCommon(ptr, token)) {\n head = false;\n continue;\n }\n\n /* istanbul ignore next */\n throw illegal(token);\n }\n }\n\n parse.filename = null;\n return {\n \"package\" : pkg,\n \"imports\" : imports,\n weakImports : weakImports,\n syntax : syntax,\n root : root\n };\n}\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @name parse\n * @function\n * @param {string} source Source contents\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {IParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {IParseOptions} defaults Default {@link IParseOptions}\n * @variation 2\n */\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(\"./reader\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(\"./namespace\");\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field = require(\"./field\"),\n Enum = require(\"./enum\"),\n OneOf = require(\"./oneof\"),\n util = require(\"./util\");\n\nvar Type, // cyclic\n parse, // might be excluded\n common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.} [options] Top level options\n */\nfunction Root(options) {\n Namespace.call(this, \"\", options);\n\n /**\n * Deferred extension fields.\n * @type {Field[]}\n */\n this.deferred = [];\n\n /**\n * Resolved file names of loaded files.\n * @type {string[]}\n */\n this.files = [];\n}\n\n/**\n * Loads a namespace descriptor into a root namespace.\n * @param {INamespace} json Nameespace descriptor\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root) {\n if (!root)\n root = new Root();\n if (json.options)\n root.setOptions(json.options);\n return root.addJSON(json.nested);\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {string|null} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n/**\n * Fetch content from file path or url\n * This method exists so you can override it with your own logic.\n * @function\n * @param {string} path File path or url\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.fetch = util.fetch;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = undefined;\n }\n var self = this;\n if (!callback)\n return util.asPromise(load, self, filename, options);\n\n var sync = callback === SYNC; // undocumented\n\n // Finishes loading by calling the callback (exactly once)\n function finish(err, root) {\n /* istanbul ignore if */\n if (!callback)\n return;\n if (sync)\n throw err;\n var cb = callback;\n callback = null;\n cb(err, root);\n }\n\n // Bundled definition existence checking\n function getBundledFileName(filename) {\n var idx = filename.lastIndexOf(\"google/protobuf/\");\n if (idx > -1) {\n var altname = filename.substring(idx);\n if (altname in common) return altname;\n }\n return null;\n }\n\n // Processes a single file\n function process(filename, source) {\n try {\n if (util.isString(source) && source.charAt(0) === \"{\")\n source = JSON.parse(source);\n if (!util.isString(source))\n self.setOptions(source.options).addJSON(source.nested);\n else {\n parse.filename = filename;\n var parsed = parse(source, self, options),\n resolved,\n i = 0;\n if (parsed.imports)\n for (; i < parsed.imports.length; ++i)\n if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i]))\n fetch(resolved);\n if (parsed.weakImports)\n for (i = 0; i < parsed.weakImports.length; ++i)\n if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i]))\n fetch(resolved, true);\n }\n } catch (err) {\n finish(err);\n }\n if (!sync && !queued)\n finish(null, self); // only once anyway\n }\n\n // Fetches a single file\n function fetch(filename, weak) {\n filename = getBundledFileName(filename) || filename;\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1)\n return;\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync)\n process(filename, common[filename]);\n else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename]);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source);\n } else {\n ++queued;\n self.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback)\n return; // terminated meanwhile\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source);\n });\n }\n }\n var queued = 0;\n\n // Assembling the root namespace doesn't require working type\n // references anymore, so we can load everything in parallel\n if (util.isString(filename))\n filename = [ filename ];\n for (var i = 0, resolved; i < filename.length; ++i)\n if (resolved = self.resolvePath(\"\", filename[i]))\n fetch(resolved);\n\n if (sync)\n return self;\n if (!queued)\n finish(null, self);\n return undefined;\n};\n// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise} Promise\n * @variation 3\n */\n// function load(filename:string, [options:IParseOptions]):Promise\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @function Root#loadSync\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n if (!util.isNode)\n throw Error(\"not supported\");\n return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n if (this.deferred.length)\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n }).join(\", \"));\n return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n var extendedType = field.parent.lookup(field.extend);\n if (extendedType) {\n var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n //do not allow to extend same field twice to prevent the error\n if (extendedType.get(sisterField.name)) {\n return true;\n }\n sisterField.declaringField = field;\n field.extensionField = sisterField;\n extendedType.add(sisterField);\n return true;\n }\n return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n if (object instanceof Field) {\n\n if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n if (!tryHandleExtension(this, object))\n this.deferred.push(object);\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {\n\n if (object instanceof Type) // Try to handle any deferred extensions\n for (var i = 0; i < this.deferred.length;)\n if (tryHandleExtension(this, this.deferred[i]))\n this.deferred.splice(i, 1);\n else\n ++i;\n for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n this._handleAdd(object._nestedArray[j]);\n if (exposeRe.test(object.name))\n object.parent[object.name] = object; // expose namespace as property of its parent\n }\n\n // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n // properties of namespaces just like static code does. This allows using a .d.ts generated for\n // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n if (object instanceof Field) {\n\n if (/* an extension field */ object.extend !== undefined) {\n if (/* already handled */ object.extensionField) { // remove its sister field\n object.extensionField.parent.remove(object.extensionField);\n object.extensionField = null;\n } else { // cancel the extension\n var index = this.deferred.indexOf(object);\n /* istanbul ignore else */\n if (index > -1)\n this.deferred.splice(index, 1);\n }\n }\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose enum values\n\n } else if (object instanceof Namespace) {\n\n for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n this._handleRemove(object._nestedArray[i]);\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose namespaces\n\n }\n};\n\n// Sets up cyclic dependencies (called in index-light)\nRoot._configure = function(Type_, parse_, common_) {\n Type = Type_;\n parse = parse_;\n common = common_;\n};\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(\"./rpc/service\");\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(\"../util/minimal\");\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(\"./namespace\");\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(\"./method\"),\n util = require(\"./util\"),\n rpc = require(\"./rpc\");\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Service methods.\n * @type {Object.}\n */\n this.methods = {}; // toJSON, marker\n\n /**\n * Cached methods as an array.\n * @type {Method[]|null}\n * @private\n */\n this._methodsArray = null;\n}\n\n/**\n * Service descriptor.\n * @interface IService\n * @extends INamespace\n * @property {Object.} methods Method descriptors\n */\n\n/**\n * Constructs a service from a service descriptor.\n * @param {string} name Service name\n * @param {IService} json Service descriptor\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json) {\n var service = new Service(name, json.options);\n /* istanbul ignore else */\n if (json.methods)\n for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n if (json.nested)\n service.addJSON(json.nested);\n service.comment = json.comment;\n return service;\n};\n\n/**\n * Converts this service to a service descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IService} Service descriptor\n */\nService.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"methods\" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n get: function() {\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n }\n});\n\nfunction clearCache(service) {\n service._methodsArray = null;\n return service;\n}\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n return this.methods[name]\n || Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n var methods = this.methodsArray;\n for (var i = 0; i < methods.length; ++i)\n methods[i].resolve();\n return Namespace.prototype.resolve.call(this);\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n\n /* istanbul ignore if */\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Method) {\n this.methods[object.name] = object;\n object.parent = this;\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n if (object instanceof Method) {\n\n /* istanbul ignore if */\n if (this.methods[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.methods[object.name];\n object.parent = null;\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {\n var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\\w_]/g, \"\");\n rpcService[methodName] = util.codegen([\"r\",\"c\"], util.isReserved(methodName) ? methodName + \"_\" : methodName)(\"return this.rpcCall(m,q,s,r,c)\")({\n m: method,\n q: method.resolvedRequestType.ctor,\n s: method.resolvedResponseType.ctor\n });\n }\n return rpcService;\n};\n","\"use strict\";\nmodule.exports = tokenize;\n\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\n\nvar setCommentRe = /^ *[*/]+ */,\n setCommentAltRe = /^\\s*\\*?\\/*/,\n setCommentSplitRe = /\\n/g,\n whitespaceRe = /\\s/,\n unescapeRe = /\\\\(.?)/g;\n\nvar unescapeMap = {\n \"0\": \"\\0\",\n \"r\": \"\\r\",\n \"n\": \"\\n\",\n \"t\": \"\\t\"\n};\n\n/**\n * Unescapes a string.\n * @param {string} str String to unescape\n * @returns {string} Unescaped string\n * @property {Object.} map Special characters map\n * @memberof tokenize\n */\nfunction unescape(str) {\n return str.replace(unescapeRe, function($0, $1) {\n switch ($1) {\n case \"\\\\\":\n case \"\":\n return $1;\n default:\n return unescapeMap[$1] || \"\";\n }\n });\n}\n\ntokenize.unescape = unescape;\n\n/**\n * Gets the next token and advances.\n * @typedef TokenizerHandleNext\n * @type {function}\n * @returns {string|null} Next token or `null` on eof\n */\n\n/**\n * Peeks for the next token.\n * @typedef TokenizerHandlePeek\n * @type {function}\n * @returns {string|null} Next token or `null` on eof\n */\n\n/**\n * Pushes a token back to the stack.\n * @typedef TokenizerHandlePush\n * @type {function}\n * @param {string} token Token\n * @returns {undefined}\n */\n\n/**\n * Skips the next token.\n * @typedef TokenizerHandleSkip\n * @type {function}\n * @param {string} expected Expected token\n * @param {boolean} [optional=false] If optional\n * @returns {boolean} Whether the token matched\n * @throws {Error} If the token didn't match and is not optional\n */\n\n/**\n * Gets the comment on the previous line or, alternatively, the line comment on the specified line.\n * @typedef TokenizerHandleCmnt\n * @type {function}\n * @param {number} [line] Line number\n * @returns {string|null} Comment text or `null` if none\n */\n\n/**\n * Handle object returned from {@link tokenize}.\n * @interface ITokenizerHandle\n * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof)\n * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof)\n * @property {TokenizerHandlePush} push Pushes a token back to the stack\n * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\n * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any\n * @property {number} line Current line number\n */\n\n/**\n * Tokenizes the given .proto source and returns an object with useful utility functions.\n * @param {string} source Source contents\n * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode.\n * @returns {ITokenizerHandle} Tokenizer handle\n */\nfunction tokenize(source, alternateCommentMode) {\n /* eslint-disable callback-return */\n source = source.toString();\n\n var offset = 0,\n length = source.length,\n line = 1,\n lastCommentLine = 0,\n comments = {};\n\n var stack = [];\n\n var stringDelim = null;\n\n /* istanbul ignore next */\n /**\n * Creates an error for illegal syntax.\n * @param {string} subject Subject\n * @returns {Error} Error created\n * @inner\n */\n function illegal(subject) {\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\n }\n\n /**\n * Reads a string till its end.\n * @returns {string} String read\n * @inner\n */\n function readString() {\n var re = stringDelim === \"'\" ? stringSingleRe : stringDoubleRe;\n re.lastIndex = offset - 1;\n var match = re.exec(source);\n if (!match)\n throw illegal(\"string\");\n offset = re.lastIndex;\n push(stringDelim);\n stringDelim = null;\n return unescape(match[1]);\n }\n\n /**\n * Gets the character at `pos` within the source.\n * @param {number} pos Position\n * @returns {string} Character\n * @inner\n */\n function charAt(pos) {\n return source.charAt(pos);\n }\n\n /**\n * Sets the current comment text.\n * @param {number} start Start offset\n * @param {number} end End offset\n * @param {boolean} isLeading set if a leading comment\n * @returns {undefined}\n * @inner\n */\n function setComment(start, end, isLeading) {\n var comment = {\n type: source.charAt(start++),\n lineEmpty: false,\n leading: isLeading,\n };\n var lookback;\n if (alternateCommentMode) {\n lookback = 2; // alternate comment parsing: \"//\" or \"/*\"\n } else {\n lookback = 3; // \"///\" or \"/**\"\n }\n var commentOffset = start - lookback,\n c;\n do {\n if (--commentOffset < 0 ||\n (c = source.charAt(commentOffset)) === \"\\n\") {\n comment.lineEmpty = true;\n break;\n }\n } while (c === \" \" || c === \"\\t\");\n var lines = source\n .substring(start, end)\n .split(setCommentSplitRe);\n for (var i = 0; i < lines.length; ++i)\n lines[i] = lines[i]\n .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, \"\")\n .trim();\n comment.text = lines\n .join(\"\\n\")\n .trim();\n\n comments[line] = comment;\n lastCommentLine = line;\n }\n\n function isDoubleSlashCommentLine(startOffset) {\n var endOffset = findEndOfLine(startOffset);\n\n // see if remaining line matches comment pattern\n var lineText = source.substring(startOffset, endOffset);\n var isComment = /^\\s*\\/\\//.test(lineText);\n return isComment;\n }\n\n function findEndOfLine(cursor) {\n // find end of cursor's line\n var endOffset = cursor;\n while (endOffset < length && charAt(endOffset) !== \"\\n\") {\n endOffset++;\n }\n return endOffset;\n }\n\n /**\n * Obtains the next token.\n * @returns {string|null} Next token or `null` on eof\n * @inner\n */\n function next() {\n if (stack.length > 0)\n return stack.shift();\n if (stringDelim)\n return readString();\n var repeat,\n prev,\n curr,\n start,\n isDoc,\n isLeadingComment = offset === 0;\n do {\n if (offset === length)\n return null;\n repeat = false;\n while (whitespaceRe.test(curr = charAt(offset))) {\n if (curr === \"\\n\") {\n isLeadingComment = true;\n ++line;\n }\n if (++offset === length)\n return null;\n }\n\n if (charAt(offset) === \"/\") {\n if (++offset === length) {\n throw illegal(\"comment\");\n }\n if (charAt(offset) === \"/\") { // Line\n if (!alternateCommentMode) {\n // check for triple-slash comment\n isDoc = charAt(start = offset + 1) === \"/\";\n\n while (charAt(++offset) !== \"\\n\") {\n if (offset === length) {\n return null;\n }\n }\n ++offset;\n if (isDoc) {\n setComment(start, offset - 1, isLeadingComment);\n // Trailing comment cannot not be multi-line,\n // so leading comment state should be reset to handle potential next comments\n isLeadingComment = true;\n }\n ++line;\n repeat = true;\n } else {\n // check for double-slash comments, consolidating consecutive lines\n start = offset;\n isDoc = false;\n if (isDoubleSlashCommentLine(offset - 1)) {\n isDoc = true;\n do {\n offset = findEndOfLine(offset);\n if (offset === length) {\n break;\n }\n offset++;\n if (!isLeadingComment) {\n // Trailing comment cannot not be multi-line\n break;\n }\n } while (isDoubleSlashCommentLine(offset));\n } else {\n offset = Math.min(length, findEndOfLine(offset) + 1);\n }\n if (isDoc) {\n setComment(start, offset, isLeadingComment);\n isLeadingComment = true;\n }\n line++;\n repeat = true;\n }\n } else if ((curr = charAt(offset)) === \"*\") { /* Block */\n // check for /** (regular comment mode) or /* (alternate comment mode)\n start = offset + 1;\n isDoc = alternateCommentMode || charAt(start) === \"*\";\n do {\n if (curr === \"\\n\") {\n ++line;\n }\n if (++offset === length) {\n throw illegal(\"comment\");\n }\n prev = curr;\n curr = charAt(offset);\n } while (prev !== \"*\" || curr !== \"/\");\n ++offset;\n if (isDoc) {\n setComment(start, offset - 2, isLeadingComment);\n isLeadingComment = true;\n }\n repeat = true;\n } else {\n return \"/\";\n }\n }\n } while (repeat);\n\n // offset !== length if we got here\n\n var end = offset;\n delimRe.lastIndex = 0;\n var delim = delimRe.test(charAt(end++));\n if (!delim)\n while (end < length && !delimRe.test(charAt(end)))\n ++end;\n var token = source.substring(offset, offset = end);\n if (token === \"\\\"\" || token === \"'\")\n stringDelim = token;\n return token;\n }\n\n /**\n * Pushes a token back to the stack.\n * @param {string} token Token\n * @returns {undefined}\n * @inner\n */\n function push(token) {\n stack.push(token);\n }\n\n /**\n * Peeks for the next token.\n * @returns {string|null} Token or `null` on eof\n * @inner\n */\n function peek() {\n if (!stack.length) {\n var token = next();\n if (token === null)\n return null;\n push(token);\n }\n return stack[0];\n }\n\n /**\n * Skips a token.\n * @param {string} expected Expected token\n * @param {boolean} [optional=false] Whether the token is optional\n * @returns {boolean} `true` when skipped, `false` if not\n * @throws {Error} When a required token is not present\n * @inner\n */\n function skip(expected, optional) {\n var actual = peek(),\n equals = actual === expected;\n if (equals) {\n next();\n return true;\n }\n if (!optional)\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\n return false;\n }\n\n /**\n * Gets a comment.\n * @param {number} [trailingLine] Line number if looking for a trailing comment\n * @returns {string|null} Comment text\n * @inner\n */\n function cmnt(trailingLine) {\n var ret = null;\n var comment;\n if (trailingLine === undefined) {\n comment = comments[line - 1];\n delete comments[line - 1];\n if (comment && (alternateCommentMode || comment.type === \"*\" || comment.lineEmpty)) {\n ret = comment.leading ? comment.text : null;\n }\n } else {\n /* istanbul ignore else */\n if (lastCommentLine < trailingLine) {\n peek();\n }\n comment = comments[trailingLine];\n delete comments[trailingLine];\n if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === \"/\")) {\n ret = comment.leading ? null : comment.text;\n }\n }\n return ret;\n }\n\n return Object.defineProperty({\n next: next,\n peek: peek,\n push: push,\n skip: skip,\n cmnt: cmnt\n }, \"line\", {\n get: function() { return line; }\n });\n /* eslint-enable callback-return */\n}\n","\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(\"./namespace\");\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum = require(\"./enum\"),\n OneOf = require(\"./oneof\"),\n Field = require(\"./field\"),\n MapField = require(\"./mapfield\"),\n Service = require(\"./service\"),\n Message = require(\"./message\"),\n Reader = require(\"./reader\"),\n Writer = require(\"./writer\"),\n util = require(\"./util\"),\n encoder = require(\"./encoder\"),\n decoder = require(\"./decoder\"),\n verifier = require(\"./verifier\"),\n converter = require(\"./converter\"),\n wrappers = require(\"./wrappers\");\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.} [options] Declared options\n */\nfunction Type(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Message fields.\n * @type {Object.}\n */\n this.fields = {}; // toJSON, marker\n\n /**\n * Oneofs declared within this namespace, if any.\n * @type {Object.}\n */\n this.oneofs = undefined; // toJSON\n\n /**\n * Extension ranges, if any.\n * @type {number[][]}\n */\n this.extensions = undefined; // toJSON\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n /*?\n * Whether this type is a legacy group.\n * @type {boolean|undefined}\n */\n this.group = undefined; // toJSON\n\n /**\n * Cached fields by id.\n * @type {Object.|null}\n * @private\n */\n this._fieldsById = null;\n\n /**\n * Cached fields as an array.\n * @type {Field[]|null}\n * @private\n */\n this._fieldsArray = null;\n\n /**\n * Cached oneofs as an array.\n * @type {OneOf[]|null}\n * @private\n */\n this._oneofsArray = null;\n\n /**\n * Cached constructor.\n * @type {Constructor<{}>}\n * @private\n */\n this._ctor = null;\n}\n\nObject.defineProperties(Type.prototype, {\n\n /**\n * Message fields by id.\n * @name Type#fieldsById\n * @type {Object.}\n * @readonly\n */\n fieldsById: {\n get: function() {\n\n /* istanbul ignore if */\n if (this._fieldsById)\n return this._fieldsById;\n\n this._fieldsById = {};\n for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {\n var field = this.fields[names[i]],\n id = field.id;\n\n /* istanbul ignore if */\n if (this._fieldsById[id])\n throw Error(\"duplicate id \" + id + \" in \" + this);\n\n this._fieldsById[id] = field;\n }\n return this._fieldsById;\n }\n },\n\n /**\n * Fields of this message as an array for iteration.\n * @name Type#fieldsArray\n * @type {Field[]}\n * @readonly\n */\n fieldsArray: {\n get: function() {\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\n }\n },\n\n /**\n * Oneofs of this message as an array for iteration.\n * @name Type#oneofsArray\n * @type {OneOf[]}\n * @readonly\n */\n oneofsArray: {\n get: function() {\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\n }\n },\n\n /**\n * The registered constructor, if any registered, otherwise a generic constructor.\n * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.\n * @name Type#ctor\n * @type {Constructor<{}>}\n */\n ctor: {\n get: function() {\n return this._ctor || (this.ctor = Type.generateConstructor(this)());\n },\n set: function(ctor) {\n\n // Ensure proper prototype\n var prototype = ctor.prototype;\n if (!(prototype instanceof Message)) {\n (ctor.prototype = new Message()).constructor = ctor;\n util.merge(ctor.prototype, prototype);\n }\n\n // Classes and messages reference their reflected type\n ctor.$type = ctor.prototype.$type = this;\n\n // Mix in static methods\n util.merge(ctor, Message, true);\n\n this._ctor = ctor;\n\n // Messages have non-enumerable default values on their prototype\n var i = 0;\n for (; i < /* initializes */ this.fieldsArray.length; ++i)\n this._fieldsArray[i].resolve(); // ensures a proper value\n\n // Messages have non-enumerable getters and setters for each virtual oneof field\n var ctorProperties = {};\n for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i)\n ctorProperties[this._oneofsArray[i].resolve().name] = {\n get: util.oneOfGetter(this._oneofsArray[i].oneof),\n set: util.oneOfSetter(this._oneofsArray[i].oneof)\n };\n if (i)\n Object.defineProperties(ctor.prototype, ctorProperties);\n }\n }\n});\n\n/**\n * Generates a constructor function for the specified type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nType.generateConstructor = function generateConstructor(mtype) {\n /* eslint-disable no-unexpected-multiline */\n var gen = util.codegen([\"p\"], mtype.name);\n // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype\n for (var i = 0, field; i < mtype.fieldsArray.length; ++i)\n if ((field = mtype._fieldsArray[i]).map) gen\n (\"this%s={}\", util.safeProp(field.name));\n else if (field.repeated) gen\n (\"this%s=[]\", util.safeProp(field.name));\n return gen\n (\"if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors\n * @property {Object.} fields Field descriptors\n * @property {number[][]} [extensions] Extension ranges\n * @property {number[][]} [reserved] Reserved ranges\n * @property {boolean} [group=false] Whether a legacy group or not\n */\n\n/**\n * Creates a message type from a message type descriptor.\n * @param {string} name Message name\n * @param {IType} json Message type descriptor\n * @returns {Type} Created message type\n */\nType.fromJSON = function fromJSON(name, json) {\n var type = new Type(name, json.options);\n type.extensions = json.extensions;\n type.reserved = json.reserved;\n var names = Object.keys(json.fields),\n i = 0;\n for (; i < names.length; ++i)\n type.add(\n ( typeof json.fields[names[i]].keyType !== \"undefined\"\n ? MapField.fromJSON\n : Field.fromJSON )(names[i], json.fields[names[i]])\n );\n if (json.oneofs)\n for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)\n type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));\n if (json.nested)\n for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {\n var nested = json.nested[names[i]];\n type.add( // most to least likely\n ( nested.id !== undefined\n ? Field.fromJSON\n : nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n if (json.extensions && json.extensions.length)\n type.extensions = json.extensions;\n if (json.reserved && json.reserved.length)\n type.reserved = json.reserved;\n if (json.group)\n type.group = true;\n if (json.comment)\n type.comment = json.comment;\n return type;\n};\n\n/**\n * Converts this message type to a message type descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IType} Message type descriptor\n */\nType.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"oneofs\" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),\n \"fields\" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},\n \"extensions\" , this.extensions && this.extensions.length ? this.extensions : undefined,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"group\" , this.group || undefined,\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nType.prototype.resolveAll = function resolveAll() {\n var fields = this.fieldsArray, i = 0;\n while (i < fields.length)\n fields[i++].resolve();\n var oneofs = this.oneofsArray; i = 0;\n while (i < oneofs.length)\n oneofs[i++].resolve();\n return Namespace.prototype.resolveAll.call(this);\n};\n\n/**\n * @override\n */\nType.prototype.get = function get(name) {\n return this.fields[name]\n || this.oneofs && this.oneofs[name]\n || this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Adds a nested object to this type.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\n */\nType.prototype.add = function add(object) {\n\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Field && object.extend === undefined) {\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\n // The root object takes care of adding distinct sister-fields to the respective extended\n // type instead.\n\n // avoids calling the getter if not absolutely necessary because it's called quite frequently\n if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\n if (this.isReservedId(object.id))\n throw Error(\"id \" + object.id + \" is reserved in \" + this);\n if (this.isReservedName(object.name))\n throw Error(\"name '\" + object.name + \"' is reserved in \" + this);\n\n if (object.parent)\n object.parent.remove(object);\n this.fields[object.name] = object;\n object.message = this;\n object.onAdd(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n if (!this.oneofs)\n this.oneofs = {};\n this.oneofs[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * Removes a nested object from this type.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this type\n */\nType.prototype.remove = function remove(object) {\n if (object instanceof Field && object.extend === undefined) {\n // See Type#add for the reason why extension fields are excluded here.\n\n /* istanbul ignore if */\n if (!this.fields || this.fields[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.fields[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n\n /* istanbul ignore if */\n if (!this.oneofs || this.oneofs[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.oneofs[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message<{}>} Message instance\n */\nType.prototype.create = function create(properties) {\n return new this.ctor(properties);\n};\n\n/**\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\n * @returns {Type} `this`\n */\nType.prototype.setup = function setup() {\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\n // multiple times (V8, soft-deopt prototype-check).\n\n var fullName = this.fullName,\n types = [];\n for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)\n types.push(this._fieldsArray[i].resolve().resolvedType);\n\n // Replace setup methods with type-specific generated functions\n this.encode = encoder(this)({\n Writer : Writer,\n types : types,\n util : util\n });\n this.decode = decoder(this)({\n Reader : Reader,\n types : types,\n util : util\n });\n this.verify = verifier(this)({\n types : types,\n util : util\n });\n this.fromObject = converter.fromObject(this)({\n types : types,\n util : util\n });\n this.toObject = converter.toObject(this)({\n types : types,\n util : util\n });\n\n // Inject custom wrappers for common types\n var wrapper = wrappers[fullName];\n if (wrapper) {\n var originalThis = Object.create(this);\n // if (wrapper.fromObject) {\n originalThis.fromObject = this.fromObject;\n this.fromObject = wrapper.fromObject.bind(originalThis);\n // }\n // if (wrapper.toObject) {\n originalThis.toObject = this.toObject;\n this.toObject = wrapper.toObject.bind(originalThis);\n // }\n }\n\n return this;\n};\n\n/**\n * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encode = function encode_setup(message, writer) {\n return this.setup().encode(message, writer); // overrides this method\n};\n\n/**\n * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\n};\n\n/**\n * Decodes a message of this type.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Length of the message, if known beforehand\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError<{}>} If required fields are missing\n */\nType.prototype.decode = function decode_setup(reader, length) {\n return this.setup().decode(reader, length); // overrides this method\n};\n\n/**\n * Decodes a message of this type preceeded by its byte length as a varint.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof Reader))\n reader = Reader.create(reader);\n return this.decode(reader, reader.uint32());\n};\n\n/**\n * Verifies that field values are valid and that required fields are present.\n * @param {Object.} message Plain object to verify\n * @returns {null|string} `null` if valid, otherwise the reason why it is not\n */\nType.prototype.verify = function verify_setup(message) {\n return this.setup().verify(message); // overrides this method\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object to convert\n * @returns {Message<{}>} Message instance\n */\nType.prototype.fromObject = function fromObject(object) {\n return this.setup().fromObject(object);\n};\n\n/**\n * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.\n * @interface IConversionOptions\n * @property {Function} [longs] Long conversion type.\n * Valid values are `String` and `Number` (the global types).\n * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.\n * @property {Function} [enums] Enum value conversion type.\n * Only valid value is `String` (the global type).\n * Defaults to copy the present value, which is the numeric id.\n * @property {Function} [bytes] Bytes value conversion type.\n * Valid values are `Array` and (a base64 encoded) `String` (the global types).\n * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\n * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\n * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`\n * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any\n * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\nType.prototype.toObject = function toObject(message, options) {\n return this.setup().toObject(message, options);\n};\n\n/**\n * Decorator function as returned by {@link Type.d} (TypeScript).\n * @typedef TypeDecorator\n * @type {function}\n * @param {Constructor} target Target constructor\n * @returns {undefined}\n * @template T extends Message\n */\n\n/**\n * Type decorator (TypeScript).\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {TypeDecorator} Decorator function\n * @template T extends Message\n */\nType.d = function decorateType(typeName) {\n return function typeDecorator(target) {\n util.decorateType(target, typeName);\n };\n};\n","\"use strict\";\n\n/**\n * Common type constants.\n * @namespace\n */\nvar types = exports;\n\nvar util = require(\"./util\");\n\nvar s = [\n \"double\", // 0\n \"float\", // 1\n \"int32\", // 2\n \"uint32\", // 3\n \"sint32\", // 4\n \"fixed32\", // 5\n \"sfixed32\", // 6\n \"int64\", // 7\n \"uint64\", // 8\n \"sint64\", // 9\n \"fixed64\", // 10\n \"sfixed64\", // 11\n \"bool\", // 12\n \"string\", // 13\n \"bytes\" // 14\n];\n\nfunction bake(values, offset) {\n var i = 0, o = {};\n offset |= 0;\n while (i < values.length) o[s[i + offset]] = values[i++];\n return o;\n}\n\n/**\n * Basic type wire types.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n * @property {number} bytes=2 Ldelim wire type\n */\ntypes.basic = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2,\n /* bytes */ 2\n]);\n\n/**\n * Basic type defaults.\n * @type {Object.}\n * @const\n * @property {number} double=0 Double default\n * @property {number} float=0 Float default\n * @property {number} int32=0 Int32 default\n * @property {number} uint32=0 Uint32 default\n * @property {number} sint32=0 Sint32 default\n * @property {number} fixed32=0 Fixed32 default\n * @property {number} sfixed32=0 Sfixed32 default\n * @property {number} int64=0 Int64 default\n * @property {number} uint64=0 Uint64 default\n * @property {number} sint64=0 Sint32 default\n * @property {number} fixed64=0 Fixed64 default\n * @property {number} sfixed64=0 Sfixed64 default\n * @property {boolean} bool=false Bool default\n * @property {string} string=\"\" String default\n * @property {Array.} bytes=Array(0) Bytes default\n * @property {null} message=null Message default\n */\ntypes.defaults = bake([\n /* double */ 0,\n /* float */ 0,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 0,\n /* sfixed32 */ 0,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 0,\n /* sfixed64 */ 0,\n /* bool */ false,\n /* string */ \"\",\n /* bytes */ util.emptyArray,\n /* message */ null\n]);\n\n/**\n * Basic long type wire types.\n * @type {Object.}\n * @const\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n */\ntypes.long = bake([\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1\n], 7);\n\n/**\n * Allowed types for map keys with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n */\ntypes.mapKey = bake([\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2\n], 2);\n\n/**\n * Allowed types for packed repeated fields with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n */\ntypes.packed = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0\n]);\n","\"use strict\";\n\n/**\n * Various utility functions.\n * @namespace\n */\nvar util = module.exports = require(\"./util/minimal\");\n\nvar roots = require(\"./roots\");\n\nvar Type, // cyclic\n Enum;\n\nutil.codegen = require(\"@protobufjs/codegen\");\nutil.fetch = require(\"@protobufjs/fetch\");\nutil.path = require(\"@protobufjs/path\");\n\n/**\n * Node's fs module if available.\n * @type {Object.}\n */\nutil.fs = util.inquire(\"fs\");\n\n/**\n * Converts an object's values to an array.\n * @param {Object.} object Object to convert\n * @returns {Array.<*>} Converted array\n */\nutil.toArray = function toArray(object) {\n if (object) {\n var keys = Object.keys(object),\n array = new Array(keys.length),\n index = 0;\n while (index < keys.length)\n array[index] = object[keys[index++]];\n return array;\n }\n return [];\n};\n\n/**\n * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values.\n * @param {Array.<*>} array Array to convert\n * @returns {Object.} Converted object\n */\nutil.toObject = function toObject(array) {\n var object = {},\n index = 0;\n while (index < array.length) {\n var key = array[index++],\n val = array[index++];\n if (val !== undefined)\n object[key] = val;\n }\n return object;\n};\n\nvar safePropBackslashRe = /\\\\/g,\n safePropQuoteRe = /\"/g;\n\n/**\n * Tests whether the specified name is a reserved word in JS.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nutil.isReserved = function isReserved(name) {\n return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name);\n};\n\n/**\n * Returns a safe property accessor for the specified property name.\n * @param {string} prop Property name\n * @returns {string} Safe accessor\n */\nutil.safeProp = function safeProp(prop) {\n if (!/^[$\\w_]+$/.test(prop) || util.isReserved(prop))\n return \"[\\\"\" + prop.replace(safePropBackslashRe, \"\\\\\\\\\").replace(safePropQuoteRe, \"\\\\\\\"\") + \"\\\"]\";\n return \".\" + prop;\n};\n\n/**\n * Converts the first character of a string to upper case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.ucFirst = function ucFirst(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar camelCaseRe = /_([a-z])/g;\n\n/**\n * Converts a string to camel case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.camelCase = function camelCase(str) {\n return str.substring(0, 1)\n + str.substring(1)\n .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });\n};\n\n/**\n * Compares reflected fields by id.\n * @param {Field} a First field\n * @param {Field} b Second field\n * @returns {number} Comparison value\n */\nutil.compareFieldsById = function compareFieldsById(a, b) {\n return a.id - b.id;\n};\n\n/**\n * Decorator helper for types (TypeScript).\n * @param {Constructor} ctor Constructor function\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {Type} Reflected type\n * @template T extends Message\n * @property {Root} root Decorators root\n */\nutil.decorateType = function decorateType(ctor, typeName) {\n\n /* istanbul ignore if */\n if (ctor.$type) {\n if (typeName && ctor.$type.name !== typeName) {\n util.decorateRoot.remove(ctor.$type);\n ctor.$type.name = typeName;\n util.decorateRoot.add(ctor.$type);\n }\n return ctor.$type;\n }\n\n /* istanbul ignore next */\n if (!Type)\n Type = require(\"./type\");\n\n var type = new Type(typeName || ctor.name);\n util.decorateRoot.add(type);\n type.ctor = ctor; // sets up .encode, .decode etc.\n Object.defineProperty(ctor, \"$type\", { value: type, enumerable: false });\n Object.defineProperty(ctor.prototype, \"$type\", { value: type, enumerable: false });\n return type;\n};\n\nvar decorateEnumIndex = 0;\n\n/**\n * Decorator helper for enums (TypeScript).\n * @param {Object} object Enum object\n * @returns {Enum} Reflected enum\n */\nutil.decorateEnum = function decorateEnum(object) {\n\n /* istanbul ignore if */\n if (object.$type)\n return object.$type;\n\n /* istanbul ignore next */\n if (!Enum)\n Enum = require(\"./enum\");\n\n var enm = new Enum(\"Enum\" + decorateEnumIndex++, object);\n util.decorateRoot.add(enm);\n Object.defineProperty(object, \"$type\", { value: enm, enumerable: false });\n return enm;\n};\n\n\n/**\n * Sets the value of a property by property path. If a value already exists, it is turned to an array\n * @param {Object.} dst Destination object\n * @param {string} path dot '.' delimited path of the property to set\n * @param {Object} value the value to set\n * @returns {Object.} Destination object\n */\nutil.setProperty = function setProperty(dst, path, value) {\n function setProp(dst, path, value) {\n var part = path.shift();\n if (part === \"__proto__\" || part === \"prototype\") {\n return dst;\n }\n if (path.length > 0) {\n dst[part] = setProp(dst[part] || {}, path, value);\n } else {\n var prevValue = dst[part];\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n dst[part] = value;\n }\n return dst;\n }\n\n if (typeof dst !== \"object\")\n throw TypeError(\"dst must be an object\");\n if (!path)\n throw TypeError(\"path must be specified\");\n\n path = path.split(\".\");\n return setProp(dst, path, value);\n};\n\n/**\n * Decorator root (TypeScript).\n * @name util.decorateRoot\n * @type {Root}\n * @readonly\n */\nObject.defineProperty(util, \"decorateRoot\", {\n get: function() {\n return roots[\"decorated\"] || (roots[\"decorated\"] = new (require(\"./root\"))());\n }\n});\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(\"../util/minimal\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(\"@protobufjs/aspromise\");\n\n// converts to / from base64 encoded strings\nutil.base64 = require(\"@protobufjs/base64\");\n\n// base class of rpc.Service\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\n\n// float handling accross browsers\nutil.float = require(\"@protobufjs/float\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(\"@protobufjs/inquire\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(\"@protobufjs/utf8\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(\"@protobufjs/pool\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(\"./longbits\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = verifier;\n\nvar Enum = require(\"./enum\"),\n util = require(\"./util\");\n\nfunction invalid(field, expected) {\n return field.name + \": \" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected\";\n}\n\n/**\n * Generates a partial value verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\n /* eslint-disable no-unexpected-multiline */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(%s){\", ref)\n (\"default:\")\n (\"return%j\", invalid(field, \"enum value\"));\n for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen\n (\"case %i:\", field.resolvedType.values[keys[j]]);\n gen\n (\"break\")\n (\"}\");\n } else {\n gen\n (\"{\")\n (\"var e=types[%i].verify(%s);\", fieldIndex, ref)\n (\"if(e)\")\n (\"return%j+e\", field.name + \".\")\n (\"}\");\n }\n } else {\n switch (field.type) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.isInteger(%s))\", ref)\n (\"return%j\", invalid(field, \"integer\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\n (\"return%j\", invalid(field, \"integer|Long\"));\n break;\n case \"float\":\n case \"double\": gen\n (\"if(typeof %s!==\\\"number\\\")\", ref)\n (\"return%j\", invalid(field, \"number\"));\n break;\n case \"bool\": gen\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\n (\"return%j\", invalid(field, \"boolean\"));\n break;\n case \"string\": gen\n (\"if(!util.isString(%s))\", ref)\n (\"return%j\", invalid(field, \"string\"));\n break;\n case \"bytes\": gen\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\n (\"return%j\", invalid(field, \"buffer\"));\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a partial key verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyKey(gen, field, ref) {\n /* eslint-disable no-unexpected-multiline */\n switch (field.keyType) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.key32Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"integer key\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.key64Re.test(%s))\", ref) // see comment above: x is ok, d is not\n (\"return%j\", invalid(field, \"integer|Long key\"));\n break;\n case \"bool\": gen\n (\"if(!util.key2Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"boolean key\"));\n break;\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a verifier specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction verifier(mtype) {\n /* eslint-disable no-unexpected-multiline */\n\n var gen = util.codegen([\"m\"], mtype.name + \"$verify\")\n (\"if(typeof m!==\\\"object\\\"||m===null)\")\n (\"return%j\", \"object expected\");\n var oneofs = mtype.oneofsArray,\n seenFirstField = {};\n if (oneofs.length) gen\n (\"var p={}\");\n\n for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n ref = \"m\" + util.safeProp(field.name);\n\n if (field.optional) gen\n (\"if(%s!=null&&m.hasOwnProperty(%j)){\", ref, field.name); // !== undefined && !== null\n\n // map fields\n if (field.map) { gen\n (\"if(!util.isObject(%s))\", ref)\n (\"return%j\", invalid(field, \"object\"))\n (\"var k=Object.keys(%s)\", ref)\n (\"for(var i=0;i}\n * @const\n */\nvar wrappers = exports;\n\nvar Message = require(\"./message\");\n\n/**\n * From object converter part of an {@link IWrapper}.\n * @typedef WrapperFromObjectConverter\n * @type {function}\n * @param {Object.} object Plain object\n * @returns {Message<{}>} Message instance\n * @this Type\n */\n\n/**\n * To object converter part of an {@link IWrapper}.\n * @typedef WrapperToObjectConverter\n * @type {function}\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @this Type\n */\n\n/**\n * Common type wrapper part of {@link wrappers}.\n * @interface IWrapper\n * @property {WrapperFromObjectConverter} [fromObject] From object converter\n * @property {WrapperToObjectConverter} [toObject] To object converter\n */\n\n// Custom wrapper for Any\nwrappers[\".google.protobuf.Any\"] = {\n\n fromObject: function(object) {\n\n // unwrap value type if mapped\n if (object && object[\"@type\"]) {\n // Only use fully qualified type name after the last '/'\n var name = object[\"@type\"].substring(object[\"@type\"].lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type) {\n // type_url does not accept leading \".\"\n var type_url = object[\"@type\"].charAt(0) === \".\" ?\n object[\"@type\"].slice(1) : object[\"@type\"];\n // type_url prefix is optional, but path seperator is required\n if (type_url.indexOf(\"/\") === -1) {\n type_url = \"/\" + type_url;\n }\n return this.create({\n type_url: type_url,\n value: type.encode(type.fromObject(object)).finish()\n });\n }\n }\n\n return this.fromObject(object);\n },\n\n toObject: function(message, options) {\n\n // Default prefix\n var googleApi = \"type.googleapis.com/\";\n var prefix = \"\";\n var name = \"\";\n\n // decode value if requested and unmapped\n if (options && options.json && message.type_url && message.value) {\n // Only use fully qualified type name after the last '/'\n name = message.type_url.substring(message.type_url.lastIndexOf(\"/\") + 1);\n // Separate the prefix used\n prefix = message.type_url.substring(0, message.type_url.lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type)\n message = type.decode(message.value);\n }\n\n // wrap value if unmapped\n if (!(message instanceof this.ctor) && message instanceof Message) {\n var object = message.$type.toObject(message, options);\n var messageName = message.$type.fullName[0] === \".\" ?\n message.$type.fullName.slice(1) : message.$type.fullName;\n // Default to type.googleapis.com prefix if no prefix is used\n if (prefix === \"\") {\n prefix = googleApi;\n }\n name = prefix + messageName;\n object[\"@type\"] = name;\n return object;\n }\n\n return this.toObject(message, options);\n }\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(\"./writer\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n","\"use strict\";\n/**\n * @license\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst camelCase = require(\"lodash.camelcase\");\nconst Protobuf = require(\"protobufjs\");\nconst descriptor = require(\"protobufjs/ext/descriptor\");\nconst util_1 = require(\"./util\");\nfunction isAnyExtension(obj) {\n return ('@type' in obj) && (typeof obj['@type'] === 'string');\n}\nexports.isAnyExtension = isAnyExtension;\nconst descriptorOptions = {\n longs: String,\n enums: String,\n bytes: String,\n defaults: true,\n oneofs: true,\n json: true,\n};\nfunction joinName(baseName, name) {\n if (baseName === '') {\n return name;\n }\n else {\n return baseName + '.' + name;\n }\n}\nfunction isHandledReflectionObject(obj) {\n return (obj instanceof Protobuf.Service ||\n obj instanceof Protobuf.Type ||\n obj instanceof Protobuf.Enum);\n}\nfunction isNamespaceBase(obj) {\n return obj instanceof Protobuf.Namespace || obj instanceof Protobuf.Root;\n}\nfunction getAllHandledReflectionObjects(obj, parentName) {\n const objName = joinName(parentName, obj.name);\n if (isHandledReflectionObject(obj)) {\n return [[objName, obj]];\n }\n else {\n if (isNamespaceBase(obj) && typeof obj.nested !== 'undefined') {\n return Object.keys(obj.nested)\n .map(name => {\n return getAllHandledReflectionObjects(obj.nested[name], objName);\n })\n .reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);\n }\n }\n return [];\n}\nfunction createDeserializer(cls, options) {\n return function deserialize(argBuf) {\n return cls.toObject(cls.decode(argBuf), options);\n };\n}\nfunction createSerializer(cls) {\n return function serialize(arg) {\n if (Array.isArray(arg)) {\n throw new Error(`Failed to serialize message: expected object with ${cls.name} structure, got array instead`);\n }\n const message = cls.fromObject(arg);\n return cls.encode(message).finish();\n };\n}\nfunction createMethodDefinition(method, serviceName, options, fileDescriptors) {\n /* This is only ever called after the corresponding root.resolveAll(), so we\n * can assume that the resolved request and response types are non-null */\n const requestType = method.resolvedRequestType;\n const responseType = method.resolvedResponseType;\n return {\n path: '/' + serviceName + '/' + method.name,\n requestStream: !!method.requestStream,\n responseStream: !!method.responseStream,\n requestSerialize: createSerializer(requestType),\n requestDeserialize: createDeserializer(requestType, options),\n responseSerialize: createSerializer(responseType),\n responseDeserialize: createDeserializer(responseType, options),\n // TODO(murgatroid99): Find a better way to handle this\n originalName: camelCase(method.name),\n requestType: createMessageDefinition(requestType, fileDescriptors),\n responseType: createMessageDefinition(responseType, fileDescriptors),\n };\n}\nfunction createServiceDefinition(service, name, options, fileDescriptors) {\n const def = {};\n for (const method of service.methodsArray) {\n def[method.name] = createMethodDefinition(method, name, options, fileDescriptors);\n }\n return def;\n}\nfunction createMessageDefinition(message, fileDescriptors) {\n const messageDescriptor = message.toDescriptor('proto3');\n return {\n format: 'Protocol Buffer 3 DescriptorProto',\n type: messageDescriptor.$type.toObject(messageDescriptor, descriptorOptions),\n fileDescriptorProtos: fileDescriptors,\n };\n}\nfunction createEnumDefinition(enumType, fileDescriptors) {\n const enumDescriptor = enumType.toDescriptor('proto3');\n return {\n format: 'Protocol Buffer 3 EnumDescriptorProto',\n type: enumDescriptor.$type.toObject(enumDescriptor, descriptorOptions),\n fileDescriptorProtos: fileDescriptors,\n };\n}\n/**\n * function createDefinition(obj: Protobuf.Service, name: string, options:\n * Options): ServiceDefinition; function createDefinition(obj: Protobuf.Type,\n * name: string, options: Options): MessageTypeDefinition; function\n * createDefinition(obj: Protobuf.Enum, name: string, options: Options):\n * EnumTypeDefinition;\n */\nfunction createDefinition(obj, name, options, fileDescriptors) {\n if (obj instanceof Protobuf.Service) {\n return createServiceDefinition(obj, name, options, fileDescriptors);\n }\n else if (obj instanceof Protobuf.Type) {\n return createMessageDefinition(obj, fileDescriptors);\n }\n else if (obj instanceof Protobuf.Enum) {\n return createEnumDefinition(obj, fileDescriptors);\n }\n else {\n throw new Error('Type mismatch in reflection object handling');\n }\n}\nfunction createPackageDefinition(root, options) {\n const def = {};\n root.resolveAll();\n const descriptorList = root.toDescriptor('proto3').file;\n const bufferList = descriptorList.map(value => Buffer.from(descriptor.FileDescriptorProto.encode(value).finish()));\n for (const [name, obj] of getAllHandledReflectionObjects(root, '')) {\n def[name] = createDefinition(obj, name, options, bufferList);\n }\n return def;\n}\nfunction createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options) {\n options = options || {};\n const root = Protobuf.Root.fromDescriptor(decodedDescriptorSet);\n root.resolveAll();\n return createPackageDefinition(root, options);\n}\n/**\n * Load a .proto file with the specified options.\n * @param filename One or multiple file paths to load. Can be an absolute path\n * or relative to an include path.\n * @param options.keepCase Preserve field names. The default is to change them\n * to camel case.\n * @param options.longs The type that should be used to represent `long` values.\n * Valid options are `Number` and `String`. Defaults to a `Long` object type\n * from a library.\n * @param options.enums The type that should be used to represent `enum` values.\n * The only valid option is `String`. Defaults to the numeric value.\n * @param options.bytes The type that should be used to represent `bytes`\n * values. Valid options are `Array` and `String`. The default is to use\n * `Buffer`.\n * @param options.defaults Set default values on output objects. Defaults to\n * `false`.\n * @param options.arrays Set empty arrays for missing array values even if\n * `defaults` is `false`. Defaults to `false`.\n * @param options.objects Set empty objects for missing object values even if\n * `defaults` is `false`. Defaults to `false`.\n * @param options.oneofs Set virtual oneof properties to the present field's\n * name\n * @param options.json Represent Infinity and NaN as strings in float fields,\n * and automatically decode google.protobuf.Any values.\n * @param options.includeDirs Paths to search for imported `.proto` files.\n */\nfunction load(filename, options) {\n return util_1.loadProtosWithOptions(filename, options).then(loadedRoot => {\n return createPackageDefinition(loadedRoot, options);\n });\n}\nexports.load = load;\nfunction loadSync(filename, options) {\n const loadedRoot = util_1.loadProtosWithOptionsSync(filename, options);\n return createPackageDefinition(loadedRoot, options);\n}\nexports.loadSync = loadSync;\nfunction fromJSON(json, options) {\n options = options || {};\n const loadedRoot = Protobuf.Root.fromJSON(json);\n loadedRoot.resolveAll();\n return createPackageDefinition(loadedRoot, options);\n}\nexports.fromJSON = fromJSON;\nfunction loadFileDescriptorSetFromBuffer(descriptorSet, options) {\n const decodedDescriptorSet = descriptor.FileDescriptorSet.decode(descriptorSet);\n return createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options);\n}\nexports.loadFileDescriptorSetFromBuffer = loadFileDescriptorSetFromBuffer;\nfunction loadFileDescriptorSetFromObject(descriptorSet, options) {\n const decodedDescriptorSet = descriptor.FileDescriptorSet.fromObject(descriptorSet);\n return createPackageDefinitionFromDescriptorSet(decodedDescriptorSet, options);\n}\nexports.loadFileDescriptorSetFromObject = loadFileDescriptorSetFromObject;\nutil_1.addCommonProtos();\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @license\n * Copyright 2018 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst Protobuf = require(\"protobufjs\");\nfunction addIncludePathResolver(root, includePaths) {\n const originalResolvePath = root.resolvePath;\n root.resolvePath = (origin, target) => {\n if (path.isAbsolute(target)) {\n return target;\n }\n for (const directory of includePaths) {\n const fullPath = path.join(directory, target);\n try {\n fs.accessSync(fullPath, fs.constants.R_OK);\n return fullPath;\n }\n catch (err) {\n continue;\n }\n }\n process.emitWarning(`${target} not found in any of the include paths ${includePaths}`);\n return originalResolvePath(origin, target);\n };\n}\nasync function loadProtosWithOptions(filename, options) {\n const root = new Protobuf.Root();\n options = options || {};\n if (!!options.includeDirs) {\n if (!Array.isArray(options.includeDirs)) {\n return Promise.reject(new Error('The includeDirs option must be an array'));\n }\n addIncludePathResolver(root, options.includeDirs);\n }\n const loadedRoot = await root.load(filename, options);\n loadedRoot.resolveAll();\n return loadedRoot;\n}\nexports.loadProtosWithOptions = loadProtosWithOptions;\nfunction loadProtosWithOptionsSync(filename, options) {\n const root = new Protobuf.Root();\n options = options || {};\n if (!!options.includeDirs) {\n if (!Array.isArray(options.includeDirs)) {\n throw new Error('The includeDirs option must be an array');\n }\n addIncludePathResolver(root, options.includeDirs);\n }\n const loadedRoot = root.loadSync(filename, options);\n loadedRoot.resolveAll();\n return loadedRoot;\n}\nexports.loadProtosWithOptionsSync = loadProtosWithOptionsSync;\n/**\n * Load Google's well-known proto files that aren't exposed by Protobuf.js.\n */\nfunction addCommonProtos() {\n // Protobuf.js exposes: any, duration, empty, field_mask, struct, timestamp,\n // and wrappers. compiler/plugin is excluded in Protobuf.js and here.\n // Using constant strings for compatibility with tools like Webpack\n const apiDescriptor = require('protobufjs/google/protobuf/api.json');\n const descriptorDescriptor = require('protobufjs/google/protobuf/descriptor.json');\n const sourceContextDescriptor = require('protobufjs/google/protobuf/source_context.json');\n const typeDescriptor = require('protobufjs/google/protobuf/type.json');\n Protobuf.common('api', apiDescriptor.nested.google.nested.protobuf.nested);\n Protobuf.common('descriptor', descriptorDescriptor.nested.google.nested.protobuf.nested);\n Protobuf.common('source_context', sourceContextDescriptor.nested.google.nested.protobuf.nested);\n Protobuf.common('type', typeDescriptor.nested.google.nested.protobuf.nested);\n}\nexports.addCommonProtos = addCommonProtos;\n//# sourceMappingURL=util.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"t\", {\n value: true\n});\n\nclass TreeNode {\n constructor(t, e, s = 1) {\n this.i = undefined;\n this.h = undefined;\n this.o = undefined;\n this.u = t;\n this.l = e;\n this.p = s;\n }\n I() {\n let t = this;\n const e = t.o.o === t;\n if (e && t.p === 1) {\n t = t.h;\n } else if (t.i) {\n t = t.i;\n while (t.h) {\n t = t.h;\n }\n } else {\n if (e) {\n return t.o;\n }\n let s = t.o;\n while (s.i === t) {\n t = s;\n s = t.o;\n }\n t = s;\n }\n return t;\n }\n B() {\n let t = this;\n if (t.h) {\n t = t.h;\n while (t.i) {\n t = t.i;\n }\n return t;\n } else {\n let e = t.o;\n while (e.h === t) {\n t = e;\n e = t.o;\n }\n if (t.h !== e) {\n return e;\n } else return t;\n }\n }\n _() {\n const t = this.o;\n const e = this.h;\n const s = e.i;\n if (t.o === this) t.o = e; else if (t.i === this) t.i = e; else t.h = e;\n e.o = t;\n e.i = this;\n this.o = e;\n this.h = s;\n if (s) s.o = this;\n return e;\n }\n g() {\n const t = this.o;\n const e = this.i;\n const s = e.h;\n if (t.o === this) t.o = e; else if (t.i === this) t.i = e; else t.h = e;\n e.o = t;\n e.h = this;\n this.o = e;\n this.i = s;\n if (s) s.o = this;\n return e;\n }\n}\n\nclass TreeNodeEnableIndex extends TreeNode {\n constructor() {\n super(...arguments);\n this.M = 1;\n }\n _() {\n const t = super._();\n this.O();\n t.O();\n return t;\n }\n g() {\n const t = super.g();\n this.O();\n t.O();\n return t;\n }\n O() {\n this.M = 1;\n if (this.i) {\n this.M += this.i.M;\n }\n if (this.h) {\n this.M += this.h.M;\n }\n }\n}\n\nclass ContainerIterator {\n constructor(t = 0) {\n this.iteratorType = t;\n }\n equals(t) {\n return this.T === t.T;\n }\n}\n\nclass Base {\n constructor() {\n this.m = 0;\n }\n get length() {\n return this.m;\n }\n size() {\n return this.m;\n }\n empty() {\n return this.m === 0;\n }\n}\n\nclass Container extends Base {}\n\nfunction throwIteratorAccessError() {\n throw new RangeError(\"Iterator access denied!\");\n}\n\nclass TreeContainer extends Container {\n constructor(t = function(t, e) {\n if (t < e) return -1;\n if (t > e) return 1;\n return 0;\n }, e = false) {\n super();\n this.v = undefined;\n this.A = t;\n this.enableIndex = e;\n this.N = e ? TreeNodeEnableIndex : TreeNode;\n this.C = new this.N;\n }\n R(t, e) {\n let s = this.C;\n while (t) {\n const i = this.A(t.u, e);\n if (i < 0) {\n t = t.h;\n } else if (i > 0) {\n s = t;\n t = t.i;\n } else return t;\n }\n return s;\n }\n K(t, e) {\n let s = this.C;\n while (t) {\n const i = this.A(t.u, e);\n if (i <= 0) {\n t = t.h;\n } else {\n s = t;\n t = t.i;\n }\n }\n return s;\n }\n L(t, e) {\n let s = this.C;\n while (t) {\n const i = this.A(t.u, e);\n if (i < 0) {\n s = t;\n t = t.h;\n } else if (i > 0) {\n t = t.i;\n } else return t;\n }\n return s;\n }\n k(t, e) {\n let s = this.C;\n while (t) {\n const i = this.A(t.u, e);\n if (i < 0) {\n s = t;\n t = t.h;\n } else {\n t = t.i;\n }\n }\n return s;\n }\n P(t) {\n while (true) {\n const e = t.o;\n if (e === this.C) return;\n if (t.p === 1) {\n t.p = 0;\n return;\n }\n if (t === e.i) {\n const s = e.h;\n if (s.p === 1) {\n s.p = 0;\n e.p = 1;\n if (e === this.v) {\n this.v = e._();\n } else e._();\n } else {\n if (s.h && s.h.p === 1) {\n s.p = e.p;\n e.p = 0;\n s.h.p = 0;\n if (e === this.v) {\n this.v = e._();\n } else e._();\n return;\n } else if (s.i && s.i.p === 1) {\n s.p = 1;\n s.i.p = 0;\n s.g();\n } else {\n s.p = 1;\n t = e;\n }\n }\n } else {\n const s = e.i;\n if (s.p === 1) {\n s.p = 0;\n e.p = 1;\n if (e === this.v) {\n this.v = e.g();\n } else e.g();\n } else {\n if (s.i && s.i.p === 1) {\n s.p = e.p;\n e.p = 0;\n s.i.p = 0;\n if (e === this.v) {\n this.v = e.g();\n } else e.g();\n return;\n } else if (s.h && s.h.p === 1) {\n s.p = 1;\n s.h.p = 0;\n s._();\n } else {\n s.p = 1;\n t = e;\n }\n }\n }\n }\n }\n S(t) {\n if (this.m === 1) {\n this.clear();\n return;\n }\n let e = t;\n while (e.i || e.h) {\n if (e.h) {\n e = e.h;\n while (e.i) e = e.i;\n } else {\n e = e.i;\n }\n const s = t.u;\n t.u = e.u;\n e.u = s;\n const i = t.l;\n t.l = e.l;\n e.l = i;\n t = e;\n }\n if (this.C.i === e) {\n this.C.i = e.o;\n } else if (this.C.h === e) {\n this.C.h = e.o;\n }\n this.P(e);\n let s = e.o;\n if (e === s.i) {\n s.i = undefined;\n } else s.h = undefined;\n this.m -= 1;\n this.v.p = 0;\n if (this.enableIndex) {\n while (s !== this.C) {\n s.M -= 1;\n s = s.o;\n }\n }\n }\n U(t) {\n const e = typeof t === \"number\" ? t : undefined;\n const s = typeof t === \"function\" ? t : undefined;\n const i = typeof t === \"undefined\" ? [] : undefined;\n let r = 0;\n let n = this.v;\n const h = [];\n while (h.length || n) {\n if (n) {\n h.push(n);\n n = n.i;\n } else {\n n = h.pop();\n if (r === e) return n;\n i && i.push(n);\n s && s(n, r, this);\n r += 1;\n n = n.h;\n }\n }\n return i;\n }\n j(t) {\n while (true) {\n const e = t.o;\n if (e.p === 0) return;\n const s = e.o;\n if (e === s.i) {\n const i = s.h;\n if (i && i.p === 1) {\n i.p = e.p = 0;\n if (s === this.v) return;\n s.p = 1;\n t = s;\n continue;\n } else if (t === e.h) {\n t.p = 0;\n if (t.i) {\n t.i.o = e;\n }\n if (t.h) {\n t.h.o = s;\n }\n e.h = t.i;\n s.i = t.h;\n t.i = e;\n t.h = s;\n if (s === this.v) {\n this.v = t;\n this.C.o = t;\n } else {\n const e = s.o;\n if (e.i === s) {\n e.i = t;\n } else e.h = t;\n }\n t.o = s.o;\n e.o = t;\n s.o = t;\n s.p = 1;\n } else {\n e.p = 0;\n if (s === this.v) {\n this.v = s.g();\n } else s.g();\n s.p = 1;\n return;\n }\n } else {\n const i = s.i;\n if (i && i.p === 1) {\n i.p = e.p = 0;\n if (s === this.v) return;\n s.p = 1;\n t = s;\n continue;\n } else if (t === e.i) {\n t.p = 0;\n if (t.i) {\n t.i.o = s;\n }\n if (t.h) {\n t.h.o = e;\n }\n s.h = t.i;\n e.i = t.h;\n t.i = s;\n t.h = e;\n if (s === this.v) {\n this.v = t;\n this.C.o = t;\n } else {\n const e = s.o;\n if (e.i === s) {\n e.i = t;\n } else e.h = t;\n }\n t.o = s.o;\n e.o = t;\n s.o = t;\n s.p = 1;\n } else {\n e.p = 0;\n if (s === this.v) {\n this.v = s._();\n } else s._();\n s.p = 1;\n return;\n }\n }\n if (this.enableIndex) {\n e.O();\n s.O();\n t.O();\n }\n return;\n }\n }\n q(t, e, s) {\n if (this.v === undefined) {\n this.m += 1;\n this.v = new this.N(t, e, 0);\n this.v.o = this.C;\n this.C.o = this.C.i = this.C.h = this.v;\n return this.m;\n }\n let i;\n const r = this.C.i;\n const n = this.A(r.u, t);\n if (n === 0) {\n r.l = e;\n return this.m;\n } else if (n > 0) {\n r.i = new this.N(t, e);\n r.i.o = r;\n i = r.i;\n this.C.i = i;\n } else {\n const r = this.C.h;\n const n = this.A(r.u, t);\n if (n === 0) {\n r.l = e;\n return this.m;\n } else if (n < 0) {\n r.h = new this.N(t, e);\n r.h.o = r;\n i = r.h;\n this.C.h = i;\n } else {\n if (s !== undefined) {\n const r = s.T;\n if (r !== this.C) {\n const s = this.A(r.u, t);\n if (s === 0) {\n r.l = e;\n return this.m;\n } else if (s > 0) {\n const s = r.I();\n const n = this.A(s.u, t);\n if (n === 0) {\n s.l = e;\n return this.m;\n } else if (n < 0) {\n i = new this.N(t, e);\n if (s.h === undefined) {\n s.h = i;\n i.o = s;\n } else {\n r.i = i;\n i.o = r;\n }\n }\n }\n }\n }\n if (i === undefined) {\n i = this.v;\n while (true) {\n const s = this.A(i.u, t);\n if (s > 0) {\n if (i.i === undefined) {\n i.i = new this.N(t, e);\n i.i.o = i;\n i = i.i;\n break;\n }\n i = i.i;\n } else if (s < 0) {\n if (i.h === undefined) {\n i.h = new this.N(t, e);\n i.h.o = i;\n i = i.h;\n break;\n }\n i = i.h;\n } else {\n i.l = e;\n return this.m;\n }\n }\n }\n }\n }\n if (this.enableIndex) {\n let t = i.o;\n while (t !== this.C) {\n t.M += 1;\n t = t.o;\n }\n }\n this.j(i);\n this.m += 1;\n return this.m;\n }\n H(t, e) {\n while (t) {\n const s = this.A(t.u, e);\n if (s < 0) {\n t = t.h;\n } else if (s > 0) {\n t = t.i;\n } else return t;\n }\n return t || this.C;\n }\n clear() {\n this.m = 0;\n this.v = undefined;\n this.C.o = undefined;\n this.C.i = this.C.h = undefined;\n }\n updateKeyByIterator(t, e) {\n const s = t.T;\n if (s === this.C) {\n throwIteratorAccessError();\n }\n if (this.m === 1) {\n s.u = e;\n return true;\n }\n const i = s.B().u;\n if (s === this.C.i) {\n if (this.A(i, e) > 0) {\n s.u = e;\n return true;\n }\n return false;\n }\n const r = s.I().u;\n if (s === this.C.h) {\n if (this.A(r, e) < 0) {\n s.u = e;\n return true;\n }\n return false;\n }\n if (this.A(r, e) >= 0 || this.A(i, e) <= 0) return false;\n s.u = e;\n return true;\n }\n eraseElementByPos(t) {\n if (t < 0 || t > this.m - 1) {\n throw new RangeError;\n }\n const e = this.U(t);\n this.S(e);\n return this.m;\n }\n eraseElementByKey(t) {\n if (this.m === 0) return false;\n const e = this.H(this.v, t);\n if (e === this.C) return false;\n this.S(e);\n return true;\n }\n eraseElementByIterator(t) {\n const e = t.T;\n if (e === this.C) {\n throwIteratorAccessError();\n }\n const s = e.h === undefined;\n const i = t.iteratorType === 0;\n if (i) {\n if (s) t.next();\n } else {\n if (!s || e.i === undefined) t.next();\n }\n this.S(e);\n return t;\n }\n getHeight() {\n if (this.m === 0) return 0;\n function traversal(t) {\n if (!t) return 0;\n return Math.max(traversal(t.i), traversal(t.h)) + 1;\n }\n return traversal(this.v);\n }\n}\n\nclass TreeIterator extends ContainerIterator {\n constructor(t, e, s) {\n super(s);\n this.T = t;\n this.C = e;\n if (this.iteratorType === 0) {\n this.pre = function() {\n if (this.T === this.C.i) {\n throwIteratorAccessError();\n }\n this.T = this.T.I();\n return this;\n };\n this.next = function() {\n if (this.T === this.C) {\n throwIteratorAccessError();\n }\n this.T = this.T.B();\n return this;\n };\n } else {\n this.pre = function() {\n if (this.T === this.C.h) {\n throwIteratorAccessError();\n }\n this.T = this.T.B();\n return this;\n };\n this.next = function() {\n if (this.T === this.C) {\n throwIteratorAccessError();\n }\n this.T = this.T.I();\n return this;\n };\n }\n }\n get index() {\n let t = this.T;\n const e = this.C.o;\n if (t === this.C) {\n if (e) {\n return e.M - 1;\n }\n return 0;\n }\n let s = 0;\n if (t.i) {\n s += t.i.M;\n }\n while (t !== e) {\n const e = t.o;\n if (t === e.h) {\n s += 1;\n if (e.i) {\n s += e.i.M;\n }\n }\n t = e;\n }\n return s;\n }\n isAccessible() {\n return this.T !== this.C;\n }\n}\n\nclass OrderedMapIterator extends TreeIterator {\n constructor(t, e, s, i) {\n super(t, e, i);\n this.container = s;\n }\n get pointer() {\n if (this.T === this.C) {\n throwIteratorAccessError();\n }\n const t = this;\n return new Proxy([], {\n get(e, s) {\n if (s === \"0\") return t.T.u; else if (s === \"1\") return t.T.l;\n e[0] = t.T.u;\n e[1] = t.T.l;\n return e[s];\n },\n set(e, s, i) {\n if (s !== \"1\") {\n throw new TypeError(\"prop must be 1\");\n }\n t.T.l = i;\n return true;\n }\n });\n }\n copy() {\n return new OrderedMapIterator(this.T, this.C, this.container, this.iteratorType);\n }\n}\n\nclass OrderedMap extends TreeContainer {\n constructor(t = [], e, s) {\n super(e, s);\n const i = this;\n t.forEach((function(t) {\n i.setElement(t[0], t[1]);\n }));\n }\n begin() {\n return new OrderedMapIterator(this.C.i || this.C, this.C, this);\n }\n end() {\n return new OrderedMapIterator(this.C, this.C, this);\n }\n rBegin() {\n return new OrderedMapIterator(this.C.h || this.C, this.C, this, 1);\n }\n rEnd() {\n return new OrderedMapIterator(this.C, this.C, this, 1);\n }\n front() {\n if (this.m === 0) return;\n const t = this.C.i;\n return [ t.u, t.l ];\n }\n back() {\n if (this.m === 0) return;\n const t = this.C.h;\n return [ t.u, t.l ];\n }\n lowerBound(t) {\n const e = this.R(this.v, t);\n return new OrderedMapIterator(e, this.C, this);\n }\n upperBound(t) {\n const e = this.K(this.v, t);\n return new OrderedMapIterator(e, this.C, this);\n }\n reverseLowerBound(t) {\n const e = this.L(this.v, t);\n return new OrderedMapIterator(e, this.C, this);\n }\n reverseUpperBound(t) {\n const e = this.k(this.v, t);\n return new OrderedMapIterator(e, this.C, this);\n }\n forEach(t) {\n this.U((function(e, s, i) {\n t([ e.u, e.l ], s, i);\n }));\n }\n setElement(t, e, s) {\n return this.q(t, e, s);\n }\n getElementByPos(t) {\n if (t < 0 || t > this.m - 1) {\n throw new RangeError;\n }\n const e = this.U(t);\n return [ e.u, e.l ];\n }\n find(t) {\n const e = this.H(this.v, t);\n return new OrderedMapIterator(e, this.C, this);\n }\n getElementByKey(t) {\n const e = this.H(this.v, t);\n return e.l;\n }\n union(t) {\n const e = this;\n t.forEach((function(t) {\n e.setElement(t[0], t[1]);\n }));\n return this.m;\n }\n * [Symbol.iterator]() {\n const t = this.m;\n const e = this.U();\n for (let s = 0; s < t; ++s) {\n const t = e[s];\n yield [ t.u, t.l ];\n }\n }\n}\n\nexports.OrderedMap = OrderedMap;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n createTokenAuth: () => createTokenAuth\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/auth.js\nvar REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nvar REGEX_IS_INSTALLATION = /^ghs_/;\nvar REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token,\n tokenType\n };\n}\n\n// pkg/dist-src/with-authorization-prefix.js\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n\n// pkg/dist-src/hook.js\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(\n route,\n parameters\n );\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\n// pkg/dist-src/index.js\nvar createTokenAuth = function createTokenAuth2(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\n \"[@octokit/auth-token] Token passed to createTokenAuth is not a string\"\n );\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n createTokenAuth\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n Octokit: () => Octokit\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_universal_user_agent = require(\"universal-user-agent\");\nvar import_before_after_hook = require(\"before-after-hook\");\nvar import_request = require(\"@octokit/request\");\nvar import_graphql = require(\"@octokit/graphql\");\nvar import_auth_token = require(\"@octokit/auth-token\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"5.2.0\";\n\n// pkg/dist-src/index.js\nvar noop = () => {\n};\nvar consoleWarn = console.warn.bind(console);\nvar consoleError = console.error.bind(console);\nvar userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar Octokit = class {\n static {\n this.VERSION = VERSION;\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(\n Object.assign(\n {},\n defaults,\n options,\n options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null\n )\n );\n }\n };\n return OctokitWithDefaults;\n }\n static {\n this.plugins = [];\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n const currentPlugins = this.plugins;\n const NewOctokit = class extends this {\n static {\n this.plugins = currentPlugins.concat(\n newPlugins.filter((plugin) => !currentPlugins.includes(plugin))\n );\n }\n };\n return NewOctokit;\n }\n constructor(options = {}) {\n const hook = new import_before_after_hook.Collection();\n const requestDefaults = {\n baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n };\n requestDefaults.headers[\"user-agent\"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = import_request.request.defaults(requestDefaults);\n this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);\n this.log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: consoleWarn,\n error: consoleError\n },\n options.log\n );\n this.hook = hook;\n if (!options.authStrategy) {\n if (!options.auth) {\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n const auth = (0, import_auth_token.createTokenAuth)(options.auth);\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(\n Object.assign(\n {\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n },\n options.auth\n )\n );\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n const classConstructor = this.constructor;\n for (let i = 0; i < classConstructor.plugins.length; ++i) {\n Object.assign(this, classConstructor.plugins[i](this, options));\n }\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Octokit\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n endpoint: () => endpoint\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/defaults.js\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.0.5\";\n\n// pkg/dist-src/defaults.js\nvar userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\"\n }\n};\n\n// pkg/dist-src/util/lowercase-keys.js\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\n// pkg/dist-src/util/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/util/merge-deep.js\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n\n// pkg/dist-src/util/remove-undefined-properties.js\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === void 0) {\n delete obj[key];\n }\n }\n return obj;\n}\n\n// pkg/dist-src/merge.js\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n } else {\n options = Object.assign({}, route);\n }\n options.headers = lowercaseKeys(options.headers);\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n if (options.url === \"/graphql\") {\n if (defaults && defaults.mediaType.previews?.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(\n (preview) => !mergedOptions.mediaType.previews.includes(preview)\n ).concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, \"\"));\n }\n return mergedOptions;\n}\n\n// pkg/dist-src/util/add-query-parameters.js\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return url + separator + names.map((name) => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\n// pkg/dist-src/util/extract-url-variable-names.js\nvar urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nfunction extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n\n// pkg/dist-src/util/omit.js\nfunction omit(object, keysToOmit) {\n const result = { __proto__: null };\n for (const key of Object.keys(object)) {\n if (keysToOmit.indexOf(key) === -1) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// pkg/dist-src/util/url-template.js\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n }).join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== void 0 && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(\n encodeValue(operator, value, isKeyOperator(operator) ? key : \"\")\n );\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n result.push(\n encodeValue(operator, value2, isKeyOperator(operator) ? key : \"\")\n );\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n tmp.push(encodeValue(operator, value2));\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n template = template.replace(\n /\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g,\n function(_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function(variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n }\n );\n if (template === \"/\") {\n return template;\n } else {\n return template.replace(/\\/$/, \"\");\n }\n}\n\n// pkg/dist-src/parse.js\nfunction parse(options) {\n let method = options.method.toUpperCase();\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n headers.accept = headers.accept.split(/,/).map(\n (format) => format.replace(\n /application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/,\n `application/vnd$1$2.${options.mediaType.format}`\n )\n ).join(\",\");\n }\n if (url.endsWith(\"/graphql\")) {\n if (options.mediaType.previews?.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n }\n }\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n return Object.assign(\n { method, url, headers },\n typeof body !== \"undefined\" ? { body } : null,\n options.request ? { request: options.request } : null\n );\n}\n\n// pkg/dist-src/endpoint-with-defaults.js\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS2 = merge(oldDefaults, newDefaults);\n const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);\n return Object.assign(endpoint2, {\n DEFAULTS: DEFAULTS2,\n defaults: withDefaults.bind(null, DEFAULTS2),\n merge: merge.bind(null, DEFAULTS2),\n parse\n });\n}\n\n// pkg/dist-src/index.js\nvar endpoint = withDefaults(null, DEFAULTS);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n endpoint\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n GraphqlResponseError: () => GraphqlResponseError,\n graphql: () => graphql2,\n withCustomRequest: () => withCustomRequest\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_request3 = require(\"@octokit/request\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"7.1.0\";\n\n// pkg/dist-src/with-defaults.js\nvar import_request2 = require(\"@octokit/request\");\n\n// pkg/dist-src/graphql.js\nvar import_request = require(\"@octokit/request\");\n\n// pkg/dist-src/error.js\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\n` + data.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n}\nvar GraphqlResponseError = class extends Error {\n constructor(request2, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request2;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n this.errors = response.errors;\n this.data = response.data;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n};\n\n// pkg/dist-src/graphql.js\nvar NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\"\n];\nvar FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nvar GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request2, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(\n new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`)\n );\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(\n new Error(\n `[@octokit/graphql] \"${key}\" cannot be used as variable name`\n )\n );\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(\n parsedOptions\n ).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request2(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(\n requestOptions,\n headers,\n response.data\n );\n }\n return response.data.data;\n });\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(request2, newDefaults) {\n const newRequest = request2.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint\n });\n}\n\n// pkg/dist-src/index.js\nvar graphql2 = withDefaults(import_request3.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n GraphqlResponseError,\n graphql,\n withCustomRequest\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n RequestError: () => RequestError\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_deprecation = require(\"deprecation\");\nvar import_once = __toESM(require(\"once\"));\nvar logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar RequestError = class extends Error {\n constructor(message, statusCode, options) {\n super(message);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(\n / .*$/,\n \" [REDACTED]\"\n )\n });\n }\n requestCopy.url = requestCopy.url.replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\").replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(\n new import_deprecation.Deprecation(\n \"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"\n )\n );\n return statusCode;\n }\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(\n new import_deprecation.Deprecation(\n \"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"\n )\n );\n return headers || {};\n }\n });\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestError\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n request: () => request\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_endpoint = require(\"@octokit/endpoint\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"8.4.0\";\n\n// pkg/dist-src/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/fetch-wrapper.js\nvar import_request_error = require(\"@octokit/request-error\");\n\n// pkg/dist-src/get-buffer-response.js\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\n// pkg/dist-src/fetch-wrapper.js\nfunction fetchWrapper(requestOptions) {\n var _a, _b, _c, _d;\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;\n if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n let { fetch } = globalThis;\n if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {\n fetch = requestOptions.request.fetch;\n }\n if (!fetch) {\n throw new Error(\n \"fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing\"\n );\n }\n return fetch(requestOptions.url, {\n method: requestOptions.method,\n body: requestOptions.body,\n redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,\n headers: requestOptions.headers,\n signal: (_d = requestOptions.request) == null ? void 0 : _d.signal,\n // duplex must be set if request.body is ReadableStream or Async Iterables.\n // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.\n ...requestOptions.body && { duplex: \"half\" }\n }).then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(\n `[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`\n );\n }\n if (status === 204 || status === 205) {\n return;\n }\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new import_request_error.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: void 0\n },\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new import_request_error.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new import_request_error.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n return parseSuccessResponseBody ? await getResponseData(response) : response.body;\n }).then((data) => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch((error) => {\n if (error instanceof import_request_error.RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n let message = error.message;\n if (error.name === \"TypeError\" && \"cause\" in error) {\n if (error.cause instanceof Error) {\n message = error.cause.message;\n } else if (typeof error.cause === \"string\") {\n message = error.cause;\n }\n }\n throw new import_request_error.RequestError(message, 500, {\n request: requestOptions\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json().catch(() => response.text()).catch(() => \"\");\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBufferResponse(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n let suffix;\n if (\"documentation_url\" in data) {\n suffix = ` - ${data.documentation_url}`;\n } else {\n suffix = \"\";\n }\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}${suffix}`;\n }\n return `${data.message}${suffix}`;\n }\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint2 = oldEndpoint.defaults(newDefaults);\n const newApi = function(route, parameters) {\n const endpointOptions = endpoint2.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint2.parse(endpointOptions));\n }\n const request2 = (route2, parameters2) => {\n return fetchWrapper(\n endpoint2.parse(endpoint2.merge(route2, parameters2))\n );\n };\n Object.assign(request2, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n return endpointOptions.request.hook(request2, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n}\n\n// pkg/dist-src/index.js\nvar request = withDefaults(import_endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n }\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n request\n});\n","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContextAPI = void 0;\nvar NoopContextManager_1 = require(\"../context/NoopContextManager\");\nvar global_utils_1 = require(\"../internal/global-utils\");\nvar diag_1 = require(\"./diag\");\nvar API_NAME = 'context';\nvar NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Context API\n */\nvar ContextAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function ContextAPI() {\n }\n /** Get the singleton instance of the Context API */\n ContextAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new ContextAPI();\n }\n return this._instance;\n };\n /**\n * Set the current context manager.\n *\n * @returns true if the context manager was successfully registered, else false\n */\n ContextAPI.prototype.setGlobalContextManager = function (contextManager) {\n return global_utils_1.registerGlobal(API_NAME, contextManager, diag_1.DiagAPI.instance());\n };\n /**\n * Get the currently active context\n */\n ContextAPI.prototype.active = function () {\n return this._getContextManager().active();\n };\n /**\n * Execute a function with an active context\n *\n * @param context context to be active during function execution\n * @param fn function to execute in a context\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n ContextAPI.prototype.with = function (context, fn, thisArg) {\n var _a;\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n return (_a = this._getContextManager()).with.apply(_a, __spreadArray([context, fn, thisArg], args));\n };\n /**\n * Bind a context to a target function or event emitter\n *\n * @param context context to bind to the event emitter or function. Defaults to the currently active context\n * @param target function or event emitter to bind\n */\n ContextAPI.prototype.bind = function (context, target) {\n return this._getContextManager().bind(context, target);\n };\n ContextAPI.prototype._getContextManager = function () {\n return global_utils_1.getGlobal(API_NAME) || NOOP_CONTEXT_MANAGER;\n };\n /** Disable and remove the global context manager */\n ContextAPI.prototype.disable = function () {\n this._getContextManager().disable();\n global_utils_1.unregisterGlobal(API_NAME, diag_1.DiagAPI.instance());\n };\n return ContextAPI;\n}());\nexports.ContextAPI = ContextAPI;\n//# sourceMappingURL=context.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagAPI = void 0;\nvar ComponentLogger_1 = require(\"../diag/ComponentLogger\");\nvar logLevelLogger_1 = require(\"../diag/internal/logLevelLogger\");\nvar types_1 = require(\"../diag/types\");\nvar global_utils_1 = require(\"../internal/global-utils\");\nvar API_NAME = 'diag';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry internal\n * diagnostic API\n */\nvar DiagAPI = /** @class */ (function () {\n /**\n * Private internal constructor\n * @private\n */\n function DiagAPI() {\n function _logProxy(funcName) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var logger = global_utils_1.getGlobal('diag');\n // shortcut if logger not set\n if (!logger)\n return;\n return logger[funcName].apply(logger, args);\n };\n }\n // Using self local variable for minification purposes as 'this' cannot be minified\n var self = this;\n // DiagAPI specific functions\n self.setLogger = function (logger, logLevel) {\n var _a, _b;\n if (logLevel === void 0) { logLevel = types_1.DiagLogLevel.INFO; }\n if (logger === self) {\n // There isn't much we can do here.\n // Logging to the console might break the user application.\n // Try to log to self. If a logger was previously registered it will receive the log.\n var err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');\n self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n return false;\n }\n var oldLogger = global_utils_1.getGlobal('diag');\n var newLogger = logLevelLogger_1.createLogLevelDiagLogger(logLevel, logger);\n // There already is an logger registered. We'll let it know before overwriting it.\n if (oldLogger) {\n var stack = (_b = new Error().stack) !== null && _b !== void 0 ? _b : '';\n oldLogger.warn(\"Current logger will be overwritten from \" + stack);\n newLogger.warn(\"Current logger will overwrite one already registered from \" + stack);\n }\n return global_utils_1.registerGlobal('diag', newLogger, self, true);\n };\n self.disable = function () {\n global_utils_1.unregisterGlobal(API_NAME, self);\n };\n self.createComponentLogger = function (options) {\n return new ComponentLogger_1.DiagComponentLogger(options);\n };\n self.verbose = _logProxy('verbose');\n self.debug = _logProxy('debug');\n self.info = _logProxy('info');\n self.warn = _logProxy('warn');\n self.error = _logProxy('error');\n }\n /** Get the singleton instance of the DiagAPI API */\n DiagAPI.instance = function () {\n if (!this._instance) {\n this._instance = new DiagAPI();\n }\n return this._instance;\n };\n return DiagAPI;\n}());\nexports.DiagAPI = DiagAPI;\n//# sourceMappingURL=diag.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PropagationAPI = void 0;\nvar global_utils_1 = require(\"../internal/global-utils\");\nvar NoopTextMapPropagator_1 = require(\"../propagation/NoopTextMapPropagator\");\nvar TextMapPropagator_1 = require(\"../propagation/TextMapPropagator\");\nvar context_helpers_1 = require(\"../baggage/context-helpers\");\nvar utils_1 = require(\"../baggage/utils\");\nvar diag_1 = require(\"./diag\");\nvar API_NAME = 'propagation';\nvar NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Propagation API\n */\nvar PropagationAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function PropagationAPI() {\n this.createBaggage = utils_1.createBaggage;\n this.getBaggage = context_helpers_1.getBaggage;\n this.setBaggage = context_helpers_1.setBaggage;\n this.deleteBaggage = context_helpers_1.deleteBaggage;\n }\n /** Get the singleton instance of the Propagator API */\n PropagationAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new PropagationAPI();\n }\n return this._instance;\n };\n /**\n * Set the current propagator.\n *\n * @returns true if the propagator was successfully registered, else false\n */\n PropagationAPI.prototype.setGlobalPropagator = function (propagator) {\n return global_utils_1.registerGlobal(API_NAME, propagator, diag_1.DiagAPI.instance());\n };\n /**\n * Inject context into a carrier to be propagated inter-process\n *\n * @param context Context carrying tracing data to inject\n * @param carrier carrier to inject context into\n * @param setter Function used to set values on the carrier\n */\n PropagationAPI.prototype.inject = function (context, carrier, setter) {\n if (setter === void 0) { setter = TextMapPropagator_1.defaultTextMapSetter; }\n return this._getGlobalPropagator().inject(context, carrier, setter);\n };\n /**\n * Extract context from a carrier\n *\n * @param context Context which the newly created context will inherit from\n * @param carrier Carrier to extract context from\n * @param getter Function used to extract keys from a carrier\n */\n PropagationAPI.prototype.extract = function (context, carrier, getter) {\n if (getter === void 0) { getter = TextMapPropagator_1.defaultTextMapGetter; }\n return this._getGlobalPropagator().extract(context, carrier, getter);\n };\n /**\n * Return a list of all fields which may be used by the propagator.\n */\n PropagationAPI.prototype.fields = function () {\n return this._getGlobalPropagator().fields();\n };\n /** Remove the global propagator */\n PropagationAPI.prototype.disable = function () {\n global_utils_1.unregisterGlobal(API_NAME, diag_1.DiagAPI.instance());\n };\n PropagationAPI.prototype._getGlobalPropagator = function () {\n return global_utils_1.getGlobal(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;\n };\n return PropagationAPI;\n}());\nexports.PropagationAPI = PropagationAPI;\n//# sourceMappingURL=propagation.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceAPI = void 0;\nvar global_utils_1 = require(\"../internal/global-utils\");\nvar ProxyTracerProvider_1 = require(\"../trace/ProxyTracerProvider\");\nvar spancontext_utils_1 = require(\"../trace/spancontext-utils\");\nvar context_utils_1 = require(\"../trace/context-utils\");\nvar diag_1 = require(\"./diag\");\nvar API_NAME = 'trace';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nvar TraceAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function TraceAPI() {\n this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();\n this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;\n this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;\n this.deleteSpan = context_utils_1.deleteSpan;\n this.getSpan = context_utils_1.getSpan;\n this.getSpanContext = context_utils_1.getSpanContext;\n this.setSpan = context_utils_1.setSpan;\n this.setSpanContext = context_utils_1.setSpanContext;\n }\n /** Get the singleton instance of the Trace API */\n TraceAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new TraceAPI();\n }\n return this._instance;\n };\n /**\n * Set the current global tracer.\n *\n * @returns true if the tracer provider was successfully registered, else false\n */\n TraceAPI.prototype.setGlobalTracerProvider = function (provider) {\n var success = global_utils_1.registerGlobal(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());\n if (success) {\n this._proxyTracerProvider.setDelegate(provider);\n }\n return success;\n };\n /**\n * Returns the global tracer provider.\n */\n TraceAPI.prototype.getTracerProvider = function () {\n return global_utils_1.getGlobal(API_NAME) || this._proxyTracerProvider;\n };\n /**\n * Returns a tracer from the global tracer provider.\n */\n TraceAPI.prototype.getTracer = function (name, version) {\n return this.getTracerProvider().getTracer(name, version);\n };\n /** Remove the global tracer provider */\n TraceAPI.prototype.disable = function () {\n global_utils_1.unregisterGlobal(API_NAME, diag_1.DiagAPI.instance());\n this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();\n };\n return TraceAPI;\n}());\nexports.TraceAPI = TraceAPI;\n//# sourceMappingURL=trace.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteBaggage = exports.setBaggage = exports.getBaggage = void 0;\nvar context_1 = require(\"../context/context\");\n/**\n * Baggage key\n */\nvar BAGGAGE_KEY = context_1.createContextKey('OpenTelemetry Baggage Key');\n/**\n * Retrieve the current baggage from the given context\n *\n * @param {Context} Context that manage all context values\n * @returns {Baggage} Extracted baggage from the context\n */\nfunction getBaggage(context) {\n return context.getValue(BAGGAGE_KEY) || undefined;\n}\nexports.getBaggage = getBaggage;\n/**\n * Store a baggage in the given context\n *\n * @param {Context} Context that manage all context values\n * @param {Baggage} baggage that will be set in the actual context\n */\nfunction setBaggage(context, baggage) {\n return context.setValue(BAGGAGE_KEY, baggage);\n}\nexports.setBaggage = setBaggage;\n/**\n * Delete the baggage stored in the given context\n *\n * @param {Context} Context that manage all context values\n */\nfunction deleteBaggage(context) {\n return context.deleteValue(BAGGAGE_KEY);\n}\nexports.deleteBaggage = deleteBaggage;\n//# sourceMappingURL=context-helpers.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaggageImpl = void 0;\nvar BaggageImpl = /** @class */ (function () {\n function BaggageImpl(entries) {\n this._entries = entries ? new Map(entries) : new Map();\n }\n BaggageImpl.prototype.getEntry = function (key) {\n var entry = this._entries.get(key);\n if (!entry) {\n return undefined;\n }\n return Object.assign({}, entry);\n };\n BaggageImpl.prototype.getAllEntries = function () {\n return Array.from(this._entries.entries()).map(function (_a) {\n var k = _a[0], v = _a[1];\n return [k, v];\n });\n };\n BaggageImpl.prototype.setEntry = function (key, entry) {\n var newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.set(key, entry);\n return newBaggage;\n };\n BaggageImpl.prototype.removeEntry = function (key) {\n var newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.delete(key);\n return newBaggage;\n };\n BaggageImpl.prototype.removeEntries = function () {\n var keys = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n keys[_i] = arguments[_i];\n }\n var newBaggage = new BaggageImpl(this._entries);\n for (var _a = 0, keys_1 = keys; _a < keys_1.length; _a++) {\n var key = keys_1[_a];\n newBaggage._entries.delete(key);\n }\n return newBaggage;\n };\n BaggageImpl.prototype.clear = function () {\n return new BaggageImpl();\n };\n return BaggageImpl;\n}());\nexports.BaggageImpl = BaggageImpl;\n//# sourceMappingURL=baggage-impl.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageEntryMetadataSymbol = void 0;\n/**\n * Symbol used to make BaggageEntryMetadata an opaque type\n */\nexports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata');\n//# sourceMappingURL=symbol.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageEntryMetadataFromString = exports.createBaggage = void 0;\nvar diag_1 = require(\"../api/diag\");\nvar baggage_impl_1 = require(\"./internal/baggage-impl\");\nvar symbol_1 = require(\"./internal/symbol\");\nvar diag = diag_1.DiagAPI.instance();\n/**\n * Create a new Baggage with optional entries\n *\n * @param entries An array of baggage entries the new baggage should contain\n */\nfunction createBaggage(entries) {\n if (entries === void 0) { entries = {}; }\n return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));\n}\nexports.createBaggage = createBaggage;\n/**\n * Create a serializable BaggageEntryMetadata object from a string.\n *\n * @param str string metadata. Format is currently not defined by the spec and has no special meaning.\n *\n */\nfunction baggageEntryMetadataFromString(str) {\n if (typeof str !== 'string') {\n diag.error(\"Cannot create baggage metadata from unknown type: \" + typeof str);\n str = '';\n }\n return {\n __TYPE__: symbol_1.baggageEntryMetadataSymbol,\n toString: function () {\n return str;\n },\n };\n}\nexports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=Attributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=Exception.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=Time.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopContextManager = void 0;\nvar context_1 = require(\"./context\");\nvar NoopContextManager = /** @class */ (function () {\n function NoopContextManager() {\n }\n NoopContextManager.prototype.active = function () {\n return context_1.ROOT_CONTEXT;\n };\n NoopContextManager.prototype.with = function (_context, fn, thisArg) {\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n return fn.call.apply(fn, __spreadArray([thisArg], args));\n };\n NoopContextManager.prototype.bind = function (_context, target) {\n return target;\n };\n NoopContextManager.prototype.enable = function () {\n return this;\n };\n NoopContextManager.prototype.disable = function () {\n return this;\n };\n return NoopContextManager;\n}());\nexports.NoopContextManager = NoopContextManager;\n//# sourceMappingURL=NoopContextManager.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ROOT_CONTEXT = exports.createContextKey = void 0;\n/** Get a key to uniquely identify a context value */\nfunction createContextKey(description) {\n // The specification states that for the same input, multiple calls should\n // return different keys. Due to the nature of the JS dependency management\n // system, this creates problems where multiple versions of some package\n // could hold different keys for the same property.\n //\n // Therefore, we use Symbol.for which returns the same key for the same input.\n return Symbol.for(description);\n}\nexports.createContextKey = createContextKey;\nvar BaseContext = /** @class */ (function () {\n /**\n * Construct a new context which inherits values from an optional parent context.\n *\n * @param parentContext a context from which to inherit values\n */\n function BaseContext(parentContext) {\n // for minification\n var self = this;\n self._currentContext = parentContext ? new Map(parentContext) : new Map();\n self.getValue = function (key) { return self._currentContext.get(key); };\n self.setValue = function (key, value) {\n var context = new BaseContext(self._currentContext);\n context._currentContext.set(key, value);\n return context;\n };\n self.deleteValue = function (key) {\n var context = new BaseContext(self._currentContext);\n context._currentContext.delete(key);\n return context;\n };\n }\n return BaseContext;\n}());\n/** The root context is used as the default parent context when there is no active context */\nexports.ROOT_CONTEXT = new BaseContext();\n//# sourceMappingURL=context.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagComponentLogger = void 0;\nvar global_utils_1 = require(\"../internal/global-utils\");\n/**\n * Component Logger which is meant to be used as part of any component which\n * will add automatically additional namespace in front of the log message.\n * It will then forward all message to global diag logger\n * @example\n * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n * cLogger.debug('test');\n * // @opentelemetry/instrumentation-http test\n */\nvar DiagComponentLogger = /** @class */ (function () {\n function DiagComponentLogger(props) {\n this._namespace = props.namespace || 'DiagComponentLogger';\n }\n DiagComponentLogger.prototype.debug = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('debug', this._namespace, args);\n };\n DiagComponentLogger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('error', this._namespace, args);\n };\n DiagComponentLogger.prototype.info = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('info', this._namespace, args);\n };\n DiagComponentLogger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('warn', this._namespace, args);\n };\n DiagComponentLogger.prototype.verbose = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('verbose', this._namespace, args);\n };\n return DiagComponentLogger;\n}());\nexports.DiagComponentLogger = DiagComponentLogger;\nfunction logProxy(funcName, namespace, args) {\n var logger = global_utils_1.getGlobal('diag');\n // shortcut if logger not set\n if (!logger) {\n return;\n }\n args.unshift(namespace);\n return logger[funcName].apply(logger, args);\n}\n//# sourceMappingURL=ComponentLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagConsoleLogger = void 0;\nvar consoleMap = [\n { n: 'error', c: 'error' },\n { n: 'warn', c: 'warn' },\n { n: 'info', c: 'info' },\n { n: 'debug', c: 'debug' },\n { n: 'verbose', c: 'trace' },\n];\n/**\n * A simple Immutable Console based diagnostic logger which will output any messages to the Console.\n * If you want to limit the amount of logging to a specific level or lower use the\n * {@link createLogLevelDiagLogger}\n */\nvar DiagConsoleLogger = /** @class */ (function () {\n function DiagConsoleLogger() {\n function _consoleFunc(funcName) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (console) {\n // Some environments only expose the console when the F12 developer console is open\n // eslint-disable-next-line no-console\n var theFunc = console[funcName];\n if (typeof theFunc !== 'function') {\n // Not all environments support all functions\n // eslint-disable-next-line no-console\n theFunc = console.log;\n }\n // One last final check\n if (typeof theFunc === 'function') {\n return theFunc.apply(console, args);\n }\n }\n };\n }\n for (var i = 0; i < consoleMap.length; i++) {\n this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);\n }\n }\n return DiagConsoleLogger;\n}());\nexports.DiagConsoleLogger = DiagConsoleLogger;\n//# sourceMappingURL=consoleLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./consoleLogger\"), exports);\n__exportStar(require(\"./types\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createLogLevelDiagLogger = void 0;\nvar types_1 = require(\"../types\");\nfunction createLogLevelDiagLogger(maxLevel, logger) {\n if (maxLevel < types_1.DiagLogLevel.NONE) {\n maxLevel = types_1.DiagLogLevel.NONE;\n }\n else if (maxLevel > types_1.DiagLogLevel.ALL) {\n maxLevel = types_1.DiagLogLevel.ALL;\n }\n // In case the logger is null or undefined\n logger = logger || {};\n function _filterFunc(funcName, theLevel) {\n var theFunc = logger[funcName];\n if (typeof theFunc === 'function' && maxLevel >= theLevel) {\n return theFunc.bind(logger);\n }\n return function () { };\n }\n return {\n error: _filterFunc('error', types_1.DiagLogLevel.ERROR),\n warn: _filterFunc('warn', types_1.DiagLogLevel.WARN),\n info: _filterFunc('info', types_1.DiagLogLevel.INFO),\n debug: _filterFunc('debug', types_1.DiagLogLevel.DEBUG),\n verbose: _filterFunc('verbose', types_1.DiagLogLevel.VERBOSE),\n };\n}\nexports.createLogLevelDiagLogger = createLogLevelDiagLogger;\n//# sourceMappingURL=logLevelLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagLogLevel = void 0;\n/**\n * Defines the available internal logging levels for the diagnostic logger, the numeric values\n * of the levels are defined to match the original values from the initial LogLevel to avoid\n * compatibility/migration issues for any implementation that assume the numeric ordering.\n */\nvar DiagLogLevel;\n(function (DiagLogLevel) {\n /** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n DiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n /** Identifies an error scenario */\n DiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n /** Identifies a warning scenario */\n DiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n /** General informational log message */\n DiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n /** General debug log message */\n DiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n /**\n * Detailed trace level logging should only be used for development, should only be set\n * in a development environment.\n */\n DiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n /** Used to set the logging level to include all logging */\n DiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.baggageEntryMetadataFromString = void 0;\n__exportStar(require(\"./baggage/types\"), exports);\nvar utils_1 = require(\"./baggage/utils\");\nObject.defineProperty(exports, \"baggageEntryMetadataFromString\", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });\n__exportStar(require(\"./common/Exception\"), exports);\n__exportStar(require(\"./common/Time\"), exports);\n__exportStar(require(\"./common/Attributes\"), exports);\n__exportStar(require(\"./diag\"), exports);\n__exportStar(require(\"./propagation/TextMapPropagator\"), exports);\n__exportStar(require(\"./trace/attributes\"), exports);\n__exportStar(require(\"./trace/link\"), exports);\n__exportStar(require(\"./trace/ProxyTracer\"), exports);\n__exportStar(require(\"./trace/ProxyTracerProvider\"), exports);\n__exportStar(require(\"./trace/Sampler\"), exports);\n__exportStar(require(\"./trace/SamplingResult\"), exports);\n__exportStar(require(\"./trace/span_context\"), exports);\n__exportStar(require(\"./trace/span_kind\"), exports);\n__exportStar(require(\"./trace/span\"), exports);\n__exportStar(require(\"./trace/SpanOptions\"), exports);\n__exportStar(require(\"./trace/status\"), exports);\n__exportStar(require(\"./trace/trace_flags\"), exports);\n__exportStar(require(\"./trace/trace_state\"), exports);\nvar utils_2 = require(\"./trace/internal/utils\");\nObject.defineProperty(exports, \"createTraceState\", { enumerable: true, get: function () { return utils_2.createTraceState; } });\n__exportStar(require(\"./trace/tracer_provider\"), exports);\n__exportStar(require(\"./trace/tracer\"), exports);\n__exportStar(require(\"./trace/tracer_options\"), exports);\nvar spancontext_utils_1 = require(\"./trace/spancontext-utils\");\nObject.defineProperty(exports, \"isSpanContextValid\", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });\nObject.defineProperty(exports, \"isValidTraceId\", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } });\nObject.defineProperty(exports, \"isValidSpanId\", { enumerable: true, get: function () { return spancontext_utils_1.isValidSpanId; } });\nvar invalid_span_constants_1 = require(\"./trace/invalid-span-constants\");\nObject.defineProperty(exports, \"INVALID_SPANID\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } });\nObject.defineProperty(exports, \"INVALID_TRACEID\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } });\nObject.defineProperty(exports, \"INVALID_SPAN_CONTEXT\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } });\n__exportStar(require(\"./context/context\"), exports);\n__exportStar(require(\"./context/types\"), exports);\nvar context_1 = require(\"./api/context\");\n/** Entrypoint for context API */\nexports.context = context_1.ContextAPI.getInstance();\nvar trace_1 = require(\"./api/trace\");\n/** Entrypoint for trace API */\nexports.trace = trace_1.TraceAPI.getInstance();\nvar propagation_1 = require(\"./api/propagation\");\n/** Entrypoint for propagation API */\nexports.propagation = propagation_1.PropagationAPI.getInstance();\nvar diag_1 = require(\"./api/diag\");\n/**\n * Entrypoint for Diag API.\n * Defines Diagnostic handler used for internal diagnostic logging operations.\n * The default provides a Noop DiagLogger implementation which may be changed via the\n * diag.setLogger(logger: DiagLogger) function.\n */\nexports.diag = diag_1.DiagAPI.instance();\nexports.default = {\n trace: exports.trace,\n context: exports.context,\n propagation: exports.propagation,\n diag: exports.diag,\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0;\nvar platform_1 = require(\"../platform\");\nvar version_1 = require(\"../version\");\nvar semver_1 = require(\"./semver\");\nvar major = version_1.VERSION.split('.')[0];\nvar GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(\"opentelemetry.js.api.\" + major);\nvar _global = platform_1._globalThis;\nfunction registerGlobal(type, instance, diag, allowOverride) {\n var _a;\n if (allowOverride === void 0) { allowOverride = false; }\n var api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {\n version: version_1.VERSION,\n });\n if (!allowOverride && api[type]) {\n // already registered an API of this type\n var err = new Error(\"@opentelemetry/api: Attempted duplicate registration of API: \" + type);\n diag.error(err.stack || err.message);\n return false;\n }\n if (api.version !== version_1.VERSION) {\n // All registered APIs must be of the same version exactly\n var err = new Error('@opentelemetry/api: All API registration versions must match');\n diag.error(err.stack || err.message);\n return false;\n }\n api[type] = instance;\n diag.debug(\"@opentelemetry/api: Registered a global for \" + type + \" v\" + version_1.VERSION + \".\");\n return true;\n}\nexports.registerGlobal = registerGlobal;\nfunction getGlobal(type) {\n var _a, _b;\n var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n if (!globalVersion || !semver_1.isCompatible(globalVersion)) {\n return;\n }\n return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nexports.getGlobal = getGlobal;\nfunction unregisterGlobal(type, diag) {\n diag.debug(\"@opentelemetry/api: Unregistering a global for \" + type + \" v\" + version_1.VERSION + \".\");\n var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n if (api) {\n delete api[type];\n }\n}\nexports.unregisterGlobal = unregisterGlobal;\n//# sourceMappingURL=global-utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isCompatible = exports._makeCompatibilityCheck = void 0;\nvar version_1 = require(\"../version\");\nvar re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n * Create a function to test an API version to see if it is compatible with the provided ownVersion.\n *\n * The returned function has the following semantics:\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param ownVersion version which should be checked against\n */\nfunction _makeCompatibilityCheck(ownVersion) {\n var acceptedVersions = new Set([ownVersion]);\n var rejectedVersions = new Set();\n var myVersionMatch = ownVersion.match(re);\n if (!myVersionMatch) {\n // we cannot guarantee compatibility so we always return noop\n return function () { return false; };\n }\n var ownVersionParsed = {\n major: +myVersionMatch[1],\n minor: +myVersionMatch[2],\n patch: +myVersionMatch[3],\n prerelease: myVersionMatch[4],\n };\n // if ownVersion has a prerelease tag, versions must match exactly\n if (ownVersionParsed.prerelease != null) {\n return function isExactmatch(globalVersion) {\n return globalVersion === ownVersion;\n };\n }\n function _reject(v) {\n rejectedVersions.add(v);\n return false;\n }\n function _accept(v) {\n acceptedVersions.add(v);\n return true;\n }\n return function isCompatible(globalVersion) {\n if (acceptedVersions.has(globalVersion)) {\n return true;\n }\n if (rejectedVersions.has(globalVersion)) {\n return false;\n }\n var globalVersionMatch = globalVersion.match(re);\n if (!globalVersionMatch) {\n // cannot parse other version\n // we cannot guarantee compatibility so we always noop\n return _reject(globalVersion);\n }\n var globalVersionParsed = {\n major: +globalVersionMatch[1],\n minor: +globalVersionMatch[2],\n patch: +globalVersionMatch[3],\n prerelease: globalVersionMatch[4],\n };\n // if globalVersion has a prerelease tag, versions must match exactly\n if (globalVersionParsed.prerelease != null) {\n return _reject(globalVersion);\n }\n // major versions must match\n if (ownVersionParsed.major !== globalVersionParsed.major) {\n return _reject(globalVersion);\n }\n if (ownVersionParsed.major === 0) {\n if (ownVersionParsed.minor === globalVersionParsed.minor &&\n ownVersionParsed.patch <= globalVersionParsed.patch) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n }\n if (ownVersionParsed.minor <= globalVersionParsed.minor) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n };\n}\nexports._makeCompatibilityCheck = _makeCompatibilityCheck;\n/**\n * Test an API version to see if it is compatible with this API.\n *\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param version version of the API requesting an instance of the global API\n */\nexports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);\n//# sourceMappingURL=semver.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./globalThis\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTextMapPropagator = void 0;\n/**\n * No-op implementations of {@link TextMapPropagator}.\n */\nvar NoopTextMapPropagator = /** @class */ (function () {\n function NoopTextMapPropagator() {\n }\n /** Noop inject function does nothing */\n NoopTextMapPropagator.prototype.inject = function (_context, _carrier) { };\n /** Noop extract function does nothing and returns the input context */\n NoopTextMapPropagator.prototype.extract = function (context, _carrier) {\n return context;\n };\n NoopTextMapPropagator.prototype.fields = function () {\n return [];\n };\n return NoopTextMapPropagator;\n}());\nexports.NoopTextMapPropagator = NoopTextMapPropagator;\n//# sourceMappingURL=NoopTextMapPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0;\nexports.defaultTextMapGetter = {\n get: function (carrier, key) {\n if (carrier == null) {\n return undefined;\n }\n return carrier[key];\n },\n keys: function (carrier) {\n if (carrier == null) {\n return [];\n }\n return Object.keys(carrier);\n },\n};\nexports.defaultTextMapSetter = {\n set: function (carrier, key, value) {\n if (carrier == null) {\n return;\n }\n carrier[key] = value;\n },\n};\n//# sourceMappingURL=TextMapPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NonRecordingSpan = void 0;\nvar invalid_span_constants_1 = require(\"./invalid-span-constants\");\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nvar NonRecordingSpan = /** @class */ (function () {\n function NonRecordingSpan(_spanContext) {\n if (_spanContext === void 0) { _spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT; }\n this._spanContext = _spanContext;\n }\n // Returns a SpanContext.\n NonRecordingSpan.prototype.spanContext = function () {\n return this._spanContext;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setAttribute = function (_key, _value) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setAttributes = function (_attributes) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.addEvent = function (_name, _attributes) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setStatus = function (_status) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.updateName = function (_name) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.end = function (_endTime) { };\n // isRecording always returns false for NonRecordingSpan.\n NonRecordingSpan.prototype.isRecording = function () {\n return false;\n };\n // By default does nothing\n NonRecordingSpan.prototype.recordException = function (_exception, _time) { };\n return NonRecordingSpan;\n}());\nexports.NonRecordingSpan = NonRecordingSpan;\n//# sourceMappingURL=NonRecordingSpan.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTracer = void 0;\nvar context_1 = require(\"../api/context\");\nvar context_utils_1 = require(\"../trace/context-utils\");\nvar NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nvar spancontext_utils_1 = require(\"./spancontext-utils\");\nvar context = context_1.ContextAPI.getInstance();\n/**\n * No-op implementations of {@link Tracer}.\n */\nvar NoopTracer = /** @class */ (function () {\n function NoopTracer() {\n }\n // startSpan starts a noop span.\n NoopTracer.prototype.startSpan = function (name, options, context) {\n var root = Boolean(options === null || options === void 0 ? void 0 : options.root);\n if (root) {\n return new NonRecordingSpan_1.NonRecordingSpan();\n }\n var parentFromContext = context && context_utils_1.getSpanContext(context);\n if (isSpanContext(parentFromContext) &&\n spancontext_utils_1.isSpanContextValid(parentFromContext)) {\n return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);\n }\n else {\n return new NonRecordingSpan_1.NonRecordingSpan();\n }\n };\n NoopTracer.prototype.startActiveSpan = function (name, arg2, arg3, arg4) {\n var opts;\n var ctx;\n var fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n var parentContext = ctx !== null && ctx !== void 0 ? ctx : context.active();\n var span = this.startSpan(name, opts, parentContext);\n var contextWithSpanSet = context_utils_1.setSpan(parentContext, span);\n return context.with(contextWithSpanSet, fn, undefined, span);\n };\n return NoopTracer;\n}());\nexports.NoopTracer = NoopTracer;\nfunction isSpanContext(spanContext) {\n return (typeof spanContext === 'object' &&\n typeof spanContext['spanId'] === 'string' &&\n typeof spanContext['traceId'] === 'string' &&\n typeof spanContext['traceFlags'] === 'number');\n}\n//# sourceMappingURL=NoopTracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTracerProvider = void 0;\nvar NoopTracer_1 = require(\"./NoopTracer\");\n/**\n * An implementation of the {@link TracerProvider} which returns an impotent\n * Tracer for all calls to `getTracer`.\n *\n * All operations are no-op.\n */\nvar NoopTracerProvider = /** @class */ (function () {\n function NoopTracerProvider() {\n }\n NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {\n return new NoopTracer_1.NoopTracer();\n };\n return NoopTracerProvider;\n}());\nexports.NoopTracerProvider = NoopTracerProvider;\n//# sourceMappingURL=NoopTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProxyTracer = void 0;\nvar NoopTracer_1 = require(\"./NoopTracer\");\nvar NOOP_TRACER = new NoopTracer_1.NoopTracer();\n/**\n * Proxy tracer provided by the proxy tracer provider\n */\nvar ProxyTracer = /** @class */ (function () {\n function ProxyTracer(_provider, name, version, options) {\n this._provider = _provider;\n this.name = name;\n this.version = version;\n this.options = options;\n }\n ProxyTracer.prototype.startSpan = function (name, options, context) {\n return this._getTracer().startSpan(name, options, context);\n };\n ProxyTracer.prototype.startActiveSpan = function (_name, _options, _context, _fn) {\n var tracer = this._getTracer();\n return Reflect.apply(tracer.startActiveSpan, tracer, arguments);\n };\n /**\n * Try to get a tracer from the proxy tracer provider.\n * If the proxy tracer provider has no delegate, return a noop tracer.\n */\n ProxyTracer.prototype._getTracer = function () {\n if (this._delegate) {\n return this._delegate;\n }\n var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);\n if (!tracer) {\n return NOOP_TRACER;\n }\n this._delegate = tracer;\n return this._delegate;\n };\n return ProxyTracer;\n}());\nexports.ProxyTracer = ProxyTracer;\n//# sourceMappingURL=ProxyTracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProxyTracerProvider = void 0;\nvar ProxyTracer_1 = require(\"./ProxyTracer\");\nvar NoopTracerProvider_1 = require(\"./NoopTracerProvider\");\nvar NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider();\n/**\n * Tracer provider which provides {@link ProxyTracer}s.\n *\n * Before a delegate is set, tracers provided are NoOp.\n * When a delegate is set, traces are provided from the delegate.\n * When a delegate is set after tracers have already been provided,\n * all tracers already provided will use the provided delegate implementation.\n */\nvar ProxyTracerProvider = /** @class */ (function () {\n function ProxyTracerProvider() {\n }\n /**\n * Get a {@link ProxyTracer}\n */\n ProxyTracerProvider.prototype.getTracer = function (name, version, options) {\n var _a;\n return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));\n };\n ProxyTracerProvider.prototype.getDelegate = function () {\n var _a;\n return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;\n };\n /**\n * Set the delegate tracer provider\n */\n ProxyTracerProvider.prototype.setDelegate = function (delegate) {\n this._delegate = delegate;\n };\n ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {\n var _a;\n return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);\n };\n return ProxyTracerProvider;\n}());\nexports.ProxyTracerProvider = ProxyTracerProvider;\n//# sourceMappingURL=ProxyTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=Sampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SamplingDecision = void 0;\n/**\n * A sampling decision that determines how a {@link Span} will be recorded\n * and collected.\n */\nvar SamplingDecision;\n(function (SamplingDecision) {\n /**\n * `Span.isRecording() === false`, span will not be recorded and all events\n * and attributes will be dropped.\n */\n SamplingDecision[SamplingDecision[\"NOT_RECORD\"] = 0] = \"NOT_RECORD\";\n /**\n * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}\n * MUST NOT be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD\"] = 1] = \"RECORD\";\n /**\n * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}\n * MUST be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD_AND_SAMPLED\"] = 2] = \"RECORD_AND_SAMPLED\";\n})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));\n//# sourceMappingURL=SamplingResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=SpanOptions.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=attributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getSpan = void 0;\nvar context_1 = require(\"../context/context\");\nvar NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\n/**\n * span key\n */\nvar SPAN_KEY = context_1.createContextKey('OpenTelemetry Context Key SPAN');\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nfunction getSpan(context) {\n return context.getValue(SPAN_KEY) || undefined;\n}\nexports.getSpan = getSpan;\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nfunction setSpan(context, span) {\n return context.setValue(SPAN_KEY, span);\n}\nexports.setSpan = setSpan;\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nfunction deleteSpan(context) {\n return context.deleteValue(SPAN_KEY);\n}\nexports.deleteSpan = deleteSpan;\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nfunction setSpanContext(context, spanContext) {\n return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));\n}\nexports.setSpanContext = setSpanContext;\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nfunction getSpanContext(context) {\n var _a;\n return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}\nexports.getSpanContext = getSpanContext;\n//# sourceMappingURL=context-utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceStateImpl = void 0;\nvar tracestate_validators_1 = require(\"./tracestate-validators\");\nvar MAX_TRACE_STATE_ITEMS = 32;\nvar MAX_TRACE_STATE_LEN = 512;\nvar LIST_MEMBERS_SEPARATOR = ',';\nvar LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nvar TraceStateImpl = /** @class */ (function () {\n function TraceStateImpl(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n TraceStateImpl.prototype.set = function (key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n var traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n };\n TraceStateImpl.prototype.unset = function (key) {\n var traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n };\n TraceStateImpl.prototype.get = function (key) {\n return this._internalState.get(key);\n };\n TraceStateImpl.prototype.serialize = function () {\n var _this = this;\n return this._keys()\n .reduce(function (agg, key) {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n };\n TraceStateImpl.prototype._parse = function (rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce(function (agg, part) {\n var listMember = part.trim(); // Optional Whitespace (OWS) handling\n var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n var key = listMember.slice(0, i);\n var value = listMember.slice(i + 1, part.length);\n if (tracestate_validators_1.validateKey(key) && tracestate_validators_1.validateValue(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n };\n TraceStateImpl.prototype._keys = function () {\n return Array.from(this._internalState.keys()).reverse();\n };\n TraceStateImpl.prototype._clone = function () {\n var traceState = new TraceStateImpl();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n };\n return TraceStateImpl;\n}());\nexports.TraceStateImpl = TraceStateImpl;\n//# sourceMappingURL=tracestate-impl.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nvar VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nvar VALID_KEY = \"[a-z]\" + VALID_KEY_CHAR_RANGE + \"{0,255}\";\nvar VALID_VENDOR_KEY = \"[a-z0-9]\" + VALID_KEY_CHAR_RANGE + \"{0,240}@[a-z]\" + VALID_KEY_CHAR_RANGE + \"{0,13}\";\nvar VALID_KEY_REGEX = new RegExp(\"^(?:\" + VALID_KEY + \"|\" + VALID_VENDOR_KEY + \")$\");\nvar VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nvar INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=tracestate-validators.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createTraceState = void 0;\nvar tracestate_impl_1 = require(\"./tracestate-impl\");\nfunction createTraceState(rawTraceState) {\n return new tracestate_impl_1.TraceStateImpl(rawTraceState);\n}\nexports.createTraceState = createTraceState;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0;\nvar trace_flags_1 = require(\"./trace_flags\");\nexports.INVALID_SPANID = '0000000000000000';\nexports.INVALID_TRACEID = '00000000000000000000000000000000';\nexports.INVALID_SPAN_CONTEXT = {\n traceId: exports.INVALID_TRACEID,\n spanId: exports.INVALID_SPANID,\n traceFlags: trace_flags_1.TraceFlags.NONE,\n};\n//# sourceMappingURL=invalid-span-constants.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=link.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=span.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=span_context.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpanKind = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar SpanKind;\n(function (SpanKind) {\n /** Default value. Indicates that the span is used internally. */\n SpanKind[SpanKind[\"INTERNAL\"] = 0] = \"INTERNAL\";\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SpanKind[SpanKind[\"SERVER\"] = 1] = \"SERVER\";\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n SpanKind[SpanKind[\"CLIENT\"] = 2] = \"CLIENT\";\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"PRODUCER\"] = 3] = \"PRODUCER\";\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"CONSUMER\"] = 4] = \"CONSUMER\";\n})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));\n//# sourceMappingURL=span_kind.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar invalid_span_constants_1 = require(\"./invalid-span-constants\");\nvar NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nvar VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nvar VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\nfunction isValidTraceId(traceId) {\n return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID;\n}\nexports.isValidTraceId = isValidTraceId;\nfunction isValidSpanId(spanId) {\n return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID;\n}\nexports.isValidSpanId = isValidSpanId;\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nfunction isSpanContextValid(spanContext) {\n return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));\n}\nexports.isSpanContextValid = isSpanContextValid;\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nfunction wrapSpanContext(spanContext) {\n return new NonRecordingSpan_1.NonRecordingSpan(spanContext);\n}\nexports.wrapSpanContext = wrapSpanContext;\n//# sourceMappingURL=spancontext-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpanStatusCode = void 0;\n/**\n * An enumeration of status codes.\n */\nvar SpanStatusCode;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));\n//# sourceMappingURL=status.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceFlags = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar TraceFlags;\n(function (TraceFlags) {\n /** Represents no flag set. */\n TraceFlags[TraceFlags[\"NONE\"] = 0] = \"NONE\";\n /** Bit to represent whether trace is sampled in trace flags. */\n TraceFlags[TraceFlags[\"SAMPLED\"] = 1] = \"SAMPLED\";\n})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));\n//# sourceMappingURL=trace_flags.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=trace_state.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=tracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=tracer_options.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=tracer_provider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.1.0';\n//# sourceMappingURL=version.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExportResultCode = void 0;\nvar ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0;\nexports.BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexports.BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexports.BAGGAGE_ITEMS_SEPARATOR = ',';\n// Name of the http header used to propagate the baggage\nexports.BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CBaggagePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"../../trace/suppress-tracing\");\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\n/**\n * Propagates {@link Baggage} through Context format propagation.\n *\n * Based on the Baggage specification:\n * https://w3c.github.io/baggage/\n */\nclass W3CBaggagePropagator {\n inject(context, carrier, setter) {\n const baggage = api_1.propagation.getBaggage(context);\n if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))\n return;\n const keyPairs = (0, utils_1.getKeyPairs)(baggage)\n .filter((pair) => {\n return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;\n })\n .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS);\n const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs);\n if (headerValue.length > 0) {\n setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);\n }\n }\n extract(context, carrier, getter) {\n const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);\n const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue;\n if (!baggageString)\n return context;\n const baggage = {};\n if (baggageString.length === 0) {\n return context;\n }\n const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);\n pairs.forEach(entry => {\n const keyPair = (0, utils_1.parsePairKeyValue)(entry);\n if (keyPair) {\n const baggageEntry = { value: keyPair.value };\n if (keyPair.metadata) {\n baggageEntry.metadata = keyPair.metadata;\n }\n baggage[keyPair.key] = baggageEntry;\n }\n });\n if (Object.entries(baggage).length === 0) {\n return context;\n }\n return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));\n }\n fields() {\n return [constants_1.BAGGAGE_HEADER];\n }\n}\nexports.W3CBaggagePropagator = W3CBaggagePropagator;\n//# sourceMappingURL=W3CBaggagePropagator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst api_1 = require(\"@opentelemetry/api\");\nconst constants_1 = require(\"./constants\");\nfunction serializeKeyPairs(keyPairs) {\n return keyPairs.reduce((hValue, current) => {\n const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`;\n return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n }, '');\n}\nexports.serializeKeyPairs = serializeKeyPairs;\nfunction getKeyPairs(baggage) {\n return baggage.getAllEntries().map(([key, value]) => {\n let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;\n // include opaque metadata if provided\n // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation\n if (value.metadata !== undefined) {\n entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();\n }\n return entry;\n });\n}\nexports.getKeyPairs = getKeyPairs;\nfunction parsePairKeyValue(entry) {\n const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR);\n if (valueProps.length <= 0)\n return;\n const keyPairPart = valueProps.shift();\n if (!keyPairPart)\n return;\n const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR);\n if (keyPair.length !== 2)\n return;\n const key = decodeURIComponent(keyPair[0].trim());\n const value = decodeURIComponent(keyPair[1].trim());\n let metadata;\n if (valueProps.length > 0) {\n metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR));\n }\n return { key, value, metadata };\n}\nexports.parsePairKeyValue = parsePairKeyValue;\n/**\n * Parse a string serialized in the baggage HTTP Format (without metadata):\n * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md\n */\nfunction parseKeyPairsIntoRecord(value) {\n if (typeof value !== 'string' || value.length === 0)\n return {};\n return value\n .split(constants_1.BAGGAGE_ITEMS_SEPARATOR)\n .map(entry => {\n return parsePairKeyValue(entry);\n })\n .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0)\n .reduce((headers, keyPair) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n headers[keyPair.key] = keyPair.value;\n return headers;\n }, {});\n}\nexports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nfunction sanitizeAttributes(attributes) {\n const out = {};\n if (typeof attributes !== 'object' || attributes == null) {\n return out;\n }\n for (const [key, val] of Object.entries(attributes)) {\n if (!isAttributeKey(key)) {\n api_1.diag.warn(`Invalid attribute key: ${key}`);\n continue;\n }\n if (!isAttributeValue(val)) {\n api_1.diag.warn(`Invalid attribute value set for key: ${key}`);\n continue;\n }\n if (Array.isArray(val)) {\n out[key] = val.slice();\n }\n else {\n out[key] = val;\n }\n }\n return out;\n}\nexports.sanitizeAttributes = sanitizeAttributes;\nfunction isAttributeKey(key) {\n return typeof key === 'string' && key.length > 0;\n}\nexports.isAttributeKey = isAttributeKey;\nfunction isAttributeValue(val) {\n if (val == null) {\n return true;\n }\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n return isValidPrimitiveAttributeValue(val);\n}\nexports.isAttributeValue = isAttributeValue;\nfunction isHomogeneousAttributeValueArray(arr) {\n let type;\n for (const element of arr) {\n // null/undefined elements are allowed\n if (element == null)\n continue;\n if (!type) {\n if (isValidPrimitiveAttributeValue(element)) {\n type = typeof element;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n if (typeof element === type) {\n continue;\n }\n return false;\n }\n return true;\n}\nfunction isValidPrimitiveAttributeValue(val) {\n switch (typeof val) {\n case 'number':\n case 'boolean':\n case 'string':\n return true;\n }\n return false;\n}\n//# sourceMappingURL=attributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.globalErrorHandler = exports.setGlobalErrorHandler = void 0;\nconst logging_error_handler_1 = require(\"./logging-error-handler\");\n/** The global error handler delegate */\nlet delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nfunction setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\nexports.setGlobalErrorHandler = setGlobalErrorHandler;\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nfunction globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch (_a) { } // eslint-disable-line no-empty\n}\nexports.globalErrorHandler = globalErrorHandler;\n//# sourceMappingURL=global-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loggingErrorHandler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * Returns a function that logs an error using the provided logger, or a\n * console logger if one was not provided.\n */\nfunction loggingErrorHandler() {\n return (ex) => {\n api_1.diag.error(stringifyException(ex));\n };\n}\nexports.loggingErrorHandler = loggingErrorHandler;\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\n }\n}\n/**\n * Flattens an exception into key-value pairs by traversing the prototype chain\n * and coercing values to strings. Duplicate properties will not be overwritten;\n * the first insert wins.\n */\nfunction flattenException(ex) {\n const result = {};\n let current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(propertyName => {\n if (result[propertyName])\n return;\n const value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0;\nconst platform_1 = require(\"../platform\");\nconst NANOSECOND_DIGITS = 9;\nconst SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number to HrTime, HrTime = [number, number].\n * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970.\n * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds.\n * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150.\n * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds:\n * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210.\n * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:\n * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000.\n * This is represented in HrTime format as [1609504210, 150000000].\n * @param epochMillis\n */\nfunction numberToHrtime(epochMillis) {\n const epochSeconds = epochMillis / 1000;\n // Decimals only.\n const seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) *\n SECOND_TO_NANOSECONDS;\n return [seconds, nanos];\n}\nfunction getTimeOrigin() {\n let timeOrigin = platform_1.otperformance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n const perf = platform_1.otperformance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nfunction hrTime(performanceNow) {\n const timeOrigin = numberToHrtime(getTimeOrigin());\n const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now());\n let seconds = timeOrigin[0] + now[0];\n let nanos = timeOrigin[1] + now[1];\n // Nanoseconds\n if (nanos > SECOND_TO_NANOSECONDS) {\n nanos -= SECOND_TO_NANOSECONDS;\n seconds += 1;\n }\n return [seconds, nanos];\n}\nexports.hrTime = hrTime;\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nfunction timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\n else if (typeof time === 'number') {\n // Must be a performance.now() if it's smaller than process start time.\n if (time < getTimeOrigin()) {\n return hrTime(time);\n }\n else {\n // epoch milliseconds or performance.timeOrigin\n return numberToHrtime(time);\n }\n }\n else if (time instanceof Date) {\n return numberToHrtime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\nexports.timeInputToHrTime = timeInputToHrTime;\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nfunction hrTimeDuration(startTime, endTime) {\n let seconds = endTime[0] - startTime[0];\n let nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\nexports.hrTimeDuration = hrTimeDuration;\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nfunction hrTimeToTimeStamp(time) {\n const precision = NANOSECOND_DIGITS;\n const tmp = `${'0'.repeat(precision)}${time[1]}Z`;\n const nanoString = tmp.substr(tmp.length - precision - 1);\n const date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\nexports.hrTimeToTimeStamp = hrTimeToTimeStamp;\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nfunction hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\nexports.hrTimeToNanoseconds = hrTimeToNanoseconds;\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nfunction hrTimeToMilliseconds(time) {\n return Math.round(time[0] * 1e3 + time[1] / 1e6);\n}\nexports.hrTimeToMilliseconds = hrTimeToMilliseconds;\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nfunction hrTimeToMicroseconds(time) {\n return Math.round(time[0] * 1e6 + time[1] / 1e3);\n}\nexports.hrTimeToMicroseconds = hrTimeToMicroseconds;\n/**\n * check if time is HrTime\n * @param value\n */\nfunction isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\nexports.isTimeInputHrTime = isTimeInputHrTime;\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nfunction isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\nexports.isTimeInput = isTimeInput;\n//# sourceMappingURL=time.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageUtils = void 0;\n__exportStar(require(\"./baggage/propagation/W3CBaggagePropagator\"), exports);\n__exportStar(require(\"./common/attributes\"), exports);\n__exportStar(require(\"./common/global-error-handler\"), exports);\n__exportStar(require(\"./common/logging-error-handler\"), exports);\n__exportStar(require(\"./common/time\"), exports);\n__exportStar(require(\"./common/types\"), exports);\n__exportStar(require(\"./ExportResult\"), exports);\n__exportStar(require(\"./version\"), exports);\nexports.baggageUtils = require(\"./baggage/utils\");\n__exportStar(require(\"./platform\"), exports);\n__exportStar(require(\"./propagation/composite\"), exports);\n__exportStar(require(\"./trace/W3CTraceContextPropagator\"), exports);\n__exportStar(require(\"./trace/IdGenerator\"), exports);\n__exportStar(require(\"./trace/rpc-metadata\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOffSampler\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOnSampler\"), exports);\n__exportStar(require(\"./trace/sampler/ParentBasedSampler\"), exports);\n__exportStar(require(\"./trace/sampler/TraceIdRatioBasedSampler\"), exports);\n__exportStar(require(\"./trace/suppress-tracing\"), exports);\n__exportStar(require(\"./trace/TraceState\"), exports);\n__exportStar(require(\"./utils/environment\"), exports);\n__exportStar(require(\"./utils/merge\"), exports);\n__exportStar(require(\"./utils/sampling\"), exports);\n__exportStar(require(\"./utils/url\"), exports);\n__exportStar(require(\"./utils/wrap\"), exports);\n__exportStar(require(\"./utils/callback\"), exports);\n__exportStar(require(\"./version\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=validators.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomIdGenerator = void 0;\nconst SPAN_ID_BYTES = 8;\nconst TRACE_ID_BYTES = 16;\nclass RandomIdGenerator {\n constructor() {\n /**\n * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex\n * characters corresponding to 128 bits.\n */\n this.generateTraceId = getIdGenerator(TRACE_ID_BYTES);\n /**\n * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex\n * characters corresponding to 64 bits.\n */\n this.generateSpanId = getIdGenerator(SPAN_ID_BYTES);\n }\n}\nexports.RandomIdGenerator = RandomIdGenerator;\nconst SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES);\nfunction getIdGenerator(bytes) {\n return function generateId() {\n for (let i = 0; i < bytes / 4; i++) {\n // unsigned right shift drops decimal part of the number\n // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE\n SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4);\n }\n // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated\n for (let i = 0; i < bytes; i++) {\n if (SHARED_BUFFER[i] > 0) {\n break;\n }\n else if (i === bytes - 1) {\n SHARED_BUFFER[bytes - 1] = 1;\n }\n }\n return SHARED_BUFFER.toString('hex', 0, bytes);\n };\n}\n//# sourceMappingURL=RandomIdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEnv = void 0;\nconst os = require(\"os\");\nconst environment_1 = require(\"../../utils/environment\");\n/**\n * Gets the environment variables\n */\nfunction getEnv() {\n const processEnv = (0, environment_1.parseEnvironment)(process.env);\n return Object.assign({\n HOSTNAME: os.hostname(),\n }, environment_1.DEFAULT_ENVIRONMENT, processEnv);\n}\nexports.getEnv = getEnv;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hexToBase64 = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction hexToBase64(hexStr) {\n const hexStrLen = hexStr.length;\n let hexAsciiCharsStr = '';\n for (let i = 0; i < hexStrLen; i += 2) {\n const hexPair = hexStr.substring(i, i + 2);\n const hexVal = parseInt(hexPair, 16);\n hexAsciiCharsStr += String.fromCharCode(hexVal);\n }\n return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64');\n}\nexports.hexToBase64 = hexToBase64;\n//# sourceMappingURL=hex-to-base64.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./environment\"), exports);\n__exportStar(require(\"./globalThis\"), exports);\n__exportStar(require(\"./hex-to-base64\"), exports);\n__exportStar(require(\"./RandomIdGenerator\"), exports);\n__exportStar(require(\"./performance\"), exports);\n__exportStar(require(\"./sdk-info\"), exports);\n__exportStar(require(\"./timer-util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.otperformance = void 0;\nconst perf_hooks_1 = require(\"perf_hooks\");\nexports.otperformance = perf_hooks_1.performance;\n//# sourceMappingURL=performance.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SDK_INFO = void 0;\nconst version_1 = require(\"../../version\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\n/** Constants describing the SDK in use */\nexports.SDK_INFO = {\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node',\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS,\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION,\n};\n//# sourceMappingURL=sdk-info.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unrefTimer = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction unrefTimer(timer) {\n timer.unref();\n}\nexports.unrefTimer = unrefTimer;\n//# sourceMappingURL=timer-util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompositePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Combines multiple propagators into a single propagator. */\nclass CompositePropagator {\n /**\n * Construct a composite propagator from a list of propagators.\n *\n * @param [config] Configuration object for composite propagator\n */\n constructor(config = {}) {\n var _a;\n this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : [];\n this._fields = Array.from(new Set(this._propagators\n // older propagators may not have fields function, null check to be sure\n .map(p => (typeof p.fields === 'function' ? p.fields() : []))\n .reduce((x, y) => x.concat(y), [])));\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same carrier key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to inject\n * @param carrier Carrier into which context will be injected\n */\n inject(context, carrier, setter) {\n for (const propagator of this._propagators) {\n try {\n propagator.inject(context, carrier, setter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n }\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same context key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to add values to\n * @param carrier Carrier from which to extract context\n */\n extract(context, carrier, getter) {\n return this._propagators.reduce((ctx, propagator) => {\n try {\n return propagator.extract(ctx, carrier, getter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n return ctx;\n }, context);\n }\n fields() {\n // return a new array so our fields cannot be modified\n return this._fields.slice();\n }\n}\nexports.CompositePropagator = CompositePropagator;\n//# sourceMappingURL=composite.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceState = void 0;\nconst validators_1 = require(\"../internal/validators\");\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nclass TraceState {\n constructor(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceState();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\nexports.TraceState = TraceState;\n//# sourceMappingURL=TraceState.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"./suppress-tracing\");\nconst TraceState_1 = require(\"./TraceState\");\nexports.TRACE_PARENT_HEADER = 'traceparent';\nexports.TRACE_STATE_HEADER = 'tracestate';\nconst VERSION = '00';\nconst VERSION_PART = '(?!ff)[\\\\da-f]{2}';\nconst TRACE_ID_PART = '(?![0]{32})[\\\\da-f]{32}';\nconst PARENT_ID_PART = '(?![0]{16})[\\\\da-f]{16}';\nconst FLAGS_PART = '[\\\\da-f]{2}';\nconst TRACE_PARENT_REGEX = new RegExp(`^\\\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\\\s?$`);\n/**\n * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}\n * @param traceParent - A meta property that comes from server.\n * It should be dynamically generated server side to have the server's request trace Id,\n * a parent span Id that was set on the server's request span,\n * and the trace flags to indicate the server's sampling decision\n * (01 = sampled, 00 = not sampled).\n * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'\n * For more information see {@link https://www.w3.org/TR/trace-context/}\n */\nfunction parseTraceParent(traceParent) {\n const match = TRACE_PARENT_REGEX.exec(traceParent);\n if (!match)\n return null;\n // According to the specification the implementation should be compatible\n // with future versions. If there are more parts, we only reject it if it's using version 00\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n if (match[1] === '00' && match[5])\n return null;\n return {\n traceId: match[2],\n spanId: match[3],\n traceFlags: parseInt(match[4], 16),\n };\n}\nexports.parseTraceParent = parseTraceParent;\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n *\n * Based on the Trace Context specification:\n * https://www.w3.org/TR/trace-context/\n */\nclass W3CTraceContextPropagator {\n inject(context, carrier, setter) {\n const spanContext = api_1.trace.getSpanContext(context);\n if (!spanContext ||\n (0, suppress_tracing_1.isTracingSuppressed)(context) ||\n !(0, api_1.isSpanContextValid)(spanContext))\n return;\n const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;\n setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent);\n if (spanContext.traceState) {\n setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize());\n }\n }\n extract(context, carrier, getter) {\n const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER);\n if (!traceParentHeader)\n return context;\n const traceParent = Array.isArray(traceParentHeader)\n ? traceParentHeader[0]\n : traceParentHeader;\n if (typeof traceParent !== 'string')\n return context;\n const spanContext = parseTraceParent(traceParent);\n if (!spanContext)\n return context;\n spanContext.isRemote = true;\n const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER);\n if (traceStateHeader) {\n // If more than one `tracestate` header is found, we merge them into a\n // single header.\n const state = Array.isArray(traceStateHeader)\n ? traceStateHeader.join(',')\n : traceStateHeader;\n spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined);\n }\n return api_1.trace.setSpanContext(context, spanContext);\n }\n fields() {\n return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER];\n }\n}\nexports.W3CTraceContextPropagator = W3CTraceContextPropagator;\n//# sourceMappingURL=W3CTraceContextPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA');\nvar RPCType;\n(function (RPCType) {\n RPCType[\"HTTP\"] = \"http\";\n})(RPCType = exports.RPCType || (exports.RPCType = {}));\nfunction setRPCMetadata(context, meta) {\n return context.setValue(RPC_METADATA_KEY, meta);\n}\nexports.setRPCMetadata = setRPCMetadata;\nfunction deleteRPCMetadata(context) {\n return context.deleteValue(RPC_METADATA_KEY);\n}\nexports.deleteRPCMetadata = deleteRPCMetadata;\nfunction getRPCMetadata(context) {\n return context.getValue(RPC_METADATA_KEY);\n}\nexports.getRPCMetadata = getRPCMetadata;\n//# sourceMappingURL=rpc-metadata.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOffSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples no traces. */\nclass AlwaysOffSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return 'AlwaysOffSampler';\n }\n}\nexports.AlwaysOffSampler = AlwaysOffSampler;\n//# sourceMappingURL=AlwaysOffSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOnSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples all traces. */\nclass AlwaysOnSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.RECORD_AND_SAMPLED,\n };\n }\n toString() {\n return 'AlwaysOnSampler';\n }\n}\nexports.AlwaysOnSampler = AlwaysOnSampler;\n//# sourceMappingURL=AlwaysOnSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParentBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst global_error_handler_1 = require(\"../../common/global-error-handler\");\nconst AlwaysOffSampler_1 = require(\"./AlwaysOffSampler\");\nconst AlwaysOnSampler_1 = require(\"./AlwaysOnSampler\");\n/**\n * A composite sampler that either respects the parent span's sampling decision\n * or delegates to `delegateSampler` for root spans.\n */\nclass ParentBasedSampler {\n constructor(config) {\n var _a, _b, _c, _d;\n this._root = config.root;\n if (!this._root) {\n (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured'));\n this._root = new AlwaysOnSampler_1.AlwaysOnSampler();\n }\n this._remoteParentSampled =\n (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._remoteParentNotSampled =\n (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler();\n this._localParentSampled =\n (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._localParentNotSampled =\n (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();\n }\n shouldSample(context, traceId, spanName, spanKind, attributes, links) {\n const parentContext = api_1.trace.getSpanContext(context);\n if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {\n return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.isRemote) {\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n toString() {\n return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;\n }\n}\nexports.ParentBasedSampler = ParentBasedSampler;\n//# sourceMappingURL=ParentBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceIdRatioBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples a given fraction of traces based of trace id deterministically. */\nclass TraceIdRatioBasedSampler {\n constructor(_ratio = 0) {\n this._ratio = _ratio;\n this._ratio = this._normalize(_ratio);\n this._upperBound = Math.floor(this._ratio * 0xffffffff);\n }\n shouldSample(context, traceId) {\n return {\n decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound\n ? api_1.SamplingDecision.RECORD_AND_SAMPLED\n : api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return `TraceIdRatioBased{${this._ratio}}`;\n }\n _normalize(ratio) {\n if (typeof ratio !== 'number' || isNaN(ratio))\n return 0;\n return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;\n }\n _accumulate(traceId) {\n let accumulation = 0;\n for (let i = 0; i < traceId.length / 8; i++) {\n const pos = i * 8;\n const part = parseInt(traceId.slice(pos, pos + 8), 16);\n accumulation = (accumulation ^ part) >>> 0;\n }\n return accumulation;\n }\n}\nexports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;\n//# sourceMappingURL=TraceIdRatioBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nfunction suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexports.suppressTracing = suppressTracing;\nfunction unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexports.unsuppressTracing = unsuppressTracing;\nfunction isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\nexports.isTracingSuppressed = isTracingSuppressed;\n//# sourceMappingURL=suppress-tracing.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BindOnceFuture = void 0;\nconst promise_1 = require(\"./promise\");\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nclass BindOnceFuture {\n constructor(_callback, _that) {\n this._callback = _callback;\n this._that = _that;\n this._isCalled = false;\n this._deferred = new promise_1.Deferred();\n }\n get isCalled() {\n return this._isCalled;\n }\n get promise() {\n return this._deferred.promise;\n }\n call(...args) {\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve(this._callback.call(this._that, ...args))\n .then(val => this._deferred.resolve(val), err => this._deferred.reject(err));\n }\n catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n }\n}\nexports.BindOnceFuture = BindOnceFuture;\n//# sourceMappingURL=callback.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst sampling_1 = require(\"./sampling\");\nconst DEFAULT_LIST_SEPARATOR = ',';\n/**\n * Environment interface to define all names\n */\nconst ENVIRONMENT_NUMBERS_KEYS = [\n 'OTEL_BSP_EXPORT_TIMEOUT',\n 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BSP_MAX_QUEUE_SIZE',\n 'OTEL_BSP_SCHEDULE_DELAY',\n 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_LINK_COUNT_LIMIT',\n 'OTEL_EXPORTER_OTLP_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_TRACES_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT',\n 'OTEL_EXPORTER_JAEGER_AGENT_PORT',\n];\nfunction isEnvVarANumber(key) {\n return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1);\n}\nconst ENVIRONMENT_LISTS_KEYS = [\n 'OTEL_NO_PATCH_MODULES',\n 'OTEL_PROPAGATORS',\n];\nfunction isEnvVarAList(key) {\n return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1;\n}\nexports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\nexports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\n/**\n * Default environment variables\n */\nexports.DEFAULT_ENVIRONMENT = {\n CONTAINER_NAME: '',\n ECS_CONTAINER_METADATA_URI_V4: '',\n ECS_CONTAINER_METADATA_URI: '',\n HOSTNAME: '',\n KUBERNETES_SERVICE_HOST: '',\n NAMESPACE: '',\n OTEL_BSP_EXPORT_TIMEOUT: 30000,\n OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BSP_MAX_QUEUE_SIZE: 2048,\n OTEL_BSP_SCHEDULE_DELAY: 5000,\n OTEL_EXPORTER_JAEGER_AGENT_HOST: '',\n OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832,\n OTEL_EXPORTER_JAEGER_ENDPOINT: '',\n OTEL_EXPORTER_JAEGER_PASSWORD: '',\n OTEL_EXPORTER_JAEGER_USER: '',\n OTEL_EXPORTER_OTLP_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_HEADERS: '',\n OTEL_EXPORTER_OTLP_TRACES_HEADERS: '',\n OTEL_EXPORTER_OTLP_METRICS_HEADERS: '',\n OTEL_EXPORTER_OTLP_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 10000,\n OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans',\n OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO,\n OTEL_NO_PATCH_MODULES: [],\n OTEL_PROPAGATORS: ['tracecontext', 'baggage'],\n OTEL_RESOURCE_ATTRIBUTES: '',\n OTEL_SERVICE_NAME: '',\n OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_EVENT_COUNT_LIMIT: 128,\n OTEL_SPAN_LINK_COUNT_LIMIT: 128,\n OTEL_TRACES_EXPORTER: 'none',\n OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn,\n OTEL_TRACES_SAMPLER_ARG: '',\n OTEL_EXPORTER_OTLP_INSECURE: '',\n OTEL_EXPORTER_OTLP_TRACES_INSECURE: '',\n OTEL_EXPORTER_OTLP_METRICS_INSECURE: '',\n OTEL_EXPORTER_OTLP_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE: ''\n};\n/**\n * Parses a variable as number with number validation\n * @param name\n * @param environment\n * @param values\n * @param min\n * @param max\n */\nfunction parseNumber(name, environment, values, min = -Infinity, max = Infinity) {\n if (typeof values[name] !== 'undefined') {\n const value = Number(values[name]);\n if (!isNaN(value)) {\n if (value < min) {\n environment[name] = min;\n }\n else if (value > max) {\n environment[name] = max;\n }\n else {\n environment[name] = value;\n }\n }\n }\n}\n/**\n * Parses list-like strings from input into output.\n * @param name\n * @param environment\n * @param values\n * @param separator\n */\nfunction parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) {\n const givenValue = input[name];\n if (typeof givenValue === 'string') {\n output[name] = givenValue.split(separator).map(v => v.trim());\n }\n}\n// The support string -> DiagLogLevel mappings\nconst logLevelMap = {\n ALL: api_1.DiagLogLevel.ALL,\n VERBOSE: api_1.DiagLogLevel.VERBOSE,\n DEBUG: api_1.DiagLogLevel.DEBUG,\n INFO: api_1.DiagLogLevel.INFO,\n WARN: api_1.DiagLogLevel.WARN,\n ERROR: api_1.DiagLogLevel.ERROR,\n NONE: api_1.DiagLogLevel.NONE,\n};\n/**\n * Environmentally sets log level if valid log level string is provided\n * @param key\n * @param environment\n * @param values\n */\nfunction setLogLevelFromEnv(key, environment, values) {\n const value = values[key];\n if (typeof value === 'string') {\n const theLevel = logLevelMap[value.toUpperCase()];\n if (theLevel != null) {\n environment[key] = theLevel;\n }\n }\n}\n/**\n * Parses environment values\n * @param values\n */\nfunction parseEnvironment(values) {\n const environment = {};\n for (const env in exports.DEFAULT_ENVIRONMENT) {\n const key = env;\n switch (key) {\n case 'OTEL_LOG_LEVEL':\n setLogLevelFromEnv(key, environment, values);\n break;\n default:\n if (isEnvVarANumber(key)) {\n parseNumber(key, environment, values);\n }\n else if (isEnvVarAList(key)) {\n parseStringList(key, environment, values);\n }\n else {\n const value = values[key];\n if (typeof value !== 'undefined' && value !== null) {\n environment[key] = String(value);\n }\n }\n }\n }\n return environment;\n}\nexports.parseEnvironment = parseEnvironment;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPlainObject = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\nconst objectTag = '[object Object]';\nconst nullTag = '[object Null]';\nconst undefinedTag = '[object Undefined]';\nconst funcProto = Function.prototype;\nconst funcToString = funcProto.toString;\nconst objectCtorString = funcToString.call(Object);\nconst getPrototype = overArg(Object.getPrototypeOf, Object);\nconst objectProto = Object.prototype;\nconst hasOwnProperty = objectProto.hasOwnProperty;\nconst symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nconst nativeObjectToString = objectProto.toString;\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n return false;\n }\n const proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) === objectCtorString;\n}\nexports.isPlainObject = isPlainObject;\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];\n let unmasked = false;\n try {\n value[symToStringTag] = undefined;\n unmasked = true;\n }\n catch (e) {\n // silence\n }\n const result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n }\n else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n//# sourceMappingURL=lodash.merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.merge = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst lodash_merge_1 = require(\"./lodash.merge\");\nconst MAX_LEVEL = 20;\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nfunction merge(...args) {\n let result = args.shift();\n const objects = new WeakMap();\n while (args.length > 0) {\n result = mergeTwoObjects(result, args.shift(), 0, objects);\n }\n return result;\n}\nexports.merge = merge;\nfunction takeValue(value) {\n if (isArray(value)) {\n return value.slice();\n }\n return value;\n}\n/**\n * Merges two objects\n * @param one - first object\n * @param two - second object\n * @param level - current deep level\n * @param objects - objects holder that has been already referenced - to prevent\n * cyclic dependency\n */\nfunction mergeTwoObjects(one, two, level = 0, objects) {\n let result;\n if (level > MAX_LEVEL) {\n return undefined;\n }\n level++;\n if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n result = takeValue(two);\n }\n else if (isArray(one)) {\n result = one.slice();\n if (isArray(two)) {\n for (let i = 0, j = two.length; i < j; i++) {\n result.push(takeValue(two[i]));\n }\n }\n else if (isObject(two)) {\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n result[key] = takeValue(two[key]);\n }\n }\n }\n else if (isObject(one)) {\n if (isObject(two)) {\n if (!shouldMerge(one, two)) {\n return two;\n }\n result = Object.assign({}, one);\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n const twoValue = two[key];\n if (isPrimitive(twoValue)) {\n if (typeof twoValue === 'undefined') {\n delete result[key];\n }\n else {\n // result[key] = takeValue(twoValue);\n result[key] = twoValue;\n }\n }\n else {\n const obj1 = result[key];\n const obj2 = twoValue;\n if (wasObjectReferenced(one, key, objects) ||\n wasObjectReferenced(two, key, objects)) {\n delete result[key];\n }\n else {\n if (isObject(obj1) && isObject(obj2)) {\n const arr1 = objects.get(obj1) || [];\n const arr2 = objects.get(obj2) || [];\n arr1.push({ obj: one, key });\n arr2.push({ obj: two, key });\n objects.set(obj1, arr1);\n objects.set(obj2, arr2);\n }\n result[key] = mergeTwoObjects(result[key], twoValue, level, objects);\n }\n }\n }\n }\n else {\n result = two;\n }\n }\n return result;\n}\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(obj, key, objects) {\n const arr = objects.get(obj[key]) || [];\n for (let i = 0, j = arr.length; i < j; i++) {\n const info = arr[i];\n if (info.key === key && info.obj === obj) {\n return true;\n }\n }\n return false;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isObject(value) {\n return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object';\n}\nfunction isPrimitive(value) {\n return typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n value instanceof Date ||\n value instanceof RegExp ||\n value === null;\n}\nfunction shouldMerge(one, two) {\n if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Deferred = void 0;\nclass Deferred {\n constructor() {\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n get promise() {\n return this._promise;\n }\n resolve(val) {\n this._resolve(val);\n }\n reject(err) {\n this._reject(err);\n }\n}\nexports.Deferred = Deferred;\n//# sourceMappingURL=promise.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TracesSamplerValues = void 0;\nvar TracesSamplerValues;\n(function (TracesSamplerValues) {\n TracesSamplerValues[\"AlwaysOff\"] = \"always_off\";\n TracesSamplerValues[\"AlwaysOn\"] = \"always_on\";\n TracesSamplerValues[\"ParentBasedAlwaysOff\"] = \"parentbased_always_off\";\n TracesSamplerValues[\"ParentBasedAlwaysOn\"] = \"parentbased_always_on\";\n TracesSamplerValues[\"ParentBasedTraceIdRatio\"] = \"parentbased_traceidratio\";\n TracesSamplerValues[\"TraceIdRatio\"] = \"traceidratio\";\n})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {}));\n//# sourceMappingURL=sampling.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isUrlIgnored = exports.urlMatches = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction urlMatches(url, urlToMatch) {\n if (typeof urlToMatch === 'string') {\n return url === urlToMatch;\n }\n else {\n return !!url.match(urlToMatch);\n }\n}\nexports.urlMatches = urlMatches;\n/**\n * Check if {@param url} should be ignored when comparing against {@param ignoredUrls}\n * @param url\n * @param ignoredUrls\n */\nfunction isUrlIgnored(url, ignoredUrls) {\n if (!ignoredUrls) {\n return false;\n }\n for (const ignoreUrl of ignoredUrls) {\n if (urlMatches(url, ignoreUrl)) {\n return true;\n }\n }\n return false;\n}\nexports.isUrlIgnored = isUrlIgnored;\n//# sourceMappingURL=url.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isWrapped = void 0;\n/**\n * Checks if certain function has been already wrapped\n * @param func\n */\nfunction isWrapped(func) {\n return (typeof func === 'function' &&\n typeof func.__original === 'function' &&\n typeof func.__unwrap === 'function' &&\n func.__wrapped === true);\n}\nexports.isWrapped = isWrapped;\n//# sourceMappingURL=wrap.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.4.0';\n//# sourceMappingURL=version.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPTraceExporter = void 0;\nconst exporter_trace_otlp_http_1 = require(\"@opentelemetry/exporter-trace-otlp-http\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst grpc_js_1 = require(\"@grpc/grpc-js\");\nconst otlp_grpc_exporter_base_1 = require(\"@opentelemetry/otlp-grpc-exporter-base\");\nconst DEFAULT_COLLECTOR_URL = 'localhost:4317';\n/**\n * OTLP Trace Exporter for Node\n */\nclass OTLPTraceExporter extends otlp_grpc_exporter_base_1.OTLPGRPCExporterNodeBase {\n constructor(config = {}) {\n super(config);\n const headers = core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS);\n this.metadata || (this.metadata = new grpc_js_1.Metadata());\n for (const [k, v] of Object.entries(headers)) {\n this.metadata.set(k, v);\n }\n }\n convert(spans) {\n return (0, exporter_trace_otlp_http_1.toOTLPExportTraceServiceRequest)(spans, this);\n }\n getDefaultUrl(config) {\n return typeof config.url === 'string'\n ? (0, otlp_grpc_exporter_base_1.validateAndNormalizeUrl)(config.url)\n : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0\n ? (0, otlp_grpc_exporter_base_1.validateAndNormalizeUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)\n : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? (0, otlp_grpc_exporter_base_1.validateAndNormalizeUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT)\n : DEFAULT_COLLECTOR_URL;\n }\n getServiceClientType() {\n return otlp_grpc_exporter_base_1.ServiceClientType.SPANS;\n }\n getServiceProtoPath() {\n return 'opentelemetry/proto/collector/trace/v1/trace_service.proto';\n }\n}\nexports.OTLPTraceExporter = OTLPTraceExporter;\n//# sourceMappingURL=OTLPTraceExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./OTLPTraceExporter\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExportResultCode = void 0;\nvar ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0;\nexports.BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexports.BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexports.BAGGAGE_ITEMS_SEPARATOR = ',';\n// Name of the http header used to propagate the baggage\nexports.BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CBaggagePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"../../trace/suppress-tracing\");\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\n/**\n * Propagates {@link Baggage} through Context format propagation.\n *\n * Based on the Baggage specification:\n * https://w3c.github.io/baggage/\n */\nclass W3CBaggagePropagator {\n inject(context, carrier, setter) {\n const baggage = api_1.propagation.getBaggage(context);\n if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))\n return;\n const keyPairs = (0, utils_1.getKeyPairs)(baggage)\n .filter((pair) => {\n return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;\n })\n .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS);\n const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs);\n if (headerValue.length > 0) {\n setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);\n }\n }\n extract(context, carrier, getter) {\n const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);\n const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue;\n if (!baggageString)\n return context;\n const baggage = {};\n if (baggageString.length === 0) {\n return context;\n }\n const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);\n pairs.forEach(entry => {\n const keyPair = (0, utils_1.parsePairKeyValue)(entry);\n if (keyPair) {\n const baggageEntry = { value: keyPair.value };\n if (keyPair.metadata) {\n baggageEntry.metadata = keyPair.metadata;\n }\n baggage[keyPair.key] = baggageEntry;\n }\n });\n if (Object.entries(baggage).length === 0) {\n return context;\n }\n return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));\n }\n fields() {\n return [constants_1.BAGGAGE_HEADER];\n }\n}\nexports.W3CBaggagePropagator = W3CBaggagePropagator;\n//# sourceMappingURL=W3CBaggagePropagator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst api_1 = require(\"@opentelemetry/api\");\nconst constants_1 = require(\"./constants\");\nfunction serializeKeyPairs(keyPairs) {\n return keyPairs.reduce((hValue, current) => {\n const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`;\n return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n }, '');\n}\nexports.serializeKeyPairs = serializeKeyPairs;\nfunction getKeyPairs(baggage) {\n return baggage.getAllEntries().map(([key, value]) => {\n let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;\n // include opaque metadata if provided\n // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation\n if (value.metadata !== undefined) {\n entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();\n }\n return entry;\n });\n}\nexports.getKeyPairs = getKeyPairs;\nfunction parsePairKeyValue(entry) {\n const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR);\n if (valueProps.length <= 0)\n return;\n const keyPairPart = valueProps.shift();\n if (!keyPairPart)\n return;\n const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR);\n if (keyPair.length !== 2)\n return;\n const key = decodeURIComponent(keyPair[0].trim());\n const value = decodeURIComponent(keyPair[1].trim());\n let metadata;\n if (valueProps.length > 0) {\n metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR));\n }\n return { key, value, metadata };\n}\nexports.parsePairKeyValue = parsePairKeyValue;\n/**\n * Parse a string serialized in the baggage HTTP Format (without metadata):\n * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md\n */\nfunction parseKeyPairsIntoRecord(value) {\n if (typeof value !== 'string' || value.length === 0)\n return {};\n return value\n .split(constants_1.BAGGAGE_ITEMS_SEPARATOR)\n .map(entry => {\n return parsePairKeyValue(entry);\n })\n .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0)\n .reduce((headers, keyPair) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n headers[keyPair.key] = keyPair.value;\n return headers;\n }, {});\n}\nexports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nfunction sanitizeAttributes(attributes) {\n const out = {};\n if (typeof attributes !== 'object' || attributes == null) {\n return out;\n }\n for (const [key, val] of Object.entries(attributes)) {\n if (!isAttributeKey(key)) {\n api_1.diag.warn(`Invalid attribute key: ${key}`);\n continue;\n }\n if (!isAttributeValue(val)) {\n api_1.diag.warn(`Invalid attribute value set for key: ${key}`);\n continue;\n }\n if (Array.isArray(val)) {\n out[key] = val.slice();\n }\n else {\n out[key] = val;\n }\n }\n return out;\n}\nexports.sanitizeAttributes = sanitizeAttributes;\nfunction isAttributeKey(key) {\n return typeof key === 'string' && key.length > 0;\n}\nexports.isAttributeKey = isAttributeKey;\nfunction isAttributeValue(val) {\n if (val == null) {\n return true;\n }\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n return isValidPrimitiveAttributeValue(val);\n}\nexports.isAttributeValue = isAttributeValue;\nfunction isHomogeneousAttributeValueArray(arr) {\n let type;\n for (const element of arr) {\n // null/undefined elements are allowed\n if (element == null)\n continue;\n if (!type) {\n if (isValidPrimitiveAttributeValue(element)) {\n type = typeof element;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n if (typeof element === type) {\n continue;\n }\n return false;\n }\n return true;\n}\nfunction isValidPrimitiveAttributeValue(val) {\n switch (typeof val) {\n case 'number':\n case 'boolean':\n case 'string':\n return true;\n }\n return false;\n}\n//# sourceMappingURL=attributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.globalErrorHandler = exports.setGlobalErrorHandler = void 0;\nconst logging_error_handler_1 = require(\"./logging-error-handler\");\n/** The global error handler delegate */\nlet delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nfunction setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\nexports.setGlobalErrorHandler = setGlobalErrorHandler;\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nfunction globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch (_a) { } // eslint-disable-line no-empty\n}\nexports.globalErrorHandler = globalErrorHandler;\n//# sourceMappingURL=global-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loggingErrorHandler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * Returns a function that logs an error using the provided logger, or a\n * console logger if one was not provided.\n */\nfunction loggingErrorHandler() {\n return (ex) => {\n api_1.diag.error(stringifyException(ex));\n };\n}\nexports.loggingErrorHandler = loggingErrorHandler;\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\n }\n}\n/**\n * Flattens an exception into key-value pairs by traversing the prototype chain\n * and coercing values to strings. Duplicate properties will not be overwritten;\n * the first insert wins.\n */\nfunction flattenException(ex) {\n const result = {};\n let current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(propertyName => {\n if (result[propertyName])\n return;\n const value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0;\nconst platform_1 = require(\"../platform\");\nconst NANOSECOND_DIGITS = 9;\nconst SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number to HrTime, HrTime = [number, number].\n * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970.\n * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds.\n * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150.\n * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds:\n * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210.\n * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:\n * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000.\n * This is represented in HrTime format as [1609504210, 150000000].\n * @param epochMillis\n */\nfunction numberToHrtime(epochMillis) {\n const epochSeconds = epochMillis / 1000;\n // Decimals only.\n const seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) *\n SECOND_TO_NANOSECONDS;\n return [seconds, nanos];\n}\nfunction getTimeOrigin() {\n let timeOrigin = platform_1.otperformance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n const perf = platform_1.otperformance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nfunction hrTime(performanceNow) {\n const timeOrigin = numberToHrtime(getTimeOrigin());\n const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now());\n let seconds = timeOrigin[0] + now[0];\n let nanos = timeOrigin[1] + now[1];\n // Nanoseconds\n if (nanos > SECOND_TO_NANOSECONDS) {\n nanos -= SECOND_TO_NANOSECONDS;\n seconds += 1;\n }\n return [seconds, nanos];\n}\nexports.hrTime = hrTime;\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nfunction timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\n else if (typeof time === 'number') {\n // Must be a performance.now() if it's smaller than process start time.\n if (time < getTimeOrigin()) {\n return hrTime(time);\n }\n else {\n // epoch milliseconds or performance.timeOrigin\n return numberToHrtime(time);\n }\n }\n else if (time instanceof Date) {\n return numberToHrtime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\nexports.timeInputToHrTime = timeInputToHrTime;\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nfunction hrTimeDuration(startTime, endTime) {\n let seconds = endTime[0] - startTime[0];\n let nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\nexports.hrTimeDuration = hrTimeDuration;\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nfunction hrTimeToTimeStamp(time) {\n const precision = NANOSECOND_DIGITS;\n const tmp = `${'0'.repeat(precision)}${time[1]}Z`;\n const nanoString = tmp.substr(tmp.length - precision - 1);\n const date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\nexports.hrTimeToTimeStamp = hrTimeToTimeStamp;\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nfunction hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\nexports.hrTimeToNanoseconds = hrTimeToNanoseconds;\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nfunction hrTimeToMilliseconds(time) {\n return Math.round(time[0] * 1e3 + time[1] / 1e6);\n}\nexports.hrTimeToMilliseconds = hrTimeToMilliseconds;\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nfunction hrTimeToMicroseconds(time) {\n return Math.round(time[0] * 1e6 + time[1] / 1e3);\n}\nexports.hrTimeToMicroseconds = hrTimeToMicroseconds;\n/**\n * check if time is HrTime\n * @param value\n */\nfunction isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\nexports.isTimeInputHrTime = isTimeInputHrTime;\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nfunction isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\nexports.isTimeInput = isTimeInput;\n//# sourceMappingURL=time.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageUtils = void 0;\n__exportStar(require(\"./baggage/propagation/W3CBaggagePropagator\"), exports);\n__exportStar(require(\"./common/attributes\"), exports);\n__exportStar(require(\"./common/global-error-handler\"), exports);\n__exportStar(require(\"./common/logging-error-handler\"), exports);\n__exportStar(require(\"./common/time\"), exports);\n__exportStar(require(\"./common/types\"), exports);\n__exportStar(require(\"./ExportResult\"), exports);\n__exportStar(require(\"./version\"), exports);\nexports.baggageUtils = require(\"./baggage/utils\");\n__exportStar(require(\"./platform\"), exports);\n__exportStar(require(\"./propagation/composite\"), exports);\n__exportStar(require(\"./trace/W3CTraceContextPropagator\"), exports);\n__exportStar(require(\"./trace/IdGenerator\"), exports);\n__exportStar(require(\"./trace/rpc-metadata\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOffSampler\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOnSampler\"), exports);\n__exportStar(require(\"./trace/sampler/ParentBasedSampler\"), exports);\n__exportStar(require(\"./trace/sampler/TraceIdRatioBasedSampler\"), exports);\n__exportStar(require(\"./trace/suppress-tracing\"), exports);\n__exportStar(require(\"./trace/TraceState\"), exports);\n__exportStar(require(\"./utils/environment\"), exports);\n__exportStar(require(\"./utils/merge\"), exports);\n__exportStar(require(\"./utils/sampling\"), exports);\n__exportStar(require(\"./utils/url\"), exports);\n__exportStar(require(\"./utils/wrap\"), exports);\n__exportStar(require(\"./utils/callback\"), exports);\n__exportStar(require(\"./version\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=validators.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomIdGenerator = void 0;\nconst SPAN_ID_BYTES = 8;\nconst TRACE_ID_BYTES = 16;\nclass RandomIdGenerator {\n constructor() {\n /**\n * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex\n * characters corresponding to 128 bits.\n */\n this.generateTraceId = getIdGenerator(TRACE_ID_BYTES);\n /**\n * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex\n * characters corresponding to 64 bits.\n */\n this.generateSpanId = getIdGenerator(SPAN_ID_BYTES);\n }\n}\nexports.RandomIdGenerator = RandomIdGenerator;\nconst SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES);\nfunction getIdGenerator(bytes) {\n return function generateId() {\n for (let i = 0; i < bytes / 4; i++) {\n // unsigned right shift drops decimal part of the number\n // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE\n SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4);\n }\n // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated\n for (let i = 0; i < bytes; i++) {\n if (SHARED_BUFFER[i] > 0) {\n break;\n }\n else if (i === bytes - 1) {\n SHARED_BUFFER[bytes - 1] = 1;\n }\n }\n return SHARED_BUFFER.toString('hex', 0, bytes);\n };\n}\n//# sourceMappingURL=RandomIdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEnv = void 0;\nconst os = require(\"os\");\nconst environment_1 = require(\"../../utils/environment\");\n/**\n * Gets the environment variables\n */\nfunction getEnv() {\n const processEnv = (0, environment_1.parseEnvironment)(process.env);\n return Object.assign({\n HOSTNAME: os.hostname(),\n }, environment_1.DEFAULT_ENVIRONMENT, processEnv);\n}\nexports.getEnv = getEnv;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hexToBase64 = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction hexToBase64(hexStr) {\n const hexStrLen = hexStr.length;\n let hexAsciiCharsStr = '';\n for (let i = 0; i < hexStrLen; i += 2) {\n const hexPair = hexStr.substring(i, i + 2);\n const hexVal = parseInt(hexPair, 16);\n hexAsciiCharsStr += String.fromCharCode(hexVal);\n }\n return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64');\n}\nexports.hexToBase64 = hexToBase64;\n//# sourceMappingURL=hex-to-base64.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./environment\"), exports);\n__exportStar(require(\"./globalThis\"), exports);\n__exportStar(require(\"./hex-to-base64\"), exports);\n__exportStar(require(\"./RandomIdGenerator\"), exports);\n__exportStar(require(\"./performance\"), exports);\n__exportStar(require(\"./sdk-info\"), exports);\n__exportStar(require(\"./timer-util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.otperformance = void 0;\nconst perf_hooks_1 = require(\"perf_hooks\");\nexports.otperformance = perf_hooks_1.performance;\n//# sourceMappingURL=performance.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SDK_INFO = void 0;\nconst version_1 = require(\"../../version\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\n/** Constants describing the SDK in use */\nexports.SDK_INFO = {\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node',\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS,\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION,\n};\n//# sourceMappingURL=sdk-info.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unrefTimer = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction unrefTimer(timer) {\n timer.unref();\n}\nexports.unrefTimer = unrefTimer;\n//# sourceMappingURL=timer-util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompositePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Combines multiple propagators into a single propagator. */\nclass CompositePropagator {\n /**\n * Construct a composite propagator from a list of propagators.\n *\n * @param [config] Configuration object for composite propagator\n */\n constructor(config = {}) {\n var _a;\n this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : [];\n this._fields = Array.from(new Set(this._propagators\n // older propagators may not have fields function, null check to be sure\n .map(p => (typeof p.fields === 'function' ? p.fields() : []))\n .reduce((x, y) => x.concat(y), [])));\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same carrier key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to inject\n * @param carrier Carrier into which context will be injected\n */\n inject(context, carrier, setter) {\n for (const propagator of this._propagators) {\n try {\n propagator.inject(context, carrier, setter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n }\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same context key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to add values to\n * @param carrier Carrier from which to extract context\n */\n extract(context, carrier, getter) {\n return this._propagators.reduce((ctx, propagator) => {\n try {\n return propagator.extract(ctx, carrier, getter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n return ctx;\n }, context);\n }\n fields() {\n // return a new array so our fields cannot be modified\n return this._fields.slice();\n }\n}\nexports.CompositePropagator = CompositePropagator;\n//# sourceMappingURL=composite.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceState = void 0;\nconst validators_1 = require(\"../internal/validators\");\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nclass TraceState {\n constructor(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceState();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\nexports.TraceState = TraceState;\n//# sourceMappingURL=TraceState.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"./suppress-tracing\");\nconst TraceState_1 = require(\"./TraceState\");\nexports.TRACE_PARENT_HEADER = 'traceparent';\nexports.TRACE_STATE_HEADER = 'tracestate';\nconst VERSION = '00';\nconst VERSION_PART = '(?!ff)[\\\\da-f]{2}';\nconst TRACE_ID_PART = '(?![0]{32})[\\\\da-f]{32}';\nconst PARENT_ID_PART = '(?![0]{16})[\\\\da-f]{16}';\nconst FLAGS_PART = '[\\\\da-f]{2}';\nconst TRACE_PARENT_REGEX = new RegExp(`^\\\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\\\s?$`);\n/**\n * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}\n * @param traceParent - A meta property that comes from server.\n * It should be dynamically generated server side to have the server's request trace Id,\n * a parent span Id that was set on the server's request span,\n * and the trace flags to indicate the server's sampling decision\n * (01 = sampled, 00 = not sampled).\n * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'\n * For more information see {@link https://www.w3.org/TR/trace-context/}\n */\nfunction parseTraceParent(traceParent) {\n const match = TRACE_PARENT_REGEX.exec(traceParent);\n if (!match)\n return null;\n // According to the specification the implementation should be compatible\n // with future versions. If there are more parts, we only reject it if it's using version 00\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n if (match[1] === '00' && match[5])\n return null;\n return {\n traceId: match[2],\n spanId: match[3],\n traceFlags: parseInt(match[4], 16),\n };\n}\nexports.parseTraceParent = parseTraceParent;\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n *\n * Based on the Trace Context specification:\n * https://www.w3.org/TR/trace-context/\n */\nclass W3CTraceContextPropagator {\n inject(context, carrier, setter) {\n const spanContext = api_1.trace.getSpanContext(context);\n if (!spanContext ||\n (0, suppress_tracing_1.isTracingSuppressed)(context) ||\n !(0, api_1.isSpanContextValid)(spanContext))\n return;\n const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;\n setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent);\n if (spanContext.traceState) {\n setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize());\n }\n }\n extract(context, carrier, getter) {\n const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER);\n if (!traceParentHeader)\n return context;\n const traceParent = Array.isArray(traceParentHeader)\n ? traceParentHeader[0]\n : traceParentHeader;\n if (typeof traceParent !== 'string')\n return context;\n const spanContext = parseTraceParent(traceParent);\n if (!spanContext)\n return context;\n spanContext.isRemote = true;\n const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER);\n if (traceStateHeader) {\n // If more than one `tracestate` header is found, we merge them into a\n // single header.\n const state = Array.isArray(traceStateHeader)\n ? traceStateHeader.join(',')\n : traceStateHeader;\n spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined);\n }\n return api_1.trace.setSpanContext(context, spanContext);\n }\n fields() {\n return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER];\n }\n}\nexports.W3CTraceContextPropagator = W3CTraceContextPropagator;\n//# sourceMappingURL=W3CTraceContextPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA');\nvar RPCType;\n(function (RPCType) {\n RPCType[\"HTTP\"] = \"http\";\n})(RPCType = exports.RPCType || (exports.RPCType = {}));\nfunction setRPCMetadata(context, meta) {\n return context.setValue(RPC_METADATA_KEY, meta);\n}\nexports.setRPCMetadata = setRPCMetadata;\nfunction deleteRPCMetadata(context) {\n return context.deleteValue(RPC_METADATA_KEY);\n}\nexports.deleteRPCMetadata = deleteRPCMetadata;\nfunction getRPCMetadata(context) {\n return context.getValue(RPC_METADATA_KEY);\n}\nexports.getRPCMetadata = getRPCMetadata;\n//# sourceMappingURL=rpc-metadata.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOffSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples no traces. */\nclass AlwaysOffSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return 'AlwaysOffSampler';\n }\n}\nexports.AlwaysOffSampler = AlwaysOffSampler;\n//# sourceMappingURL=AlwaysOffSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOnSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples all traces. */\nclass AlwaysOnSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.RECORD_AND_SAMPLED,\n };\n }\n toString() {\n return 'AlwaysOnSampler';\n }\n}\nexports.AlwaysOnSampler = AlwaysOnSampler;\n//# sourceMappingURL=AlwaysOnSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParentBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst global_error_handler_1 = require(\"../../common/global-error-handler\");\nconst AlwaysOffSampler_1 = require(\"./AlwaysOffSampler\");\nconst AlwaysOnSampler_1 = require(\"./AlwaysOnSampler\");\n/**\n * A composite sampler that either respects the parent span's sampling decision\n * or delegates to `delegateSampler` for root spans.\n */\nclass ParentBasedSampler {\n constructor(config) {\n var _a, _b, _c, _d;\n this._root = config.root;\n if (!this._root) {\n (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured'));\n this._root = new AlwaysOnSampler_1.AlwaysOnSampler();\n }\n this._remoteParentSampled =\n (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._remoteParentNotSampled =\n (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler();\n this._localParentSampled =\n (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._localParentNotSampled =\n (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();\n }\n shouldSample(context, traceId, spanName, spanKind, attributes, links) {\n const parentContext = api_1.trace.getSpanContext(context);\n if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {\n return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.isRemote) {\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n toString() {\n return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;\n }\n}\nexports.ParentBasedSampler = ParentBasedSampler;\n//# sourceMappingURL=ParentBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceIdRatioBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples a given fraction of traces based of trace id deterministically. */\nclass TraceIdRatioBasedSampler {\n constructor(_ratio = 0) {\n this._ratio = _ratio;\n this._ratio = this._normalize(_ratio);\n this._upperBound = Math.floor(this._ratio * 0xffffffff);\n }\n shouldSample(context, traceId) {\n return {\n decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound\n ? api_1.SamplingDecision.RECORD_AND_SAMPLED\n : api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return `TraceIdRatioBased{${this._ratio}}`;\n }\n _normalize(ratio) {\n if (typeof ratio !== 'number' || isNaN(ratio))\n return 0;\n return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;\n }\n _accumulate(traceId) {\n let accumulation = 0;\n for (let i = 0; i < traceId.length / 8; i++) {\n const pos = i * 8;\n const part = parseInt(traceId.slice(pos, pos + 8), 16);\n accumulation = (accumulation ^ part) >>> 0;\n }\n return accumulation;\n }\n}\nexports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;\n//# sourceMappingURL=TraceIdRatioBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nfunction suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexports.suppressTracing = suppressTracing;\nfunction unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexports.unsuppressTracing = unsuppressTracing;\nfunction isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\nexports.isTracingSuppressed = isTracingSuppressed;\n//# sourceMappingURL=suppress-tracing.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BindOnceFuture = void 0;\nconst promise_1 = require(\"./promise\");\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nclass BindOnceFuture {\n constructor(_callback, _that) {\n this._callback = _callback;\n this._that = _that;\n this._isCalled = false;\n this._deferred = new promise_1.Deferred();\n }\n get isCalled() {\n return this._isCalled;\n }\n get promise() {\n return this._deferred.promise;\n }\n call(...args) {\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve(this._callback.call(this._that, ...args))\n .then(val => this._deferred.resolve(val), err => this._deferred.reject(err));\n }\n catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n }\n}\nexports.BindOnceFuture = BindOnceFuture;\n//# sourceMappingURL=callback.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst sampling_1 = require(\"./sampling\");\nconst DEFAULT_LIST_SEPARATOR = ',';\n/**\n * Environment interface to define all names\n */\nconst ENVIRONMENT_NUMBERS_KEYS = [\n 'OTEL_BSP_EXPORT_TIMEOUT',\n 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BSP_MAX_QUEUE_SIZE',\n 'OTEL_BSP_SCHEDULE_DELAY',\n 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_LINK_COUNT_LIMIT',\n 'OTEL_EXPORTER_JAEGER_AGENT_PORT',\n];\nfunction isEnvVarANumber(key) {\n return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1);\n}\nconst ENVIRONMENT_LISTS_KEYS = [\n 'OTEL_NO_PATCH_MODULES',\n 'OTEL_PROPAGATORS',\n];\nfunction isEnvVarAList(key) {\n return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1;\n}\nexports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\nexports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\n/**\n * Default environment variables\n */\nexports.DEFAULT_ENVIRONMENT = {\n CONTAINER_NAME: '',\n ECS_CONTAINER_METADATA_URI_V4: '',\n ECS_CONTAINER_METADATA_URI: '',\n HOSTNAME: '',\n KUBERNETES_SERVICE_HOST: '',\n NAMESPACE: '',\n OTEL_BSP_EXPORT_TIMEOUT: 30000,\n OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BSP_MAX_QUEUE_SIZE: 2048,\n OTEL_BSP_SCHEDULE_DELAY: 5000,\n OTEL_EXPORTER_JAEGER_AGENT_HOST: '',\n OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832,\n OTEL_EXPORTER_JAEGER_ENDPOINT: '',\n OTEL_EXPORTER_JAEGER_PASSWORD: '',\n OTEL_EXPORTER_JAEGER_USER: '',\n OTEL_EXPORTER_OTLP_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_HEADERS: '',\n OTEL_EXPORTER_OTLP_TRACES_HEADERS: '',\n OTEL_EXPORTER_OTLP_METRICS_HEADERS: '',\n OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans',\n OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO,\n OTEL_NO_PATCH_MODULES: [],\n OTEL_PROPAGATORS: ['tracecontext', 'baggage'],\n OTEL_RESOURCE_ATTRIBUTES: '',\n OTEL_SERVICE_NAME: '',\n OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_EVENT_COUNT_LIMIT: 128,\n OTEL_SPAN_LINK_COUNT_LIMIT: 128,\n OTEL_TRACES_EXPORTER: 'none',\n OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn,\n OTEL_TRACES_SAMPLER_ARG: '',\n OTEL_EXPORTER_OTLP_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: ''\n};\n/**\n * Parses a variable as number with number validation\n * @param name\n * @param environment\n * @param values\n * @param min\n * @param max\n */\nfunction parseNumber(name, environment, values, min = -Infinity, max = Infinity) {\n if (typeof values[name] !== 'undefined') {\n const value = Number(values[name]);\n if (!isNaN(value)) {\n if (value < min) {\n environment[name] = min;\n }\n else if (value > max) {\n environment[name] = max;\n }\n else {\n environment[name] = value;\n }\n }\n }\n}\n/**\n * Parses list-like strings from input into output.\n * @param name\n * @param environment\n * @param values\n * @param separator\n */\nfunction parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) {\n const givenValue = input[name];\n if (typeof givenValue === 'string') {\n output[name] = givenValue.split(separator).map(v => v.trim());\n }\n}\n// The support string -> DiagLogLevel mappings\nconst logLevelMap = {\n ALL: api_1.DiagLogLevel.ALL,\n VERBOSE: api_1.DiagLogLevel.VERBOSE,\n DEBUG: api_1.DiagLogLevel.DEBUG,\n INFO: api_1.DiagLogLevel.INFO,\n WARN: api_1.DiagLogLevel.WARN,\n ERROR: api_1.DiagLogLevel.ERROR,\n NONE: api_1.DiagLogLevel.NONE,\n};\n/**\n * Environmentally sets log level if valid log level string is provided\n * @param key\n * @param environment\n * @param values\n */\nfunction setLogLevelFromEnv(key, environment, values) {\n const value = values[key];\n if (typeof value === 'string') {\n const theLevel = logLevelMap[value.toUpperCase()];\n if (theLevel != null) {\n environment[key] = theLevel;\n }\n }\n}\n/**\n * Parses environment values\n * @param values\n */\nfunction parseEnvironment(values) {\n const environment = {};\n for (const env in exports.DEFAULT_ENVIRONMENT) {\n const key = env;\n switch (key) {\n case 'OTEL_LOG_LEVEL':\n setLogLevelFromEnv(key, environment, values);\n break;\n default:\n if (isEnvVarANumber(key)) {\n parseNumber(key, environment, values);\n }\n else if (isEnvVarAList(key)) {\n parseStringList(key, environment, values);\n }\n else {\n const value = values[key];\n if (typeof value !== 'undefined' && value !== null) {\n environment[key] = String(value);\n }\n }\n }\n }\n return environment;\n}\nexports.parseEnvironment = parseEnvironment;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPlainObject = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\nconst objectTag = '[object Object]';\nconst nullTag = '[object Null]';\nconst undefinedTag = '[object Undefined]';\nconst funcProto = Function.prototype;\nconst funcToString = funcProto.toString;\nconst objectCtorString = funcToString.call(Object);\nconst getPrototype = overArg(Object.getPrototypeOf, Object);\nconst objectProto = Object.prototype;\nconst hasOwnProperty = objectProto.hasOwnProperty;\nconst symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nconst nativeObjectToString = objectProto.toString;\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n return false;\n }\n const proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) === objectCtorString;\n}\nexports.isPlainObject = isPlainObject;\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];\n let unmasked = false;\n try {\n value[symToStringTag] = undefined;\n unmasked = true;\n }\n catch (e) {\n // silence\n }\n const result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n }\n else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n//# sourceMappingURL=lodash.merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.merge = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst lodash_merge_1 = require(\"./lodash.merge\");\nconst MAX_LEVEL = 20;\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nfunction merge(...args) {\n let result = args.shift();\n const objects = new WeakMap();\n while (args.length > 0) {\n result = mergeTwoObjects(result, args.shift(), 0, objects);\n }\n return result;\n}\nexports.merge = merge;\nfunction takeValue(value) {\n if (isArray(value)) {\n return value.slice();\n }\n return value;\n}\n/**\n * Merges two objects\n * @param one - first object\n * @param two - second object\n * @param level - current deep level\n * @param objects - objects holder that has been already referenced - to prevent\n * cyclic dependency\n */\nfunction mergeTwoObjects(one, two, level = 0, objects) {\n let result;\n if (level > MAX_LEVEL) {\n return undefined;\n }\n level++;\n if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n result = takeValue(two);\n }\n else if (isArray(one)) {\n result = one.slice();\n if (isArray(two)) {\n for (let i = 0, j = two.length; i < j; i++) {\n result.push(takeValue(two[i]));\n }\n }\n else if (isObject(two)) {\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n result[key] = takeValue(two[key]);\n }\n }\n }\n else if (isObject(one)) {\n if (isObject(two)) {\n if (!shouldMerge(one, two)) {\n return two;\n }\n result = Object.assign({}, one);\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n const twoValue = two[key];\n if (isPrimitive(twoValue)) {\n if (typeof twoValue === 'undefined') {\n delete result[key];\n }\n else {\n // result[key] = takeValue(twoValue);\n result[key] = twoValue;\n }\n }\n else {\n const obj1 = result[key];\n const obj2 = twoValue;\n if (wasObjectReferenced(one, key, objects) ||\n wasObjectReferenced(two, key, objects)) {\n delete result[key];\n }\n else {\n if (isObject(obj1) && isObject(obj2)) {\n const arr1 = objects.get(obj1) || [];\n const arr2 = objects.get(obj2) || [];\n arr1.push({ obj: one, key });\n arr2.push({ obj: two, key });\n objects.set(obj1, arr1);\n objects.set(obj2, arr2);\n }\n result[key] = mergeTwoObjects(result[key], twoValue, level, objects);\n }\n }\n }\n }\n else {\n result = two;\n }\n }\n return result;\n}\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(obj, key, objects) {\n const arr = objects.get(obj[key]) || [];\n for (let i = 0, j = arr.length; i < j; i++) {\n const info = arr[i];\n if (info.key === key && info.obj === obj) {\n return true;\n }\n }\n return false;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isObject(value) {\n return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object';\n}\nfunction isPrimitive(value) {\n return typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n value instanceof Date ||\n value instanceof RegExp ||\n value === null;\n}\nfunction shouldMerge(one, two) {\n if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Deferred = void 0;\nclass Deferred {\n constructor() {\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n get promise() {\n return this._promise;\n }\n resolve(val) {\n this._resolve(val);\n }\n reject(err) {\n this._reject(err);\n }\n}\nexports.Deferred = Deferred;\n//# sourceMappingURL=promise.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TracesSamplerValues = void 0;\nvar TracesSamplerValues;\n(function (TracesSamplerValues) {\n TracesSamplerValues[\"AlwaysOff\"] = \"always_off\";\n TracesSamplerValues[\"AlwaysOn\"] = \"always_on\";\n TracesSamplerValues[\"ParentBasedAlwaysOff\"] = \"parentbased_always_off\";\n TracesSamplerValues[\"ParentBasedAlwaysOn\"] = \"parentbased_always_on\";\n TracesSamplerValues[\"ParentBasedTraceIdRatio\"] = \"parentbased_traceidratio\";\n TracesSamplerValues[\"TraceIdRatio\"] = \"traceidratio\";\n})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {}));\n//# sourceMappingURL=sampling.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isUrlIgnored = exports.urlMatches = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction urlMatches(url, urlToMatch) {\n if (typeof urlToMatch === 'string') {\n return url === urlToMatch;\n }\n else {\n return !!url.match(urlToMatch);\n }\n}\nexports.urlMatches = urlMatches;\n/**\n * Check if {@param url} should be ignored when comparing against {@param ignoredUrls}\n * @param url\n * @param ignoredUrls\n */\nfunction isUrlIgnored(url, ignoredUrls) {\n if (!ignoredUrls) {\n return false;\n }\n for (const ignoreUrl of ignoredUrls) {\n if (urlMatches(url, ignoreUrl)) {\n return true;\n }\n }\n return false;\n}\nexports.isUrlIgnored = isUrlIgnored;\n//# sourceMappingURL=url.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isWrapped = void 0;\n/**\n * Checks if certain function has been already wrapped\n * @param func\n */\nfunction isWrapped(func) {\n return (typeof func === 'function' &&\n typeof func.__original === 'function' &&\n typeof func.__unwrap === 'function' &&\n func.__wrapped === true);\n}\nexports.isWrapped = isWrapped;\n//# sourceMappingURL=wrap.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.2.0';\n//# sourceMappingURL=version.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./trace\"), exports);\n__exportStar(require(\"./resource\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticResourceAttributes = {\n /**\n * Name of the cloud provider.\n */\n CLOUD_PROVIDER: 'cloud.provider',\n /**\n * The cloud account ID the resource is assigned to.\n */\n CLOUD_ACCOUNT_ID: 'cloud.account.id',\n /**\n * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations).\n */\n CLOUD_REGION: 'cloud.region',\n /**\n * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\n *\n * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud.\n */\n CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone',\n /**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\n CLOUD_PLATFORM: 'cloud.platform',\n /**\n * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).\n */\n AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn',\n /**\n * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).\n */\n AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn',\n /**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n */\n AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype',\n /**\n * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).\n */\n AWS_ECS_TASK_ARN: 'aws.ecs.task.arn',\n /**\n * The task definition family this task definition is a member of.\n */\n AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family',\n /**\n * The revision for this task definition.\n */\n AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision',\n /**\n * The ARN of an EKS cluster.\n */\n AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn',\n /**\n * The name(s) of the AWS log group(s) an application is writing to.\n *\n * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.\n */\n AWS_LOG_GROUP_NAMES: 'aws.log.group.names',\n /**\n * The Amazon Resource Name(s) (ARN) of the AWS log group(s).\n *\n * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).\n */\n AWS_LOG_GROUP_ARNS: 'aws.log.group.arns',\n /**\n * The name(s) of the AWS log stream(s) an application is writing to.\n */\n AWS_LOG_STREAM_NAMES: 'aws.log.stream.names',\n /**\n * The ARN(s) of the AWS log stream(s).\n *\n * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.\n */\n AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns',\n /**\n * Container name.\n */\n CONTAINER_NAME: 'container.name',\n /**\n * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated.\n */\n CONTAINER_ID: 'container.id',\n /**\n * The container runtime managing this container.\n */\n CONTAINER_RUNTIME: 'container.runtime',\n /**\n * Name of the image the container was built on.\n */\n CONTAINER_IMAGE_NAME: 'container.image.name',\n /**\n * Container image tag.\n */\n CONTAINER_IMAGE_TAG: 'container.image.tag',\n /**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n */\n DEPLOYMENT_ENVIRONMENT: 'deployment.environment',\n /**\n * A unique identifier representing the device.\n *\n * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.\n */\n DEVICE_ID: 'device.id',\n /**\n * The model identifier for the device.\n *\n * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.\n */\n DEVICE_MODEL_IDENTIFIER: 'device.model.identifier',\n /**\n * The marketing name for the device model.\n *\n * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.\n */\n DEVICE_MODEL_NAME: 'device.model.name',\n /**\n * The name of the single function that this runtime instance executes.\n *\n * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes).\n */\n FAAS_NAME: 'faas.name',\n /**\n * The unique ID of the single function that this runtime instance executes.\n *\n * Note: Depending on the cloud provider, use:\n \n * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\n Take care not to use the "invoked ARN" directly but replace any\n [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple\n different aliases.\n * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\n * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).\n \n On some providers, it may not be possible to determine the full ID at startup,\n which is why this field cannot be made required. For example, on AWS the account ID\n part of the ARN is not available without calling another AWS API\n which may be deemed too slow for a short-running lambda function.\n As an alternative, consider setting `faas.id` as a span attribute instead.\n */\n FAAS_ID: 'faas.id',\n /**\n * The immutable version of the function being executed.\n *\n * Note: Depending on the cloud provider and platform, use:\n \n * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\n (an integer represented as a decimal string).\n * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions)\n (i.e., the function name plus the revision suffix).\n * **Google Cloud Functions:** The value of the\n [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\n * **Azure Functions:** Not applicable. Do not set this attribute.\n */\n FAAS_VERSION: 'faas.version',\n /**\n * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\n *\n * Note: * **AWS Lambda:** Use the (full) log stream name.\n */\n FAAS_INSTANCE: 'faas.instance',\n /**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.\n */\n FAAS_MAX_MEMORY: 'faas.max_memory',\n /**\n * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.\n */\n HOST_ID: 'host.id',\n /**\n * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\n */\n HOST_NAME: 'host.name',\n /**\n * Type of host. For Cloud, this must be the machine type.\n */\n HOST_TYPE: 'host.type',\n /**\n * The CPU architecture the host system is running on.\n */\n HOST_ARCH: 'host.arch',\n /**\n * Name of the VM image or OS install the host was instantiated from.\n */\n HOST_IMAGE_NAME: 'host.image.name',\n /**\n * VM image ID. For Cloud, this value is from the provider.\n */\n HOST_IMAGE_ID: 'host.image.id',\n /**\n * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes).\n */\n HOST_IMAGE_VERSION: 'host.image.version',\n /**\n * The name of the cluster.\n */\n K8S_CLUSTER_NAME: 'k8s.cluster.name',\n /**\n * The name of the Node.\n */\n K8S_NODE_NAME: 'k8s.node.name',\n /**\n * The UID of the Node.\n */\n K8S_NODE_UID: 'k8s.node.uid',\n /**\n * The name of the namespace that the pod is running in.\n */\n K8S_NAMESPACE_NAME: 'k8s.namespace.name',\n /**\n * The UID of the Pod.\n */\n K8S_POD_UID: 'k8s.pod.uid',\n /**\n * The name of the Pod.\n */\n K8S_POD_NAME: 'k8s.pod.name',\n /**\n * The name of the Container in a Pod template.\n */\n K8S_CONTAINER_NAME: 'k8s.container.name',\n /**\n * The UID of the ReplicaSet.\n */\n K8S_REPLICASET_UID: 'k8s.replicaset.uid',\n /**\n * The name of the ReplicaSet.\n */\n K8S_REPLICASET_NAME: 'k8s.replicaset.name',\n /**\n * The UID of the Deployment.\n */\n K8S_DEPLOYMENT_UID: 'k8s.deployment.uid',\n /**\n * The name of the Deployment.\n */\n K8S_DEPLOYMENT_NAME: 'k8s.deployment.name',\n /**\n * The UID of the StatefulSet.\n */\n K8S_STATEFULSET_UID: 'k8s.statefulset.uid',\n /**\n * The name of the StatefulSet.\n */\n K8S_STATEFULSET_NAME: 'k8s.statefulset.name',\n /**\n * The UID of the DaemonSet.\n */\n K8S_DAEMONSET_UID: 'k8s.daemonset.uid',\n /**\n * The name of the DaemonSet.\n */\n K8S_DAEMONSET_NAME: 'k8s.daemonset.name',\n /**\n * The UID of the Job.\n */\n K8S_JOB_UID: 'k8s.job.uid',\n /**\n * The name of the Job.\n */\n K8S_JOB_NAME: 'k8s.job.name',\n /**\n * The UID of the CronJob.\n */\n K8S_CRONJOB_UID: 'k8s.cronjob.uid',\n /**\n * The name of the CronJob.\n */\n K8S_CRONJOB_NAME: 'k8s.cronjob.name',\n /**\n * The operating system type.\n */\n OS_TYPE: 'os.type',\n /**\n * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\n */\n OS_DESCRIPTION: 'os.description',\n /**\n * Human readable operating system name.\n */\n OS_NAME: 'os.name',\n /**\n * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes).\n */\n OS_VERSION: 'os.version',\n /**\n * Process identifier (PID).\n */\n PROCESS_PID: 'process.pid',\n /**\n * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_NAME: 'process.executable.name',\n /**\n * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_PATH: 'process.executable.path',\n /**\n * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\n */\n PROCESS_COMMAND: 'process.command',\n /**\n * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead.\n */\n PROCESS_COMMAND_LINE: 'process.command_line',\n /**\n * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.\n */\n PROCESS_COMMAND_ARGS: 'process.command_args',\n /**\n * The username of the user that owns the process.\n */\n PROCESS_OWNER: 'process.owner',\n /**\n * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.\n */\n PROCESS_RUNTIME_NAME: 'process.runtime.name',\n /**\n * The version of the runtime of this process, as returned by the runtime without modification.\n */\n PROCESS_RUNTIME_VERSION: 'process.runtime.version',\n /**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n */\n PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description',\n /**\n * Logical name of the service.\n *\n * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\n */\n SERVICE_NAME: 'service.name',\n /**\n * A namespace for `service.name`.\n *\n * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\n */\n SERVICE_NAMESPACE: 'service.namespace',\n /**\n * The string ID of the service instance.\n *\n * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).\n */\n SERVICE_INSTANCE_ID: 'service.instance.id',\n /**\n * The version string of the service API or implementation.\n */\n SERVICE_VERSION: 'service.version',\n /**\n * The name of the telemetry SDK as defined above.\n */\n TELEMETRY_SDK_NAME: 'telemetry.sdk.name',\n /**\n * The language of the telemetry SDK.\n */\n TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language',\n /**\n * The version string of the telemetry SDK.\n */\n TELEMETRY_SDK_VERSION: 'telemetry.sdk.version',\n /**\n * The version string of the auto instrumentation agent, if used.\n */\n TELEMETRY_AUTO_VERSION: 'telemetry.auto.version',\n /**\n * The name of the web engine.\n */\n WEBENGINE_NAME: 'webengine.name',\n /**\n * The version of the web engine.\n */\n WEBENGINE_VERSION: 'webengine.version',\n /**\n * Additional description of the web engine (e.g. detailed version and edition information).\n */\n WEBENGINE_DESCRIPTION: 'webengine.description',\n};\nexports.CloudProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.CloudPlatformValues = {\n /** Alibaba Cloud Elastic Compute Service. */\n ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs',\n /** Alibaba Cloud Function Compute. */\n ALIBABA_CLOUD_FC: 'alibaba_cloud_fc',\n /** AWS Elastic Compute Cloud. */\n AWS_EC2: 'aws_ec2',\n /** AWS Elastic Container Service. */\n AWS_ECS: 'aws_ecs',\n /** AWS Elastic Kubernetes Service. */\n AWS_EKS: 'aws_eks',\n /** AWS Lambda. */\n AWS_LAMBDA: 'aws_lambda',\n /** AWS Elastic Beanstalk. */\n AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk',\n /** Azure Virtual Machines. */\n AZURE_VM: 'azure_vm',\n /** Azure Container Instances. */\n AZURE_CONTAINER_INSTANCES: 'azure_container_instances',\n /** Azure Kubernetes Service. */\n AZURE_AKS: 'azure_aks',\n /** Azure Functions. */\n AZURE_FUNCTIONS: 'azure_functions',\n /** Azure App Service. */\n AZURE_APP_SERVICE: 'azure_app_service',\n /** Google Cloud Compute Engine (GCE). */\n GCP_COMPUTE_ENGINE: 'gcp_compute_engine',\n /** Google Cloud Run. */\n GCP_CLOUD_RUN: 'gcp_cloud_run',\n /** Google Cloud Kubernetes Engine (GKE). */\n GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine',\n /** Google Cloud Functions (GCF). */\n GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions',\n /** Google Cloud App Engine (GAE). */\n GCP_APP_ENGINE: 'gcp_app_engine',\n};\nexports.AwsEcsLaunchtypeValues = {\n /** ec2. */\n EC2: 'ec2',\n /** fargate. */\n FARGATE: 'fargate',\n};\nexports.HostArchValues = {\n /** AMD64. */\n AMD64: 'amd64',\n /** ARM32. */\n ARM32: 'arm32',\n /** ARM64. */\n ARM64: 'arm64',\n /** Itanium. */\n IA64: 'ia64',\n /** 32-bit PowerPC. */\n PPC32: 'ppc32',\n /** 64-bit PowerPC. */\n PPC64: 'ppc64',\n /** 32-bit x86. */\n X86: 'x86',\n};\nexports.OsTypeValues = {\n /** Microsoft Windows. */\n WINDOWS: 'windows',\n /** Linux. */\n LINUX: 'linux',\n /** Apple Darwin. */\n DARWIN: 'darwin',\n /** FreeBSD. */\n FREEBSD: 'freebsd',\n /** NetBSD. */\n NETBSD: 'netbsd',\n /** OpenBSD. */\n OPENBSD: 'openbsd',\n /** DragonFly BSD. */\n DRAGONFLYBSD: 'dragonflybsd',\n /** HP-UX (Hewlett Packard Unix). */\n HPUX: 'hpux',\n /** AIX (Advanced Interactive eXecutive). */\n AIX: 'aix',\n /** Oracle Solaris. */\n SOLARIS: 'solaris',\n /** IBM z/OS. */\n Z_OS: 'z_os',\n};\nexports.TelemetrySdkLanguageValues = {\n /** cpp. */\n CPP: 'cpp',\n /** dotnet. */\n DOTNET: 'dotnet',\n /** erlang. */\n ERLANG: 'erlang',\n /** go. */\n GO: 'go',\n /** java. */\n JAVA: 'java',\n /** nodejs. */\n NODEJS: 'nodejs',\n /** php. */\n PHP: 'php',\n /** python. */\n PYTHON: 'python',\n /** ruby. */\n RUBY: 'ruby',\n /** webjs. */\n WEBJS: 'webjs',\n};\n//# sourceMappingURL=SemanticResourceAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticResourceAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticAttributes = {\n /**\n * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).\n *\n * Note: This may be different from `faas.id` if an alias is involved.\n */\n AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn',\n /**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\n DB_SYSTEM: 'db.system',\n /**\n * The connection string used to connect to the database. It is recommended to remove embedded credentials.\n */\n DB_CONNECTION_STRING: 'db.connection_string',\n /**\n * Username for accessing the database.\n */\n DB_USER: 'db.user',\n /**\n * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n */\n DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname',\n /**\n * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n *\n * Note: In some SQL databases, the database name to be used is called "schema name".\n */\n DB_NAME: 'db.name',\n /**\n * The database statement being executed.\n *\n * Note: The value may be sanitized to exclude sensitive information.\n */\n DB_STATEMENT: 'db.statement',\n /**\n * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n *\n * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n */\n DB_OPERATION: 'db.operation',\n /**\n * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n *\n * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).\n */\n DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name',\n /**\n * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace',\n /**\n * The fetch size used for paging, i.e. how many rows will be returned at once.\n */\n DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size',\n /**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\n DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_CASSANDRA_TABLE: 'db.cassandra.table',\n /**\n * Whether or not the query is idempotent.\n */\n DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence',\n /**\n * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\n */\n DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count',\n /**\n * The ID of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id',\n /**\n * The data center of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc',\n /**\n * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_HBASE_NAMESPACE: 'db.hbase.namespace',\n /**\n * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n */\n DB_REDIS_DATABASE_INDEX: 'db.redis.database_index',\n /**\n * The collection being accessed within the database stated in `db.name`.\n */\n DB_MONGODB_COLLECTION: 'db.mongodb.collection',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_SQL_TABLE: 'db.sql.table',\n /**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n */\n EXCEPTION_TYPE: 'exception.type',\n /**\n * The exception message.\n */\n EXCEPTION_MESSAGE: 'exception.message',\n /**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n */\n EXCEPTION_STACKTRACE: 'exception.stacktrace',\n /**\n * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n *\n * Note: An exception is considered to have escaped (or left) the scope of a span,\n if that span is ended while the exception is still logically "in flight".\n This may be actually "in flight" in some languages (e.g. if the exception\n is passed to a Context manager's `__exit__` method in Python) but will\n usually be caught at the point of recording the exception in most languages.\n \n It is usually not possible to determine at the point where an exception is thrown\n whether it will escape the scope of a span.\n However, it is trivial to know that an exception\n will escape, if one checks for an active exception just before ending the span,\n as done in the [example above](#exception-end-example).\n \n It follows that an exception may still escape the scope of the span\n even if the `exception.escaped` attribute was not set or set to false,\n since the event might have been recorded at a time where it was not\n clear whether the exception will escape.\n */\n EXCEPTION_ESCAPED: 'exception.escaped',\n /**\n * Type of the trigger on which the function is executed.\n */\n FAAS_TRIGGER: 'faas.trigger',\n /**\n * The execution ID of the current function execution.\n */\n FAAS_EXECUTION: 'faas.execution',\n /**\n * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\n */\n FAAS_DOCUMENT_COLLECTION: 'faas.document.collection',\n /**\n * Describes the type of the operation that was performed on the data.\n */\n FAAS_DOCUMENT_OPERATION: 'faas.document.operation',\n /**\n * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_DOCUMENT_TIME: 'faas.document.time',\n /**\n * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\n */\n FAAS_DOCUMENT_NAME: 'faas.document.name',\n /**\n * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_TIME: 'faas.time',\n /**\n * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\n */\n FAAS_CRON: 'faas.cron',\n /**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start).\n */\n FAAS_COLDSTART: 'faas.coldstart',\n /**\n * The name of the invoked function.\n *\n * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.\n */\n FAAS_INVOKED_NAME: 'faas.invoked_name',\n /**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\n FAAS_INVOKED_PROVIDER: 'faas.invoked_provider',\n /**\n * The cloud region of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\n */\n FAAS_INVOKED_REGION: 'faas.invoked_region',\n /**\n * Transport protocol used. See note below.\n */\n NET_TRANSPORT: 'net.transport',\n /**\n * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6).\n */\n NET_PEER_IP: 'net.peer.ip',\n /**\n * Remote port number.\n */\n NET_PEER_PORT: 'net.peer.port',\n /**\n * Remote hostname or similar, see note below.\n */\n NET_PEER_NAME: 'net.peer.name',\n /**\n * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.\n */\n NET_HOST_IP: 'net.host.ip',\n /**\n * Like `net.peer.port` but for the host port.\n */\n NET_HOST_PORT: 'net.host.port',\n /**\n * Local hostname or similar, see note below.\n */\n NET_HOST_NAME: 'net.host.name',\n /**\n * The internet connection type currently being used by the host.\n */\n NET_HOST_CONNECTION_TYPE: 'net.host.connection.type',\n /**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\n NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype',\n /**\n * The name of the mobile carrier.\n */\n NET_HOST_CARRIER_NAME: 'net.host.carrier.name',\n /**\n * The mobile carrier country code.\n */\n NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc',\n /**\n * The mobile carrier network code.\n */\n NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc',\n /**\n * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\n */\n NET_HOST_CARRIER_ICC: 'net.host.carrier.icc',\n /**\n * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\n */\n PEER_SERVICE: 'peer.service',\n /**\n * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.\n */\n ENDUSER_ID: 'enduser.id',\n /**\n * Actual/assumed role the client is making the request under extracted from token or application security context.\n */\n ENDUSER_ROLE: 'enduser.role',\n /**\n * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).\n */\n ENDUSER_SCOPE: 'enduser.scope',\n /**\n * Current "managed" thread ID (as opposed to OS thread ID).\n */\n THREAD_ID: 'thread.id',\n /**\n * Current thread name.\n */\n THREAD_NAME: 'thread.name',\n /**\n * The method or function name, or equivalent (usually rightmost part of the code unit's name).\n */\n CODE_FUNCTION: 'code.function',\n /**\n * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.\n */\n CODE_NAMESPACE: 'code.namespace',\n /**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\n */\n CODE_FILEPATH: 'code.filepath',\n /**\n * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.\n */\n CODE_LINENO: 'code.lineno',\n /**\n * HTTP request method.\n */\n HTTP_METHOD: 'http.method',\n /**\n * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.\n *\n * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`.\n */\n HTTP_URL: 'http.url',\n /**\n * The full request target as passed in a HTTP request line or equivalent.\n */\n HTTP_TARGET: 'http.target',\n /**\n * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.\n *\n * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.\n */\n HTTP_HOST: 'http.host',\n /**\n * The URI scheme identifying the used protocol.\n */\n HTTP_SCHEME: 'http.scheme',\n /**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n */\n HTTP_STATUS_CODE: 'http.status_code',\n /**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\n HTTP_FLAVOR: 'http.flavor',\n /**\n * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client.\n */\n HTTP_USER_AGENT: 'http.user_agent',\n /**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length',\n /**\n * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed',\n /**\n * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length',\n /**\n * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed',\n /**\n * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).\n *\n * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available.\n */\n HTTP_SERVER_NAME: 'http.server_name',\n /**\n * The matched route (path template).\n */\n HTTP_ROUTE: 'http.route',\n /**\n * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).\n *\n * Note: This is not necessarily the same as `net.peer.ip`, which would\n identify the network-level peer, which may be a proxy.\n \n This attribute should be set when a source of information different\n from the one used for `net.peer.ip`, is available even if that other\n source just confirms the same value as `net.peer.ip`.\n Rationale: For `net.peer.ip`, one typically does not know if it\n comes from a proxy, reverse proxy, or the actual client. Setting\n `http.client_ip` when it's the same as `net.peer.ip` means that\n one is at least somewhat confident that the address is not that of\n the closest proxy.\n */\n HTTP_CLIENT_IP: 'http.client_ip',\n /**\n * The keys in the `RequestItems` object field.\n */\n AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names',\n /**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field.\n */\n AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity',\n /**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field.\n */\n AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics',\n /**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity',\n /**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity',\n /**\n * The value of the `ConsistentRead` request parameter.\n */\n AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read',\n /**\n * The value of the `ProjectionExpression` request parameter.\n */\n AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection',\n /**\n * The value of the `Limit` request parameter.\n */\n AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit',\n /**\n * The value of the `AttributesToGet` request parameter.\n */\n AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get',\n /**\n * The value of the `IndexName` request parameter.\n */\n AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name',\n /**\n * The value of the `Select` request parameter.\n */\n AWS_DYNAMODB_SELECT: 'aws.dynamodb.select',\n /**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes',\n /**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes',\n /**\n * The value of the `ExclusiveStartTableName` request parameter.\n */\n AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table',\n /**\n * The the number of items in the `TableNames` response parameter.\n */\n AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count',\n /**\n * The value of the `ScanIndexForward` request parameter.\n */\n AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward',\n /**\n * The value of the `Segment` request parameter.\n */\n AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment',\n /**\n * The value of the `TotalSegments` request parameter.\n */\n AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments',\n /**\n * The value of the `Count` response parameter.\n */\n AWS_DYNAMODB_COUNT: 'aws.dynamodb.count',\n /**\n * The value of the `ScannedCount` response parameter.\n */\n AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count',\n /**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field.\n */\n AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions',\n /**\n * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates',\n /**\n * A string identifying the messaging system.\n */\n MESSAGING_SYSTEM: 'messaging.system',\n /**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n */\n MESSAGING_DESTINATION: 'messaging.destination',\n /**\n * The kind of message destination.\n */\n MESSAGING_DESTINATION_KIND: 'messaging.destination_kind',\n /**\n * A boolean that is true if the message destination is temporary.\n */\n MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination',\n /**\n * The name of the transport protocol.\n */\n MESSAGING_PROTOCOL: 'messaging.protocol',\n /**\n * The version of the transport protocol.\n */\n MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version',\n /**\n * Connection string.\n */\n MESSAGING_URL: 'messaging.url',\n /**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n */\n MESSAGING_MESSAGE_ID: 'messaging.message_id',\n /**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".\n */\n MESSAGING_CONVERSATION_ID: 'messaging.conversation_id',\n /**\n * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.\n */\n MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes',\n /**\n * The compressed size of the message payload in bytes.\n */\n MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes',\n /**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n */\n MESSAGING_OPERATION: 'messaging.operation',\n /**\n * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.\n */\n MESSAGING_CONSUMER_ID: 'messaging.consumer_id',\n /**\n * RabbitMQ message routing key.\n */\n MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key',\n /**\n * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n *\n * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.\n */\n MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key',\n /**\n * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.\n */\n MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group',\n /**\n * Client Id for the Consumer or Producer that is handling the message.\n */\n MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id',\n /**\n * Partition the message is sent to.\n */\n MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition',\n /**\n * A boolean that is true if the message is a tombstone.\n */\n MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone',\n /**\n * A string identifying the remoting system.\n */\n RPC_SYSTEM: 'rpc.system',\n /**\n * The full (logical) name of the service being called, including its package name, if applicable.\n *\n * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\n */\n RPC_SERVICE: 'rpc.service',\n /**\n * The name of the (logical) method being called, must be equal to the $method part in the span name.\n *\n * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\n */\n RPC_METHOD: 'rpc.method',\n /**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\n RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code',\n /**\n * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.\n */\n RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version',\n /**\n * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\n */\n RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id',\n /**\n * `error.code` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code',\n /**\n * `error.message` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message',\n /**\n * Whether this is a received or sent message.\n */\n MESSAGE_TYPE: 'message.type',\n /**\n * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\n *\n * Note: This way we guarantee that the values will be consistent between different implementations.\n */\n MESSAGE_ID: 'message.id',\n /**\n * Compressed size of the message in bytes.\n */\n MESSAGE_COMPRESSED_SIZE: 'message.compressed_size',\n /**\n * Uncompressed size of the message in bytes.\n */\n MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size',\n};\nexports.DbSystemValues = {\n /** Some other SQL database. Fallback only. See notes. */\n OTHER_SQL: 'other_sql',\n /** Microsoft SQL Server. */\n MSSQL: 'mssql',\n /** MySQL. */\n MYSQL: 'mysql',\n /** Oracle Database. */\n ORACLE: 'oracle',\n /** IBM Db2. */\n DB2: 'db2',\n /** PostgreSQL. */\n POSTGRESQL: 'postgresql',\n /** Amazon Redshift. */\n REDSHIFT: 'redshift',\n /** Apache Hive. */\n HIVE: 'hive',\n /** Cloudscape. */\n CLOUDSCAPE: 'cloudscape',\n /** HyperSQL DataBase. */\n HSQLDB: 'hsqldb',\n /** Progress Database. */\n PROGRESS: 'progress',\n /** SAP MaxDB. */\n MAXDB: 'maxdb',\n /** SAP HANA. */\n HANADB: 'hanadb',\n /** Ingres. */\n INGRES: 'ingres',\n /** FirstSQL. */\n FIRSTSQL: 'firstsql',\n /** EnterpriseDB. */\n EDB: 'edb',\n /** InterSystems Caché. */\n CACHE: 'cache',\n /** Adabas (Adaptable Database System). */\n ADABAS: 'adabas',\n /** Firebird. */\n FIREBIRD: 'firebird',\n /** Apache Derby. */\n DERBY: 'derby',\n /** FileMaker. */\n FILEMAKER: 'filemaker',\n /** Informix. */\n INFORMIX: 'informix',\n /** InstantDB. */\n INSTANTDB: 'instantdb',\n /** InterBase. */\n INTERBASE: 'interbase',\n /** MariaDB. */\n MARIADB: 'mariadb',\n /** Netezza. */\n NETEZZA: 'netezza',\n /** Pervasive PSQL. */\n PERVASIVE: 'pervasive',\n /** PointBase. */\n POINTBASE: 'pointbase',\n /** SQLite. */\n SQLITE: 'sqlite',\n /** Sybase. */\n SYBASE: 'sybase',\n /** Teradata. */\n TERADATA: 'teradata',\n /** Vertica. */\n VERTICA: 'vertica',\n /** H2. */\n H2: 'h2',\n /** ColdFusion IMQ. */\n COLDFUSION: 'coldfusion',\n /** Apache Cassandra. */\n CASSANDRA: 'cassandra',\n /** Apache HBase. */\n HBASE: 'hbase',\n /** MongoDB. */\n MONGODB: 'mongodb',\n /** Redis. */\n REDIS: 'redis',\n /** Couchbase. */\n COUCHBASE: 'couchbase',\n /** CouchDB. */\n COUCHDB: 'couchdb',\n /** Microsoft Azure Cosmos DB. */\n COSMOSDB: 'cosmosdb',\n /** Amazon DynamoDB. */\n DYNAMODB: 'dynamodb',\n /** Neo4j. */\n NEO4J: 'neo4j',\n /** Apache Geode. */\n GEODE: 'geode',\n /** Elasticsearch. */\n ELASTICSEARCH: 'elasticsearch',\n /** Memcached. */\n MEMCACHED: 'memcached',\n /** CockroachDB. */\n COCKROACHDB: 'cockroachdb',\n};\nexports.DbCassandraConsistencyLevelValues = {\n /** all. */\n ALL: 'all',\n /** each_quorum. */\n EACH_QUORUM: 'each_quorum',\n /** quorum. */\n QUORUM: 'quorum',\n /** local_quorum. */\n LOCAL_QUORUM: 'local_quorum',\n /** one. */\n ONE: 'one',\n /** two. */\n TWO: 'two',\n /** three. */\n THREE: 'three',\n /** local_one. */\n LOCAL_ONE: 'local_one',\n /** any. */\n ANY: 'any',\n /** serial. */\n SERIAL: 'serial',\n /** local_serial. */\n LOCAL_SERIAL: 'local_serial',\n};\nexports.FaasTriggerValues = {\n /** A response to some data source operation such as a database or filesystem read/write. */\n DATASOURCE: 'datasource',\n /** To provide an answer to an inbound HTTP request. */\n HTTP: 'http',\n /** A function is set to be executed when messages are sent to a messaging system. */\n PUBSUB: 'pubsub',\n /** A function is scheduled to be executed regularly. */\n TIMER: 'timer',\n /** If none of the others apply. */\n OTHER: 'other',\n};\nexports.FaasDocumentOperationValues = {\n /** When a new object is created. */\n INSERT: 'insert',\n /** When an object is modified. */\n EDIT: 'edit',\n /** When an object is deleted. */\n DELETE: 'delete',\n};\nexports.FaasInvokedProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.NetTransportValues = {\n /** ip_tcp. */\n IP_TCP: 'ip_tcp',\n /** ip_udp. */\n IP_UDP: 'ip_udp',\n /** Another IP-based protocol. */\n IP: 'ip',\n /** Unix Domain socket. See below. */\n UNIX: 'unix',\n /** Named or anonymous pipe. See note below. */\n PIPE: 'pipe',\n /** In-process communication. */\n INPROC: 'inproc',\n /** Something else (non IP-based). */\n OTHER: 'other',\n};\nexports.NetHostConnectionTypeValues = {\n /** wifi. */\n WIFI: 'wifi',\n /** wired. */\n WIRED: 'wired',\n /** cell. */\n CELL: 'cell',\n /** unavailable. */\n UNAVAILABLE: 'unavailable',\n /** unknown. */\n UNKNOWN: 'unknown',\n};\nexports.NetHostConnectionSubtypeValues = {\n /** GPRS. */\n GPRS: 'gprs',\n /** EDGE. */\n EDGE: 'edge',\n /** UMTS. */\n UMTS: 'umts',\n /** CDMA. */\n CDMA: 'cdma',\n /** EVDO Rel. 0. */\n EVDO_0: 'evdo_0',\n /** EVDO Rev. A. */\n EVDO_A: 'evdo_a',\n /** CDMA2000 1XRTT. */\n CDMA2000_1XRTT: 'cdma2000_1xrtt',\n /** HSDPA. */\n HSDPA: 'hsdpa',\n /** HSUPA. */\n HSUPA: 'hsupa',\n /** HSPA. */\n HSPA: 'hspa',\n /** IDEN. */\n IDEN: 'iden',\n /** EVDO Rev. B. */\n EVDO_B: 'evdo_b',\n /** LTE. */\n LTE: 'lte',\n /** EHRPD. */\n EHRPD: 'ehrpd',\n /** HSPAP. */\n HSPAP: 'hspap',\n /** GSM. */\n GSM: 'gsm',\n /** TD-SCDMA. */\n TD_SCDMA: 'td_scdma',\n /** IWLAN. */\n IWLAN: 'iwlan',\n /** 5G NR (New Radio). */\n NR: 'nr',\n /** 5G NRNSA (New Radio Non-Standalone). */\n NRNSA: 'nrnsa',\n /** LTE CA. */\n LTE_CA: 'lte_ca',\n};\nexports.HttpFlavorValues = {\n /** HTTP 1.0. */\n HTTP_1_0: '1.0',\n /** HTTP 1.1. */\n HTTP_1_1: '1.1',\n /** HTTP 2. */\n HTTP_2_0: '2.0',\n /** SPDY protocol. */\n SPDY: 'SPDY',\n /** QUIC protocol. */\n QUIC: 'QUIC',\n};\nexports.MessagingDestinationKindValues = {\n /** A message sent to a queue. */\n QUEUE: 'queue',\n /** A message sent to a topic. */\n TOPIC: 'topic',\n};\nexports.MessagingOperationValues = {\n /** receive. */\n RECEIVE: 'receive',\n /** process. */\n PROCESS: 'process',\n};\nexports.RpcGrpcStatusCodeValues = {\n /** OK. */\n OK: 0,\n /** CANCELLED. */\n CANCELLED: 1,\n /** UNKNOWN. */\n UNKNOWN: 2,\n /** INVALID_ARGUMENT. */\n INVALID_ARGUMENT: 3,\n /** DEADLINE_EXCEEDED. */\n DEADLINE_EXCEEDED: 4,\n /** NOT_FOUND. */\n NOT_FOUND: 5,\n /** ALREADY_EXISTS. */\n ALREADY_EXISTS: 6,\n /** PERMISSION_DENIED. */\n PERMISSION_DENIED: 7,\n /** RESOURCE_EXHAUSTED. */\n RESOURCE_EXHAUSTED: 8,\n /** FAILED_PRECONDITION. */\n FAILED_PRECONDITION: 9,\n /** ABORTED. */\n ABORTED: 10,\n /** OUT_OF_RANGE. */\n OUT_OF_RANGE: 11,\n /** UNIMPLEMENTED. */\n UNIMPLEMENTED: 12,\n /** INTERNAL. */\n INTERNAL: 13,\n /** UNAVAILABLE. */\n UNAVAILABLE: 14,\n /** DATA_LOSS. */\n DATA_LOSS: 15,\n /** UNAUTHENTICATED. */\n UNAUTHENTICATED: 16,\n};\nexports.MessageTypeValues = {\n /** sent. */\n SENT: 'SENT',\n /** received. */\n RECEIVED: 'RECEIVED',\n};\n//# sourceMappingURL=SemanticAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toOTLPExportTraceServiceRequest = exports.toCollectorResource = exports.otlpTypes = void 0;\n__exportStar(require(\"./platform\"), exports);\nexports.otlpTypes = require(\"./types\");\nvar transform_1 = require(\"./transform\");\nObject.defineProperty(exports, \"toCollectorResource\", { enumerable: true, get: function () { return transform_1.toCollectorResource; } });\nObject.defineProperty(exports, \"toOTLPExportTraceServiceRequest\", { enumerable: true, get: function () { return transform_1.toOTLPExportTraceServiceRequest; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPTraceExporter = void 0;\nconst transform_1 = require(\"../../transform\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst otlp_exporter_base_1 = require(\"@opentelemetry/otlp-exporter-base\");\nconst otlp_exporter_base_2 = require(\"@opentelemetry/otlp-exporter-base\");\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = '/v1/traces';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n/**\n * Collector Trace Exporter for Node\n */\nclass OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterNodeBase {\n constructor(config = {}) {\n super(config);\n this.headers = Object.assign(this.headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS));\n }\n convert(spans) {\n return (0, transform_1.toOTLPExportTraceServiceRequest)(spans, this, true);\n }\n getDefaultUrl(config) {\n return typeof config.url === 'string'\n ? config.url\n : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0\n ? (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT\n : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? (0, otlp_exporter_base_2.appendResourcePathToUrlIfNotPresent)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : DEFAULT_COLLECTOR_URL;\n }\n}\nexports.OTLPTraceExporter = OTLPTraceExporter;\n//# sourceMappingURL=OTLPTraceExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./OTLPTraceExporter\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.groupSpansByResourceAndLibrary = exports.toOTLPExportTraceServiceRequest = exports.toCollectorTraceState = exports.toCollectorKind = exports.toCollectorResource = exports.toCollectorStatus = exports.toCollectorSpan = exports.toCollectorEvents = exports.toCollectorAnyValue = exports.toCollectorAttributeKeyValue = exports.toCollectorKeyValueList = exports.toCollectorArrayValue = exports.toCollectorAttributes = void 0;\nconst core = require(\"@opentelemetry/core\");\nconst types_1 = require(\"./types\");\nconst MAX_INTEGER_VALUE = 2147483647;\nconst MIN_INTEGER_VALUE = -2147483648;\n/**\n * Converts attributes to KeyValue array\n * @param attributes\n */\nfunction toCollectorAttributes(attributes) {\n return Object.keys(attributes).map(key => {\n return toCollectorAttributeKeyValue(key, attributes[key]);\n });\n}\nexports.toCollectorAttributes = toCollectorAttributes;\n/**\n * Converts array of unknown value to ArrayValue\n * @param values\n */\nfunction toCollectorArrayValue(values) {\n return {\n values: values.map(value => toCollectorAnyValue(value)),\n };\n}\nexports.toCollectorArrayValue = toCollectorArrayValue;\n/**\n * Converts attributes to KeyValueList\n * @param attributes\n */\nfunction toCollectorKeyValueList(attributes) {\n return {\n values: toCollectorAttributes(attributes),\n };\n}\nexports.toCollectorKeyValueList = toCollectorKeyValueList;\n/**\n * Converts key and unknown value to KeyValue\n * @param value event value\n */\nfunction toCollectorAttributeKeyValue(key, value) {\n const anyValue = toCollectorAnyValue(value);\n return {\n key,\n value: anyValue,\n };\n}\nexports.toCollectorAttributeKeyValue = toCollectorAttributeKeyValue;\n/**\n * Converts unknown value to AnyValue\n * @param value\n */\nfunction toCollectorAnyValue(value) {\n const anyValue = {};\n if (typeof value === 'string') {\n anyValue.stringValue = value;\n }\n else if (typeof value === 'boolean') {\n anyValue.boolValue = value;\n }\n else if (typeof value === 'number' &&\n value <= MAX_INTEGER_VALUE &&\n value >= MIN_INTEGER_VALUE &&\n Number.isInteger(value)) {\n anyValue.intValue = value;\n }\n else if (typeof value === 'number') {\n anyValue.doubleValue = value;\n }\n else if (Array.isArray(value)) {\n anyValue.arrayValue = toCollectorArrayValue(value);\n }\n else if (value) {\n anyValue.kvlistValue = toCollectorKeyValueList(value);\n }\n return anyValue;\n}\nexports.toCollectorAnyValue = toCollectorAnyValue;\n/**\n *\n * Converts events\n * @param events array of events\n */\nfunction toCollectorEvents(timedEvents) {\n return timedEvents.map(timedEvent => {\n const timeUnixNano = core.hrTimeToNanoseconds(timedEvent.time);\n const name = timedEvent.name;\n const attributes = toCollectorAttributes(timedEvent.attributes || {});\n const droppedAttributesCount = 0;\n const protoEvent = {\n timeUnixNano,\n name,\n attributes,\n droppedAttributesCount,\n };\n return protoEvent;\n });\n}\nexports.toCollectorEvents = toCollectorEvents;\n/**\n * Converts links\n * @param span\n * @param useHex - if ids should be kept as hex without converting to base64\n */\nfunction toCollectorLinks(span, useHex) {\n return span.links.map((link) => {\n const protoLink = {\n traceId: useHex\n ? link.context.traceId\n : core.hexToBase64(link.context.traceId),\n spanId: useHex\n ? link.context.spanId\n : core.hexToBase64(link.context.spanId),\n attributes: toCollectorAttributes(link.attributes || {}),\n droppedAttributesCount: 0,\n };\n return protoLink;\n });\n}\n/**\n * Converts span\n * @param span\n * @param useHex - if ids should be kept as hex without converting to base64\n */\nfunction toCollectorSpan(span, useHex) {\n return {\n traceId: useHex\n ? span.spanContext().traceId\n : core.hexToBase64(span.spanContext().traceId),\n spanId: useHex\n ? span.spanContext().spanId\n : core.hexToBase64(span.spanContext().spanId),\n parentSpanId: span.parentSpanId\n ? useHex\n ? span.parentSpanId\n : core.hexToBase64(span.parentSpanId)\n : undefined,\n traceState: toCollectorTraceState(span.spanContext().traceState),\n name: span.name,\n kind: toCollectorKind(span.kind),\n startTimeUnixNano: core.hrTimeToNanoseconds(span.startTime),\n endTimeUnixNano: core.hrTimeToNanoseconds(span.endTime),\n attributes: toCollectorAttributes(span.attributes),\n droppedAttributesCount: 0,\n events: toCollectorEvents(span.events),\n droppedEventsCount: 0,\n status: toCollectorStatus(span.status),\n links: toCollectorLinks(span, useHex),\n droppedLinksCount: 0,\n };\n}\nexports.toCollectorSpan = toCollectorSpan;\n/**\n * Converts status\n * @param status\n */\nfunction toCollectorStatus(status) {\n const spanStatus = {\n code: status.code,\n };\n if (typeof status.message !== 'undefined') {\n spanStatus.message = status.message;\n }\n return spanStatus;\n}\nexports.toCollectorStatus = toCollectorStatus;\n/**\n * Converts resource\n * @param resource\n * @param additionalAttributes\n */\nfunction toCollectorResource(resource, additionalAttributes = {}) {\n const attr = Object.assign({}, additionalAttributes, resource ? resource.attributes : {});\n const resourceProto = {\n attributes: toCollectorAttributes(attr),\n droppedAttributesCount: 0,\n };\n return resourceProto;\n}\nexports.toCollectorResource = toCollectorResource;\n/**\n * Converts span kind\n * @param kind\n */\nfunction toCollectorKind(kind) {\n const collectorKind = types_1.OTLP_SPAN_KIND_MAPPING[kind];\n return typeof collectorKind === 'number'\n ? collectorKind\n : types_1.opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_UNSPECIFIED;\n}\nexports.toCollectorKind = toCollectorKind;\n/**\n * Converts traceState\n * @param traceState\n */\nfunction toCollectorTraceState(traceState) {\n if (!traceState)\n return undefined;\n return traceState.serialize();\n}\nexports.toCollectorTraceState = toCollectorTraceState;\n/**\n * Prepares trace service request to be sent to collector\n * @param spans spans\n * @param collectorExporterBase\n * @param useHex - if ids should be kept as hex without converting to base64\n */\nfunction toOTLPExportTraceServiceRequest(spans, collectorTraceExporterBase, useHex) {\n const groupedSpans = groupSpansByResourceAndLibrary(spans);\n const additionalAttributes = Object.assign({}, collectorTraceExporterBase.attributes);\n return {\n resourceSpans: toCollectorResourceSpans(groupedSpans, additionalAttributes, useHex),\n };\n}\nexports.toOTLPExportTraceServiceRequest = toOTLPExportTraceServiceRequest;\n/**\n * Takes an array of spans and groups them by resource and instrumentation\n * library\n * @param spans spans\n */\nfunction groupSpansByResourceAndLibrary(spans) {\n return spans.reduce((spanMap, span) => {\n //group by resource\n let resourceSpans = spanMap.get(span.resource);\n if (!resourceSpans) {\n resourceSpans = new Map();\n spanMap.set(span.resource, resourceSpans);\n }\n //group by instrumentation library\n let libSpans = resourceSpans.get(span.instrumentationLibrary);\n if (!libSpans) {\n libSpans = new Array();\n resourceSpans.set(span.instrumentationLibrary, libSpans);\n }\n libSpans.push(span);\n return spanMap;\n }, new Map());\n}\nexports.groupSpansByResourceAndLibrary = groupSpansByResourceAndLibrary;\n/**\n * Convert to InstrumentationLibrarySpans\n * @param instrumentationLibrary\n * @param spans\n * @param useHex - if ids should be kept as hex without converting to base64\n */\nfunction toCollectorInstrumentationLibrarySpans(instrumentationLibrary, spans, useHex) {\n return {\n spans: spans.map(span => toCollectorSpan(span, useHex)),\n instrumentationLibrary,\n };\n}\n/**\n * Returns a list of resource spans which will be exported to the collector\n * @param groupedSpans\n * @param baseAttributes\n * @param useHex - if ids should be kept as hex without converting to base64\n */\nfunction toCollectorResourceSpans(groupedSpans, baseAttributes, useHex) {\n return Array.from(groupedSpans, ([resource, libSpans]) => {\n return {\n resource: toCollectorResource(resource, baseAttributes),\n instrumentationLibrarySpans: Array.from(libSpans, ([instrumentationLibrary, spans]) => toCollectorInstrumentationLibrarySpans(instrumentationLibrary, spans, useHex)),\n };\n });\n}\n//# sourceMappingURL=transform.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLP_SPAN_KIND_MAPPING = exports.opentelemetryProto = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nvar opentelemetryProto;\n(function (opentelemetryProto) {\n let metrics;\n (function (metrics) {\n let v1;\n (function (v1) {\n let AggregationTemporality;\n (function (AggregationTemporality) {\n // UNSPECIFIED is the default AggregationTemporality, it MUST not be used.\n AggregationTemporality[AggregationTemporality[\"AGGREGATION_TEMPORALITY_UNSPECIFIED\"] = 0] = \"AGGREGATION_TEMPORALITY_UNSPECIFIED\";\n // DELTA is an AggregationTemporality for a metric aggregator which reports\n // changes since last report time. Successive metrics contain aggregation of\n // values from continuous and non-overlapping intervals.\n //\n // The values for a DELTA metric are based only on the time interval\n // associated with one measurement cycle. There is no dependency on\n // previous measurements like is the case for CUMULATIVE metrics.\n //\n // For example, consider a system measuring the number of requests that\n // it receives and reports the sum of these requests every second as a\n // DELTA metric:\n //\n // 1. The system starts receiving at time=t_0.\n // 2. A request is received, the system measures 1 request.\n // 3. A request is received, the system measures 1 request.\n // 4. A request is received, the system measures 1 request.\n // 5. The 1 second collection cycle ends. A metric is exported for the\n // number of requests received over the interval of time t_0 to\n // t_0+1 with a value of 3.\n // 6. A request is received, the system measures 1 request.\n // 7. A request is received, the system measures 1 request.\n // 8. The 1 second collection cycle ends. A metric is exported for the\n // number of requests received over the interval of time t_0+1 to\n // t_0+2 with a value of 2.\n AggregationTemporality[AggregationTemporality[\"AGGREGATION_TEMPORALITY_DELTA\"] = 1] = \"AGGREGATION_TEMPORALITY_DELTA\";\n // CUMULATIVE is an AggregationTemporality for a metric aggregator which\n // reports changes since a fixed start time. This means that current values\n // of a CUMULATIVE metric depend on all previous measurements since the\n // start time. Because of this, the sender is required to retain this state\n // in some form. If this state is lost or invalidated, the CUMULATIVE metric\n // values MUST be reset and a new fixed start time following the last\n // reported measurement time sent MUST be used.\n //\n // For example, consider a system measuring the number of requests that\n // it receives and reports the sum of these requests every second as a\n // CUMULATIVE metric:\n //\n // 1. The system starts receiving at time=t_0.\n // 2. A request is received, the system measures 1 request.\n // 3. A request is received, the system measures 1 request.\n // 4. A request is received, the system measures 1 request.\n // 5. The 1 second collection cycle ends. A metric is exported for the\n // number of requests received over the interval of time t_0 to\n // t_0+1 with a value of 3.\n // 6. A request is received, the system measures 1 request.\n // 7. A request is received, the system measures 1 request.\n // 8. The 1 second collection cycle ends. A metric is exported for the\n // number of requests received over the interval of time t_0 to\n // t_0+2 with a value of 5.\n // 9. The system experiences a fault and loses state.\n // 10. The system recovers and resumes receiving at time=t_1.\n // 11. A request is received, the system measures 1 request.\n // 12. The 1 second collection cycle ends. A metric is exported for the\n // number of requests received over the interval of time t_1 to\n // t_0+1 with a value of 1.\n //\n // Note: Even though, when reporting changes since last report time, using\n // CUMULATIVE is valid, it is not recommended. This may cause problems for\n // systems that do not use start_time to determine when the aggregation\n // value was reset (e.g. Prometheus).\n AggregationTemporality[AggregationTemporality[\"AGGREGATION_TEMPORALITY_CUMULATIVE\"] = 2] = \"AGGREGATION_TEMPORALITY_CUMULATIVE\";\n })(AggregationTemporality = v1.AggregationTemporality || (v1.AggregationTemporality = {}));\n })(v1 = metrics.v1 || (metrics.v1 = {}));\n })(metrics = opentelemetryProto.metrics || (opentelemetryProto.metrics = {}));\n let trace;\n (function (trace) {\n let v1;\n (function (v1) {\n let ConstantSampler;\n (function (ConstantSampler) {\n let ConstantDecision;\n (function (ConstantDecision) {\n ConstantDecision[ConstantDecision[\"ALWAYS_OFF\"] = 0] = \"ALWAYS_OFF\";\n ConstantDecision[ConstantDecision[\"ALWAYS_ON\"] = 1] = \"ALWAYS_ON\";\n ConstantDecision[ConstantDecision[\"ALWAYS_PARENT\"] = 2] = \"ALWAYS_PARENT\";\n })(ConstantDecision = ConstantSampler.ConstantDecision || (ConstantSampler.ConstantDecision = {}));\n })(ConstantSampler = v1.ConstantSampler || (v1.ConstantSampler = {}));\n let Span;\n (function (Span) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n let SpanKind;\n (function (SpanKind) {\n SpanKind[SpanKind[\"SPAN_KIND_UNSPECIFIED\"] = 0] = \"SPAN_KIND_UNSPECIFIED\";\n SpanKind[SpanKind[\"SPAN_KIND_INTERNAL\"] = 1] = \"SPAN_KIND_INTERNAL\";\n SpanKind[SpanKind[\"SPAN_KIND_SERVER\"] = 2] = \"SPAN_KIND_SERVER\";\n SpanKind[SpanKind[\"SPAN_KIND_CLIENT\"] = 3] = \"SPAN_KIND_CLIENT\";\n SpanKind[SpanKind[\"SPAN_KIND_PRODUCER\"] = 4] = \"SPAN_KIND_PRODUCER\";\n SpanKind[SpanKind[\"SPAN_KIND_CONSUMER\"] = 5] = \"SPAN_KIND_CONSUMER\";\n })(SpanKind = Span.SpanKind || (Span.SpanKind = {}));\n })(Span = v1.Span || (v1.Span = {}));\n })(v1 = trace.v1 || (trace.v1 = {}));\n })(trace = opentelemetryProto.trace || (opentelemetryProto.trace = {}));\n let common;\n (function (common) {\n let v1;\n (function (v1) {\n let ValueType;\n (function (ValueType) {\n ValueType[ValueType[\"STRING\"] = 0] = \"STRING\";\n ValueType[ValueType[\"INT\"] = 1] = \"INT\";\n ValueType[ValueType[\"DOUBLE\"] = 2] = \"DOUBLE\";\n ValueType[ValueType[\"BOOL\"] = 3] = \"BOOL\";\n })(ValueType = v1.ValueType || (v1.ValueType = {}));\n })(v1 = common.v1 || (common.v1 = {}));\n })(common = opentelemetryProto.common || (opentelemetryProto.common = {}));\n})(opentelemetryProto = exports.opentelemetryProto || (exports.opentelemetryProto = {}));\n/**\n * Mapping between api SpanKind and proto SpanKind\n */\nexports.OTLP_SPAN_KIND_MAPPING = {\n [api_1.SpanKind.INTERNAL]: opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_INTERNAL,\n [api_1.SpanKind.SERVER]: opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_SERVER,\n [api_1.SpanKind.CLIENT]: opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_CLIENT,\n [api_1.SpanKind.PRODUCER]: opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_PRODUCER,\n [api_1.SpanKind.CONSUMER]: opentelemetryProto.trace.v1.Span.SpanKind.SPAN_KIND_CONSUMER,\n};\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExportResultCode = void 0;\nvar ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0;\nexports.BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexports.BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexports.BAGGAGE_ITEMS_SEPARATOR = ',';\n// Name of the http header used to propagate the baggage\nexports.BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CBaggagePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"../../trace/suppress-tracing\");\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\n/**\n * Propagates {@link Baggage} through Context format propagation.\n *\n * Based on the Baggage specification:\n * https://w3c.github.io/baggage/\n */\nclass W3CBaggagePropagator {\n inject(context, carrier, setter) {\n const baggage = api_1.propagation.getBaggage(context);\n if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))\n return;\n const keyPairs = (0, utils_1.getKeyPairs)(baggage)\n .filter((pair) => {\n return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;\n })\n .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS);\n const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs);\n if (headerValue.length > 0) {\n setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);\n }\n }\n extract(context, carrier, getter) {\n const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);\n const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue;\n if (!baggageString)\n return context;\n const baggage = {};\n if (baggageString.length === 0) {\n return context;\n }\n const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);\n pairs.forEach(entry => {\n const keyPair = (0, utils_1.parsePairKeyValue)(entry);\n if (keyPair) {\n const baggageEntry = { value: keyPair.value };\n if (keyPair.metadata) {\n baggageEntry.metadata = keyPair.metadata;\n }\n baggage[keyPair.key] = baggageEntry;\n }\n });\n if (Object.entries(baggage).length === 0) {\n return context;\n }\n return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));\n }\n fields() {\n return [constants_1.BAGGAGE_HEADER];\n }\n}\nexports.W3CBaggagePropagator = W3CBaggagePropagator;\n//# sourceMappingURL=W3CBaggagePropagator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst api_1 = require(\"@opentelemetry/api\");\nconst constants_1 = require(\"./constants\");\nfunction serializeKeyPairs(keyPairs) {\n return keyPairs.reduce((hValue, current) => {\n const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`;\n return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n }, '');\n}\nexports.serializeKeyPairs = serializeKeyPairs;\nfunction getKeyPairs(baggage) {\n return baggage.getAllEntries().map(([key, value]) => {\n let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;\n // include opaque metadata if provided\n // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation\n if (value.metadata !== undefined) {\n entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();\n }\n return entry;\n });\n}\nexports.getKeyPairs = getKeyPairs;\nfunction parsePairKeyValue(entry) {\n const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR);\n if (valueProps.length <= 0)\n return;\n const keyPairPart = valueProps.shift();\n if (!keyPairPart)\n return;\n const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR);\n if (keyPair.length !== 2)\n return;\n const key = decodeURIComponent(keyPair[0].trim());\n const value = decodeURIComponent(keyPair[1].trim());\n let metadata;\n if (valueProps.length > 0) {\n metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR));\n }\n return { key, value, metadata };\n}\nexports.parsePairKeyValue = parsePairKeyValue;\n/**\n * Parse a string serialized in the baggage HTTP Format (without metadata):\n * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md\n */\nfunction parseKeyPairsIntoRecord(value) {\n if (typeof value !== 'string' || value.length === 0)\n return {};\n return value\n .split(constants_1.BAGGAGE_ITEMS_SEPARATOR)\n .map(entry => {\n return parsePairKeyValue(entry);\n })\n .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0)\n .reduce((headers, keyPair) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n headers[keyPair.key] = keyPair.value;\n return headers;\n }, {});\n}\nexports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nfunction sanitizeAttributes(attributes) {\n const out = {};\n if (typeof attributes !== 'object' || attributes == null) {\n return out;\n }\n for (const [key, val] of Object.entries(attributes)) {\n if (!isAttributeKey(key)) {\n api_1.diag.warn(`Invalid attribute key: ${key}`);\n continue;\n }\n if (!isAttributeValue(val)) {\n api_1.diag.warn(`Invalid attribute value set for key: ${key}`);\n continue;\n }\n if (Array.isArray(val)) {\n out[key] = val.slice();\n }\n else {\n out[key] = val;\n }\n }\n return out;\n}\nexports.sanitizeAttributes = sanitizeAttributes;\nfunction isAttributeKey(key) {\n return typeof key === 'string' && key.length > 0;\n}\nexports.isAttributeKey = isAttributeKey;\nfunction isAttributeValue(val) {\n if (val == null) {\n return true;\n }\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n return isValidPrimitiveAttributeValue(val);\n}\nexports.isAttributeValue = isAttributeValue;\nfunction isHomogeneousAttributeValueArray(arr) {\n let type;\n for (const element of arr) {\n // null/undefined elements are allowed\n if (element == null)\n continue;\n if (!type) {\n if (isValidPrimitiveAttributeValue(element)) {\n type = typeof element;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n if (typeof element === type) {\n continue;\n }\n return false;\n }\n return true;\n}\nfunction isValidPrimitiveAttributeValue(val) {\n switch (typeof val) {\n case 'number':\n case 'boolean':\n case 'string':\n return true;\n }\n return false;\n}\n//# sourceMappingURL=attributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.globalErrorHandler = exports.setGlobalErrorHandler = void 0;\nconst logging_error_handler_1 = require(\"./logging-error-handler\");\n/** The global error handler delegate */\nlet delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nfunction setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\nexports.setGlobalErrorHandler = setGlobalErrorHandler;\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nfunction globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch (_a) { } // eslint-disable-line no-empty\n}\nexports.globalErrorHandler = globalErrorHandler;\n//# sourceMappingURL=global-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loggingErrorHandler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * Returns a function that logs an error using the provided logger, or a\n * console logger if one was not provided.\n */\nfunction loggingErrorHandler() {\n return (ex) => {\n api_1.diag.error(stringifyException(ex));\n };\n}\nexports.loggingErrorHandler = loggingErrorHandler;\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\n }\n}\n/**\n * Flattens an exception into key-value pairs by traversing the prototype chain\n * and coercing values to strings. Duplicate properties will not be overwritten;\n * the first insert wins.\n */\nfunction flattenException(ex) {\n const result = {};\n let current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(propertyName => {\n if (result[propertyName])\n return;\n const value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0;\nconst platform_1 = require(\"../platform\");\nconst NANOSECOND_DIGITS = 9;\nconst SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number to HrTime, HrTime = [number, number].\n * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970.\n * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds.\n * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150.\n * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds:\n * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210.\n * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:\n * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000.\n * This is represented in HrTime format as [1609504210, 150000000].\n * @param epochMillis\n */\nfunction numberToHrtime(epochMillis) {\n const epochSeconds = epochMillis / 1000;\n // Decimals only.\n const seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) *\n SECOND_TO_NANOSECONDS;\n return [seconds, nanos];\n}\nfunction getTimeOrigin() {\n let timeOrigin = platform_1.otperformance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n const perf = platform_1.otperformance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nfunction hrTime(performanceNow) {\n const timeOrigin = numberToHrtime(getTimeOrigin());\n const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now());\n let seconds = timeOrigin[0] + now[0];\n let nanos = timeOrigin[1] + now[1];\n // Nanoseconds\n if (nanos > SECOND_TO_NANOSECONDS) {\n nanos -= SECOND_TO_NANOSECONDS;\n seconds += 1;\n }\n return [seconds, nanos];\n}\nexports.hrTime = hrTime;\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nfunction timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\n else if (typeof time === 'number') {\n // Must be a performance.now() if it's smaller than process start time.\n if (time < getTimeOrigin()) {\n return hrTime(time);\n }\n else {\n // epoch milliseconds or performance.timeOrigin\n return numberToHrtime(time);\n }\n }\n else if (time instanceof Date) {\n return numberToHrtime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\nexports.timeInputToHrTime = timeInputToHrTime;\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nfunction hrTimeDuration(startTime, endTime) {\n let seconds = endTime[0] - startTime[0];\n let nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\nexports.hrTimeDuration = hrTimeDuration;\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nfunction hrTimeToTimeStamp(time) {\n const precision = NANOSECOND_DIGITS;\n const tmp = `${'0'.repeat(precision)}${time[1]}Z`;\n const nanoString = tmp.substr(tmp.length - precision - 1);\n const date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\nexports.hrTimeToTimeStamp = hrTimeToTimeStamp;\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nfunction hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\nexports.hrTimeToNanoseconds = hrTimeToNanoseconds;\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nfunction hrTimeToMilliseconds(time) {\n return Math.round(time[0] * 1e3 + time[1] / 1e6);\n}\nexports.hrTimeToMilliseconds = hrTimeToMilliseconds;\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nfunction hrTimeToMicroseconds(time) {\n return Math.round(time[0] * 1e6 + time[1] / 1e3);\n}\nexports.hrTimeToMicroseconds = hrTimeToMicroseconds;\n/**\n * check if time is HrTime\n * @param value\n */\nfunction isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\nexports.isTimeInputHrTime = isTimeInputHrTime;\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nfunction isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\nexports.isTimeInput = isTimeInput;\n//# sourceMappingURL=time.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageUtils = void 0;\n__exportStar(require(\"./baggage/propagation/W3CBaggagePropagator\"), exports);\n__exportStar(require(\"./common/attributes\"), exports);\n__exportStar(require(\"./common/global-error-handler\"), exports);\n__exportStar(require(\"./common/logging-error-handler\"), exports);\n__exportStar(require(\"./common/time\"), exports);\n__exportStar(require(\"./common/types\"), exports);\n__exportStar(require(\"./ExportResult\"), exports);\n__exportStar(require(\"./version\"), exports);\nexports.baggageUtils = require(\"./baggage/utils\");\n__exportStar(require(\"./platform\"), exports);\n__exportStar(require(\"./propagation/composite\"), exports);\n__exportStar(require(\"./trace/W3CTraceContextPropagator\"), exports);\n__exportStar(require(\"./trace/IdGenerator\"), exports);\n__exportStar(require(\"./trace/rpc-metadata\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOffSampler\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOnSampler\"), exports);\n__exportStar(require(\"./trace/sampler/ParentBasedSampler\"), exports);\n__exportStar(require(\"./trace/sampler/TraceIdRatioBasedSampler\"), exports);\n__exportStar(require(\"./trace/suppress-tracing\"), exports);\n__exportStar(require(\"./trace/TraceState\"), exports);\n__exportStar(require(\"./utils/environment\"), exports);\n__exportStar(require(\"./utils/merge\"), exports);\n__exportStar(require(\"./utils/sampling\"), exports);\n__exportStar(require(\"./utils/url\"), exports);\n__exportStar(require(\"./utils/wrap\"), exports);\n__exportStar(require(\"./utils/callback\"), exports);\n__exportStar(require(\"./version\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=validators.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomIdGenerator = void 0;\nconst SPAN_ID_BYTES = 8;\nconst TRACE_ID_BYTES = 16;\nclass RandomIdGenerator {\n constructor() {\n /**\n * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex\n * characters corresponding to 128 bits.\n */\n this.generateTraceId = getIdGenerator(TRACE_ID_BYTES);\n /**\n * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex\n * characters corresponding to 64 bits.\n */\n this.generateSpanId = getIdGenerator(SPAN_ID_BYTES);\n }\n}\nexports.RandomIdGenerator = RandomIdGenerator;\nconst SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES);\nfunction getIdGenerator(bytes) {\n return function generateId() {\n for (let i = 0; i < bytes / 4; i++) {\n // unsigned right shift drops decimal part of the number\n // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE\n SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4);\n }\n // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated\n for (let i = 0; i < bytes; i++) {\n if (SHARED_BUFFER[i] > 0) {\n break;\n }\n else if (i === bytes - 1) {\n SHARED_BUFFER[bytes - 1] = 1;\n }\n }\n return SHARED_BUFFER.toString('hex', 0, bytes);\n };\n}\n//# sourceMappingURL=RandomIdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEnv = void 0;\nconst os = require(\"os\");\nconst environment_1 = require(\"../../utils/environment\");\n/**\n * Gets the environment variables\n */\nfunction getEnv() {\n const processEnv = (0, environment_1.parseEnvironment)(process.env);\n return Object.assign({\n HOSTNAME: os.hostname(),\n }, environment_1.DEFAULT_ENVIRONMENT, processEnv);\n}\nexports.getEnv = getEnv;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hexToBase64 = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction hexToBase64(hexStr) {\n const hexStrLen = hexStr.length;\n let hexAsciiCharsStr = '';\n for (let i = 0; i < hexStrLen; i += 2) {\n const hexPair = hexStr.substring(i, i + 2);\n const hexVal = parseInt(hexPair, 16);\n hexAsciiCharsStr += String.fromCharCode(hexVal);\n }\n return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64');\n}\nexports.hexToBase64 = hexToBase64;\n//# sourceMappingURL=hex-to-base64.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./environment\"), exports);\n__exportStar(require(\"./globalThis\"), exports);\n__exportStar(require(\"./hex-to-base64\"), exports);\n__exportStar(require(\"./RandomIdGenerator\"), exports);\n__exportStar(require(\"./performance\"), exports);\n__exportStar(require(\"./sdk-info\"), exports);\n__exportStar(require(\"./timer-util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.otperformance = void 0;\nconst perf_hooks_1 = require(\"perf_hooks\");\nexports.otperformance = perf_hooks_1.performance;\n//# sourceMappingURL=performance.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SDK_INFO = void 0;\nconst version_1 = require(\"../../version\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\n/** Constants describing the SDK in use */\nexports.SDK_INFO = {\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node',\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS,\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION,\n};\n//# sourceMappingURL=sdk-info.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unrefTimer = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction unrefTimer(timer) {\n timer.unref();\n}\nexports.unrefTimer = unrefTimer;\n//# sourceMappingURL=timer-util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompositePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Combines multiple propagators into a single propagator. */\nclass CompositePropagator {\n /**\n * Construct a composite propagator from a list of propagators.\n *\n * @param [config] Configuration object for composite propagator\n */\n constructor(config = {}) {\n var _a;\n this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : [];\n this._fields = Array.from(new Set(this._propagators\n // older propagators may not have fields function, null check to be sure\n .map(p => (typeof p.fields === 'function' ? p.fields() : []))\n .reduce((x, y) => x.concat(y), [])));\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same carrier key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to inject\n * @param carrier Carrier into which context will be injected\n */\n inject(context, carrier, setter) {\n for (const propagator of this._propagators) {\n try {\n propagator.inject(context, carrier, setter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n }\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same context key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to add values to\n * @param carrier Carrier from which to extract context\n */\n extract(context, carrier, getter) {\n return this._propagators.reduce((ctx, propagator) => {\n try {\n return propagator.extract(ctx, carrier, getter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n return ctx;\n }, context);\n }\n fields() {\n // return a new array so our fields cannot be modified\n return this._fields.slice();\n }\n}\nexports.CompositePropagator = CompositePropagator;\n//# sourceMappingURL=composite.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceState = void 0;\nconst validators_1 = require(\"../internal/validators\");\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nclass TraceState {\n constructor(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceState();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\nexports.TraceState = TraceState;\n//# sourceMappingURL=TraceState.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"./suppress-tracing\");\nconst TraceState_1 = require(\"./TraceState\");\nexports.TRACE_PARENT_HEADER = 'traceparent';\nexports.TRACE_STATE_HEADER = 'tracestate';\nconst VERSION = '00';\nconst VERSION_PART = '(?!ff)[\\\\da-f]{2}';\nconst TRACE_ID_PART = '(?![0]{32})[\\\\da-f]{32}';\nconst PARENT_ID_PART = '(?![0]{16})[\\\\da-f]{16}';\nconst FLAGS_PART = '[\\\\da-f]{2}';\nconst TRACE_PARENT_REGEX = new RegExp(`^\\\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\\\s?$`);\n/**\n * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}\n * @param traceParent - A meta property that comes from server.\n * It should be dynamically generated server side to have the server's request trace Id,\n * a parent span Id that was set on the server's request span,\n * and the trace flags to indicate the server's sampling decision\n * (01 = sampled, 00 = not sampled).\n * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'\n * For more information see {@link https://www.w3.org/TR/trace-context/}\n */\nfunction parseTraceParent(traceParent) {\n const match = TRACE_PARENT_REGEX.exec(traceParent);\n if (!match)\n return null;\n // According to the specification the implementation should be compatible\n // with future versions. If there are more parts, we only reject it if it's using version 00\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n if (match[1] === '00' && match[5])\n return null;\n return {\n traceId: match[2],\n spanId: match[3],\n traceFlags: parseInt(match[4], 16),\n };\n}\nexports.parseTraceParent = parseTraceParent;\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n *\n * Based on the Trace Context specification:\n * https://www.w3.org/TR/trace-context/\n */\nclass W3CTraceContextPropagator {\n inject(context, carrier, setter) {\n const spanContext = api_1.trace.getSpanContext(context);\n if (!spanContext ||\n (0, suppress_tracing_1.isTracingSuppressed)(context) ||\n !(0, api_1.isSpanContextValid)(spanContext))\n return;\n const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;\n setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent);\n if (spanContext.traceState) {\n setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize());\n }\n }\n extract(context, carrier, getter) {\n const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER);\n if (!traceParentHeader)\n return context;\n const traceParent = Array.isArray(traceParentHeader)\n ? traceParentHeader[0]\n : traceParentHeader;\n if (typeof traceParent !== 'string')\n return context;\n const spanContext = parseTraceParent(traceParent);\n if (!spanContext)\n return context;\n spanContext.isRemote = true;\n const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER);\n if (traceStateHeader) {\n // If more than one `tracestate` header is found, we merge them into a\n // single header.\n const state = Array.isArray(traceStateHeader)\n ? traceStateHeader.join(',')\n : traceStateHeader;\n spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined);\n }\n return api_1.trace.setSpanContext(context, spanContext);\n }\n fields() {\n return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER];\n }\n}\nexports.W3CTraceContextPropagator = W3CTraceContextPropagator;\n//# sourceMappingURL=W3CTraceContextPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA');\nvar RPCType;\n(function (RPCType) {\n RPCType[\"HTTP\"] = \"http\";\n})(RPCType = exports.RPCType || (exports.RPCType = {}));\nfunction setRPCMetadata(context, meta) {\n return context.setValue(RPC_METADATA_KEY, meta);\n}\nexports.setRPCMetadata = setRPCMetadata;\nfunction deleteRPCMetadata(context) {\n return context.deleteValue(RPC_METADATA_KEY);\n}\nexports.deleteRPCMetadata = deleteRPCMetadata;\nfunction getRPCMetadata(context) {\n return context.getValue(RPC_METADATA_KEY);\n}\nexports.getRPCMetadata = getRPCMetadata;\n//# sourceMappingURL=rpc-metadata.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOffSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples no traces. */\nclass AlwaysOffSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return 'AlwaysOffSampler';\n }\n}\nexports.AlwaysOffSampler = AlwaysOffSampler;\n//# sourceMappingURL=AlwaysOffSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOnSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples all traces. */\nclass AlwaysOnSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.RECORD_AND_SAMPLED,\n };\n }\n toString() {\n return 'AlwaysOnSampler';\n }\n}\nexports.AlwaysOnSampler = AlwaysOnSampler;\n//# sourceMappingURL=AlwaysOnSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParentBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst global_error_handler_1 = require(\"../../common/global-error-handler\");\nconst AlwaysOffSampler_1 = require(\"./AlwaysOffSampler\");\nconst AlwaysOnSampler_1 = require(\"./AlwaysOnSampler\");\n/**\n * A composite sampler that either respects the parent span's sampling decision\n * or delegates to `delegateSampler` for root spans.\n */\nclass ParentBasedSampler {\n constructor(config) {\n var _a, _b, _c, _d;\n this._root = config.root;\n if (!this._root) {\n (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured'));\n this._root = new AlwaysOnSampler_1.AlwaysOnSampler();\n }\n this._remoteParentSampled =\n (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._remoteParentNotSampled =\n (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler();\n this._localParentSampled =\n (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._localParentNotSampled =\n (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();\n }\n shouldSample(context, traceId, spanName, spanKind, attributes, links) {\n const parentContext = api_1.trace.getSpanContext(context);\n if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {\n return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.isRemote) {\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n toString() {\n return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;\n }\n}\nexports.ParentBasedSampler = ParentBasedSampler;\n//# sourceMappingURL=ParentBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceIdRatioBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples a given fraction of traces based of trace id deterministically. */\nclass TraceIdRatioBasedSampler {\n constructor(_ratio = 0) {\n this._ratio = _ratio;\n this._ratio = this._normalize(_ratio);\n this._upperBound = Math.floor(this._ratio * 0xffffffff);\n }\n shouldSample(context, traceId) {\n return {\n decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound\n ? api_1.SamplingDecision.RECORD_AND_SAMPLED\n : api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return `TraceIdRatioBased{${this._ratio}}`;\n }\n _normalize(ratio) {\n if (typeof ratio !== 'number' || isNaN(ratio))\n return 0;\n return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;\n }\n _accumulate(traceId) {\n let accumulation = 0;\n for (let i = 0; i < traceId.length / 8; i++) {\n const pos = i * 8;\n const part = parseInt(traceId.slice(pos, pos + 8), 16);\n accumulation = (accumulation ^ part) >>> 0;\n }\n return accumulation;\n }\n}\nexports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;\n//# sourceMappingURL=TraceIdRatioBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nfunction suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexports.suppressTracing = suppressTracing;\nfunction unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexports.unsuppressTracing = unsuppressTracing;\nfunction isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\nexports.isTracingSuppressed = isTracingSuppressed;\n//# sourceMappingURL=suppress-tracing.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BindOnceFuture = void 0;\nconst promise_1 = require(\"./promise\");\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nclass BindOnceFuture {\n constructor(_callback, _that) {\n this._callback = _callback;\n this._that = _that;\n this._isCalled = false;\n this._deferred = new promise_1.Deferred();\n }\n get isCalled() {\n return this._isCalled;\n }\n get promise() {\n return this._deferred.promise;\n }\n call(...args) {\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve(this._callback.call(this._that, ...args))\n .then(val => this._deferred.resolve(val), err => this._deferred.reject(err));\n }\n catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n }\n}\nexports.BindOnceFuture = BindOnceFuture;\n//# sourceMappingURL=callback.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst sampling_1 = require(\"./sampling\");\nconst DEFAULT_LIST_SEPARATOR = ',';\n/**\n * Environment interface to define all names\n */\nconst ENVIRONMENT_NUMBERS_KEYS = [\n 'OTEL_BSP_EXPORT_TIMEOUT',\n 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BSP_MAX_QUEUE_SIZE',\n 'OTEL_BSP_SCHEDULE_DELAY',\n 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_LINK_COUNT_LIMIT',\n 'OTEL_EXPORTER_JAEGER_AGENT_PORT',\n];\nfunction isEnvVarANumber(key) {\n return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1);\n}\nconst ENVIRONMENT_LISTS_KEYS = [\n 'OTEL_NO_PATCH_MODULES',\n 'OTEL_PROPAGATORS',\n];\nfunction isEnvVarAList(key) {\n return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1;\n}\nexports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\nexports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\n/**\n * Default environment variables\n */\nexports.DEFAULT_ENVIRONMENT = {\n CONTAINER_NAME: '',\n ECS_CONTAINER_METADATA_URI_V4: '',\n ECS_CONTAINER_METADATA_URI: '',\n HOSTNAME: '',\n KUBERNETES_SERVICE_HOST: '',\n NAMESPACE: '',\n OTEL_BSP_EXPORT_TIMEOUT: 30000,\n OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BSP_MAX_QUEUE_SIZE: 2048,\n OTEL_BSP_SCHEDULE_DELAY: 5000,\n OTEL_EXPORTER_JAEGER_AGENT_HOST: '',\n OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832,\n OTEL_EXPORTER_JAEGER_ENDPOINT: '',\n OTEL_EXPORTER_JAEGER_PASSWORD: '',\n OTEL_EXPORTER_JAEGER_USER: '',\n OTEL_EXPORTER_OTLP_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_HEADERS: '',\n OTEL_EXPORTER_OTLP_TRACES_HEADERS: '',\n OTEL_EXPORTER_OTLP_METRICS_HEADERS: '',\n OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans',\n OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO,\n OTEL_NO_PATCH_MODULES: [],\n OTEL_PROPAGATORS: ['tracecontext', 'baggage'],\n OTEL_RESOURCE_ATTRIBUTES: '',\n OTEL_SERVICE_NAME: '',\n OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_EVENT_COUNT_LIMIT: 128,\n OTEL_SPAN_LINK_COUNT_LIMIT: 128,\n OTEL_TRACES_EXPORTER: 'none',\n OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn,\n OTEL_TRACES_SAMPLER_ARG: '',\n OTEL_EXPORTER_OTLP_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: ''\n};\n/**\n * Parses a variable as number with number validation\n * @param name\n * @param environment\n * @param values\n * @param min\n * @param max\n */\nfunction parseNumber(name, environment, values, min = -Infinity, max = Infinity) {\n if (typeof values[name] !== 'undefined') {\n const value = Number(values[name]);\n if (!isNaN(value)) {\n if (value < min) {\n environment[name] = min;\n }\n else if (value > max) {\n environment[name] = max;\n }\n else {\n environment[name] = value;\n }\n }\n }\n}\n/**\n * Parses list-like strings from input into output.\n * @param name\n * @param environment\n * @param values\n * @param separator\n */\nfunction parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) {\n const givenValue = input[name];\n if (typeof givenValue === 'string') {\n output[name] = givenValue.split(separator).map(v => v.trim());\n }\n}\n// The support string -> DiagLogLevel mappings\nconst logLevelMap = {\n ALL: api_1.DiagLogLevel.ALL,\n VERBOSE: api_1.DiagLogLevel.VERBOSE,\n DEBUG: api_1.DiagLogLevel.DEBUG,\n INFO: api_1.DiagLogLevel.INFO,\n WARN: api_1.DiagLogLevel.WARN,\n ERROR: api_1.DiagLogLevel.ERROR,\n NONE: api_1.DiagLogLevel.NONE,\n};\n/**\n * Environmentally sets log level if valid log level string is provided\n * @param key\n * @param environment\n * @param values\n */\nfunction setLogLevelFromEnv(key, environment, values) {\n const value = values[key];\n if (typeof value === 'string') {\n const theLevel = logLevelMap[value.toUpperCase()];\n if (theLevel != null) {\n environment[key] = theLevel;\n }\n }\n}\n/**\n * Parses environment values\n * @param values\n */\nfunction parseEnvironment(values) {\n const environment = {};\n for (const env in exports.DEFAULT_ENVIRONMENT) {\n const key = env;\n switch (key) {\n case 'OTEL_LOG_LEVEL':\n setLogLevelFromEnv(key, environment, values);\n break;\n default:\n if (isEnvVarANumber(key)) {\n parseNumber(key, environment, values);\n }\n else if (isEnvVarAList(key)) {\n parseStringList(key, environment, values);\n }\n else {\n const value = values[key];\n if (typeof value !== 'undefined' && value !== null) {\n environment[key] = String(value);\n }\n }\n }\n }\n return environment;\n}\nexports.parseEnvironment = parseEnvironment;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPlainObject = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\nconst objectTag = '[object Object]';\nconst nullTag = '[object Null]';\nconst undefinedTag = '[object Undefined]';\nconst funcProto = Function.prototype;\nconst funcToString = funcProto.toString;\nconst objectCtorString = funcToString.call(Object);\nconst getPrototype = overArg(Object.getPrototypeOf, Object);\nconst objectProto = Object.prototype;\nconst hasOwnProperty = objectProto.hasOwnProperty;\nconst symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nconst nativeObjectToString = objectProto.toString;\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n return false;\n }\n const proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) === objectCtorString;\n}\nexports.isPlainObject = isPlainObject;\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];\n let unmasked = false;\n try {\n value[symToStringTag] = undefined;\n unmasked = true;\n }\n catch (e) {\n // silence\n }\n const result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n }\n else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n//# sourceMappingURL=lodash.merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.merge = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst lodash_merge_1 = require(\"./lodash.merge\");\nconst MAX_LEVEL = 20;\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nfunction merge(...args) {\n let result = args.shift();\n const objects = new WeakMap();\n while (args.length > 0) {\n result = mergeTwoObjects(result, args.shift(), 0, objects);\n }\n return result;\n}\nexports.merge = merge;\nfunction takeValue(value) {\n if (isArray(value)) {\n return value.slice();\n }\n return value;\n}\n/**\n * Merges two objects\n * @param one - first object\n * @param two - second object\n * @param level - current deep level\n * @param objects - objects holder that has been already referenced - to prevent\n * cyclic dependency\n */\nfunction mergeTwoObjects(one, two, level = 0, objects) {\n let result;\n if (level > MAX_LEVEL) {\n return undefined;\n }\n level++;\n if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n result = takeValue(two);\n }\n else if (isArray(one)) {\n result = one.slice();\n if (isArray(two)) {\n for (let i = 0, j = two.length; i < j; i++) {\n result.push(takeValue(two[i]));\n }\n }\n else if (isObject(two)) {\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n result[key] = takeValue(two[key]);\n }\n }\n }\n else if (isObject(one)) {\n if (isObject(two)) {\n if (!shouldMerge(one, two)) {\n return two;\n }\n result = Object.assign({}, one);\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n const twoValue = two[key];\n if (isPrimitive(twoValue)) {\n if (typeof twoValue === 'undefined') {\n delete result[key];\n }\n else {\n // result[key] = takeValue(twoValue);\n result[key] = twoValue;\n }\n }\n else {\n const obj1 = result[key];\n const obj2 = twoValue;\n if (wasObjectReferenced(one, key, objects) ||\n wasObjectReferenced(two, key, objects)) {\n delete result[key];\n }\n else {\n if (isObject(obj1) && isObject(obj2)) {\n const arr1 = objects.get(obj1) || [];\n const arr2 = objects.get(obj2) || [];\n arr1.push({ obj: one, key });\n arr2.push({ obj: two, key });\n objects.set(obj1, arr1);\n objects.set(obj2, arr2);\n }\n result[key] = mergeTwoObjects(result[key], twoValue, level, objects);\n }\n }\n }\n }\n else {\n result = two;\n }\n }\n return result;\n}\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(obj, key, objects) {\n const arr = objects.get(obj[key]) || [];\n for (let i = 0, j = arr.length; i < j; i++) {\n const info = arr[i];\n if (info.key === key && info.obj === obj) {\n return true;\n }\n }\n return false;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isObject(value) {\n return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object';\n}\nfunction isPrimitive(value) {\n return typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n value instanceof Date ||\n value instanceof RegExp ||\n value === null;\n}\nfunction shouldMerge(one, two) {\n if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Deferred = void 0;\nclass Deferred {\n constructor() {\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n get promise() {\n return this._promise;\n }\n resolve(val) {\n this._resolve(val);\n }\n reject(err) {\n this._reject(err);\n }\n}\nexports.Deferred = Deferred;\n//# sourceMappingURL=promise.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TracesSamplerValues = void 0;\nvar TracesSamplerValues;\n(function (TracesSamplerValues) {\n TracesSamplerValues[\"AlwaysOff\"] = \"always_off\";\n TracesSamplerValues[\"AlwaysOn\"] = \"always_on\";\n TracesSamplerValues[\"ParentBasedAlwaysOff\"] = \"parentbased_always_off\";\n TracesSamplerValues[\"ParentBasedAlwaysOn\"] = \"parentbased_always_on\";\n TracesSamplerValues[\"ParentBasedTraceIdRatio\"] = \"parentbased_traceidratio\";\n TracesSamplerValues[\"TraceIdRatio\"] = \"traceidratio\";\n})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {}));\n//# sourceMappingURL=sampling.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isUrlIgnored = exports.urlMatches = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction urlMatches(url, urlToMatch) {\n if (typeof urlToMatch === 'string') {\n return url === urlToMatch;\n }\n else {\n return !!url.match(urlToMatch);\n }\n}\nexports.urlMatches = urlMatches;\n/**\n * Check if {@param url} should be ignored when comparing against {@param ignoredUrls}\n * @param url\n * @param ignoredUrls\n */\nfunction isUrlIgnored(url, ignoredUrls) {\n if (!ignoredUrls) {\n return false;\n }\n for (const ignoreUrl of ignoredUrls) {\n if (urlMatches(url, ignoreUrl)) {\n return true;\n }\n }\n return false;\n}\nexports.isUrlIgnored = isUrlIgnored;\n//# sourceMappingURL=url.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isWrapped = void 0;\n/**\n * Checks if certain function has been already wrapped\n * @param func\n */\nfunction isWrapped(func) {\n return (typeof func === 'function' &&\n typeof func.__original === 'function' &&\n typeof func.__unwrap === 'function' &&\n func.__wrapped === true);\n}\nexports.isWrapped = isWrapped;\n//# sourceMappingURL=wrap.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.2.0';\n//# sourceMappingURL=version.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./trace\"), exports);\n__exportStar(require(\"./resource\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticResourceAttributes = {\n /**\n * Name of the cloud provider.\n */\n CLOUD_PROVIDER: 'cloud.provider',\n /**\n * The cloud account ID the resource is assigned to.\n */\n CLOUD_ACCOUNT_ID: 'cloud.account.id',\n /**\n * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations).\n */\n CLOUD_REGION: 'cloud.region',\n /**\n * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\n *\n * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud.\n */\n CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone',\n /**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\n CLOUD_PLATFORM: 'cloud.platform',\n /**\n * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).\n */\n AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn',\n /**\n * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).\n */\n AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn',\n /**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n */\n AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype',\n /**\n * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).\n */\n AWS_ECS_TASK_ARN: 'aws.ecs.task.arn',\n /**\n * The task definition family this task definition is a member of.\n */\n AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family',\n /**\n * The revision for this task definition.\n */\n AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision',\n /**\n * The ARN of an EKS cluster.\n */\n AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn',\n /**\n * The name(s) of the AWS log group(s) an application is writing to.\n *\n * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.\n */\n AWS_LOG_GROUP_NAMES: 'aws.log.group.names',\n /**\n * The Amazon Resource Name(s) (ARN) of the AWS log group(s).\n *\n * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).\n */\n AWS_LOG_GROUP_ARNS: 'aws.log.group.arns',\n /**\n * The name(s) of the AWS log stream(s) an application is writing to.\n */\n AWS_LOG_STREAM_NAMES: 'aws.log.stream.names',\n /**\n * The ARN(s) of the AWS log stream(s).\n *\n * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.\n */\n AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns',\n /**\n * Container name.\n */\n CONTAINER_NAME: 'container.name',\n /**\n * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated.\n */\n CONTAINER_ID: 'container.id',\n /**\n * The container runtime managing this container.\n */\n CONTAINER_RUNTIME: 'container.runtime',\n /**\n * Name of the image the container was built on.\n */\n CONTAINER_IMAGE_NAME: 'container.image.name',\n /**\n * Container image tag.\n */\n CONTAINER_IMAGE_TAG: 'container.image.tag',\n /**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n */\n DEPLOYMENT_ENVIRONMENT: 'deployment.environment',\n /**\n * A unique identifier representing the device.\n *\n * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.\n */\n DEVICE_ID: 'device.id',\n /**\n * The model identifier for the device.\n *\n * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.\n */\n DEVICE_MODEL_IDENTIFIER: 'device.model.identifier',\n /**\n * The marketing name for the device model.\n *\n * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.\n */\n DEVICE_MODEL_NAME: 'device.model.name',\n /**\n * The name of the single function that this runtime instance executes.\n *\n * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes).\n */\n FAAS_NAME: 'faas.name',\n /**\n * The unique ID of the single function that this runtime instance executes.\n *\n * Note: Depending on the cloud provider, use:\n \n * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\n Take care not to use the "invoked ARN" directly but replace any\n [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple\n different aliases.\n * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\n * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).\n \n On some providers, it may not be possible to determine the full ID at startup,\n which is why this field cannot be made required. For example, on AWS the account ID\n part of the ARN is not available without calling another AWS API\n which may be deemed too slow for a short-running lambda function.\n As an alternative, consider setting `faas.id` as a span attribute instead.\n */\n FAAS_ID: 'faas.id',\n /**\n * The immutable version of the function being executed.\n *\n * Note: Depending on the cloud provider and platform, use:\n \n * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\n (an integer represented as a decimal string).\n * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions)\n (i.e., the function name plus the revision suffix).\n * **Google Cloud Functions:** The value of the\n [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\n * **Azure Functions:** Not applicable. Do not set this attribute.\n */\n FAAS_VERSION: 'faas.version',\n /**\n * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\n *\n * Note: * **AWS Lambda:** Use the (full) log stream name.\n */\n FAAS_INSTANCE: 'faas.instance',\n /**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.\n */\n FAAS_MAX_MEMORY: 'faas.max_memory',\n /**\n * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.\n */\n HOST_ID: 'host.id',\n /**\n * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\n */\n HOST_NAME: 'host.name',\n /**\n * Type of host. For Cloud, this must be the machine type.\n */\n HOST_TYPE: 'host.type',\n /**\n * The CPU architecture the host system is running on.\n */\n HOST_ARCH: 'host.arch',\n /**\n * Name of the VM image or OS install the host was instantiated from.\n */\n HOST_IMAGE_NAME: 'host.image.name',\n /**\n * VM image ID. For Cloud, this value is from the provider.\n */\n HOST_IMAGE_ID: 'host.image.id',\n /**\n * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes).\n */\n HOST_IMAGE_VERSION: 'host.image.version',\n /**\n * The name of the cluster.\n */\n K8S_CLUSTER_NAME: 'k8s.cluster.name',\n /**\n * The name of the Node.\n */\n K8S_NODE_NAME: 'k8s.node.name',\n /**\n * The UID of the Node.\n */\n K8S_NODE_UID: 'k8s.node.uid',\n /**\n * The name of the namespace that the pod is running in.\n */\n K8S_NAMESPACE_NAME: 'k8s.namespace.name',\n /**\n * The UID of the Pod.\n */\n K8S_POD_UID: 'k8s.pod.uid',\n /**\n * The name of the Pod.\n */\n K8S_POD_NAME: 'k8s.pod.name',\n /**\n * The name of the Container in a Pod template.\n */\n K8S_CONTAINER_NAME: 'k8s.container.name',\n /**\n * The UID of the ReplicaSet.\n */\n K8S_REPLICASET_UID: 'k8s.replicaset.uid',\n /**\n * The name of the ReplicaSet.\n */\n K8S_REPLICASET_NAME: 'k8s.replicaset.name',\n /**\n * The UID of the Deployment.\n */\n K8S_DEPLOYMENT_UID: 'k8s.deployment.uid',\n /**\n * The name of the Deployment.\n */\n K8S_DEPLOYMENT_NAME: 'k8s.deployment.name',\n /**\n * The UID of the StatefulSet.\n */\n K8S_STATEFULSET_UID: 'k8s.statefulset.uid',\n /**\n * The name of the StatefulSet.\n */\n K8S_STATEFULSET_NAME: 'k8s.statefulset.name',\n /**\n * The UID of the DaemonSet.\n */\n K8S_DAEMONSET_UID: 'k8s.daemonset.uid',\n /**\n * The name of the DaemonSet.\n */\n K8S_DAEMONSET_NAME: 'k8s.daemonset.name',\n /**\n * The UID of the Job.\n */\n K8S_JOB_UID: 'k8s.job.uid',\n /**\n * The name of the Job.\n */\n K8S_JOB_NAME: 'k8s.job.name',\n /**\n * The UID of the CronJob.\n */\n K8S_CRONJOB_UID: 'k8s.cronjob.uid',\n /**\n * The name of the CronJob.\n */\n K8S_CRONJOB_NAME: 'k8s.cronjob.name',\n /**\n * The operating system type.\n */\n OS_TYPE: 'os.type',\n /**\n * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\n */\n OS_DESCRIPTION: 'os.description',\n /**\n * Human readable operating system name.\n */\n OS_NAME: 'os.name',\n /**\n * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes).\n */\n OS_VERSION: 'os.version',\n /**\n * Process identifier (PID).\n */\n PROCESS_PID: 'process.pid',\n /**\n * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_NAME: 'process.executable.name',\n /**\n * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_PATH: 'process.executable.path',\n /**\n * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\n */\n PROCESS_COMMAND: 'process.command',\n /**\n * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead.\n */\n PROCESS_COMMAND_LINE: 'process.command_line',\n /**\n * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.\n */\n PROCESS_COMMAND_ARGS: 'process.command_args',\n /**\n * The username of the user that owns the process.\n */\n PROCESS_OWNER: 'process.owner',\n /**\n * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.\n */\n PROCESS_RUNTIME_NAME: 'process.runtime.name',\n /**\n * The version of the runtime of this process, as returned by the runtime without modification.\n */\n PROCESS_RUNTIME_VERSION: 'process.runtime.version',\n /**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n */\n PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description',\n /**\n * Logical name of the service.\n *\n * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\n */\n SERVICE_NAME: 'service.name',\n /**\n * A namespace for `service.name`.\n *\n * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\n */\n SERVICE_NAMESPACE: 'service.namespace',\n /**\n * The string ID of the service instance.\n *\n * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).\n */\n SERVICE_INSTANCE_ID: 'service.instance.id',\n /**\n * The version string of the service API or implementation.\n */\n SERVICE_VERSION: 'service.version',\n /**\n * The name of the telemetry SDK as defined above.\n */\n TELEMETRY_SDK_NAME: 'telemetry.sdk.name',\n /**\n * The language of the telemetry SDK.\n */\n TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language',\n /**\n * The version string of the telemetry SDK.\n */\n TELEMETRY_SDK_VERSION: 'telemetry.sdk.version',\n /**\n * The version string of the auto instrumentation agent, if used.\n */\n TELEMETRY_AUTO_VERSION: 'telemetry.auto.version',\n /**\n * The name of the web engine.\n */\n WEBENGINE_NAME: 'webengine.name',\n /**\n * The version of the web engine.\n */\n WEBENGINE_VERSION: 'webengine.version',\n /**\n * Additional description of the web engine (e.g. detailed version and edition information).\n */\n WEBENGINE_DESCRIPTION: 'webengine.description',\n};\nexports.CloudProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.CloudPlatformValues = {\n /** Alibaba Cloud Elastic Compute Service. */\n ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs',\n /** Alibaba Cloud Function Compute. */\n ALIBABA_CLOUD_FC: 'alibaba_cloud_fc',\n /** AWS Elastic Compute Cloud. */\n AWS_EC2: 'aws_ec2',\n /** AWS Elastic Container Service. */\n AWS_ECS: 'aws_ecs',\n /** AWS Elastic Kubernetes Service. */\n AWS_EKS: 'aws_eks',\n /** AWS Lambda. */\n AWS_LAMBDA: 'aws_lambda',\n /** AWS Elastic Beanstalk. */\n AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk',\n /** Azure Virtual Machines. */\n AZURE_VM: 'azure_vm',\n /** Azure Container Instances. */\n AZURE_CONTAINER_INSTANCES: 'azure_container_instances',\n /** Azure Kubernetes Service. */\n AZURE_AKS: 'azure_aks',\n /** Azure Functions. */\n AZURE_FUNCTIONS: 'azure_functions',\n /** Azure App Service. */\n AZURE_APP_SERVICE: 'azure_app_service',\n /** Google Cloud Compute Engine (GCE). */\n GCP_COMPUTE_ENGINE: 'gcp_compute_engine',\n /** Google Cloud Run. */\n GCP_CLOUD_RUN: 'gcp_cloud_run',\n /** Google Cloud Kubernetes Engine (GKE). */\n GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine',\n /** Google Cloud Functions (GCF). */\n GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions',\n /** Google Cloud App Engine (GAE). */\n GCP_APP_ENGINE: 'gcp_app_engine',\n};\nexports.AwsEcsLaunchtypeValues = {\n /** ec2. */\n EC2: 'ec2',\n /** fargate. */\n FARGATE: 'fargate',\n};\nexports.HostArchValues = {\n /** AMD64. */\n AMD64: 'amd64',\n /** ARM32. */\n ARM32: 'arm32',\n /** ARM64. */\n ARM64: 'arm64',\n /** Itanium. */\n IA64: 'ia64',\n /** 32-bit PowerPC. */\n PPC32: 'ppc32',\n /** 64-bit PowerPC. */\n PPC64: 'ppc64',\n /** 32-bit x86. */\n X86: 'x86',\n};\nexports.OsTypeValues = {\n /** Microsoft Windows. */\n WINDOWS: 'windows',\n /** Linux. */\n LINUX: 'linux',\n /** Apple Darwin. */\n DARWIN: 'darwin',\n /** FreeBSD. */\n FREEBSD: 'freebsd',\n /** NetBSD. */\n NETBSD: 'netbsd',\n /** OpenBSD. */\n OPENBSD: 'openbsd',\n /** DragonFly BSD. */\n DRAGONFLYBSD: 'dragonflybsd',\n /** HP-UX (Hewlett Packard Unix). */\n HPUX: 'hpux',\n /** AIX (Advanced Interactive eXecutive). */\n AIX: 'aix',\n /** Oracle Solaris. */\n SOLARIS: 'solaris',\n /** IBM z/OS. */\n Z_OS: 'z_os',\n};\nexports.TelemetrySdkLanguageValues = {\n /** cpp. */\n CPP: 'cpp',\n /** dotnet. */\n DOTNET: 'dotnet',\n /** erlang. */\n ERLANG: 'erlang',\n /** go. */\n GO: 'go',\n /** java. */\n JAVA: 'java',\n /** nodejs. */\n NODEJS: 'nodejs',\n /** php. */\n PHP: 'php',\n /** python. */\n PYTHON: 'python',\n /** ruby. */\n RUBY: 'ruby',\n /** webjs. */\n WEBJS: 'webjs',\n};\n//# sourceMappingURL=SemanticResourceAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticResourceAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticAttributes = {\n /**\n * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).\n *\n * Note: This may be different from `faas.id` if an alias is involved.\n */\n AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn',\n /**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\n DB_SYSTEM: 'db.system',\n /**\n * The connection string used to connect to the database. It is recommended to remove embedded credentials.\n */\n DB_CONNECTION_STRING: 'db.connection_string',\n /**\n * Username for accessing the database.\n */\n DB_USER: 'db.user',\n /**\n * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n */\n DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname',\n /**\n * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n *\n * Note: In some SQL databases, the database name to be used is called "schema name".\n */\n DB_NAME: 'db.name',\n /**\n * The database statement being executed.\n *\n * Note: The value may be sanitized to exclude sensitive information.\n */\n DB_STATEMENT: 'db.statement',\n /**\n * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n *\n * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n */\n DB_OPERATION: 'db.operation',\n /**\n * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n *\n * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).\n */\n DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name',\n /**\n * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace',\n /**\n * The fetch size used for paging, i.e. how many rows will be returned at once.\n */\n DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size',\n /**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\n DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_CASSANDRA_TABLE: 'db.cassandra.table',\n /**\n * Whether or not the query is idempotent.\n */\n DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence',\n /**\n * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\n */\n DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count',\n /**\n * The ID of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id',\n /**\n * The data center of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc',\n /**\n * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_HBASE_NAMESPACE: 'db.hbase.namespace',\n /**\n * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n */\n DB_REDIS_DATABASE_INDEX: 'db.redis.database_index',\n /**\n * The collection being accessed within the database stated in `db.name`.\n */\n DB_MONGODB_COLLECTION: 'db.mongodb.collection',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_SQL_TABLE: 'db.sql.table',\n /**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n */\n EXCEPTION_TYPE: 'exception.type',\n /**\n * The exception message.\n */\n EXCEPTION_MESSAGE: 'exception.message',\n /**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n */\n EXCEPTION_STACKTRACE: 'exception.stacktrace',\n /**\n * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n *\n * Note: An exception is considered to have escaped (or left) the scope of a span,\n if that span is ended while the exception is still logically "in flight".\n This may be actually "in flight" in some languages (e.g. if the exception\n is passed to a Context manager's `__exit__` method in Python) but will\n usually be caught at the point of recording the exception in most languages.\n \n It is usually not possible to determine at the point where an exception is thrown\n whether it will escape the scope of a span.\n However, it is trivial to know that an exception\n will escape, if one checks for an active exception just before ending the span,\n as done in the [example above](#exception-end-example).\n \n It follows that an exception may still escape the scope of the span\n even if the `exception.escaped` attribute was not set or set to false,\n since the event might have been recorded at a time where it was not\n clear whether the exception will escape.\n */\n EXCEPTION_ESCAPED: 'exception.escaped',\n /**\n * Type of the trigger on which the function is executed.\n */\n FAAS_TRIGGER: 'faas.trigger',\n /**\n * The execution ID of the current function execution.\n */\n FAAS_EXECUTION: 'faas.execution',\n /**\n * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\n */\n FAAS_DOCUMENT_COLLECTION: 'faas.document.collection',\n /**\n * Describes the type of the operation that was performed on the data.\n */\n FAAS_DOCUMENT_OPERATION: 'faas.document.operation',\n /**\n * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_DOCUMENT_TIME: 'faas.document.time',\n /**\n * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\n */\n FAAS_DOCUMENT_NAME: 'faas.document.name',\n /**\n * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_TIME: 'faas.time',\n /**\n * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\n */\n FAAS_CRON: 'faas.cron',\n /**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start).\n */\n FAAS_COLDSTART: 'faas.coldstart',\n /**\n * The name of the invoked function.\n *\n * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.\n */\n FAAS_INVOKED_NAME: 'faas.invoked_name',\n /**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\n FAAS_INVOKED_PROVIDER: 'faas.invoked_provider',\n /**\n * The cloud region of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\n */\n FAAS_INVOKED_REGION: 'faas.invoked_region',\n /**\n * Transport protocol used. See note below.\n */\n NET_TRANSPORT: 'net.transport',\n /**\n * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6).\n */\n NET_PEER_IP: 'net.peer.ip',\n /**\n * Remote port number.\n */\n NET_PEER_PORT: 'net.peer.port',\n /**\n * Remote hostname or similar, see note below.\n */\n NET_PEER_NAME: 'net.peer.name',\n /**\n * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.\n */\n NET_HOST_IP: 'net.host.ip',\n /**\n * Like `net.peer.port` but for the host port.\n */\n NET_HOST_PORT: 'net.host.port',\n /**\n * Local hostname or similar, see note below.\n */\n NET_HOST_NAME: 'net.host.name',\n /**\n * The internet connection type currently being used by the host.\n */\n NET_HOST_CONNECTION_TYPE: 'net.host.connection.type',\n /**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\n NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype',\n /**\n * The name of the mobile carrier.\n */\n NET_HOST_CARRIER_NAME: 'net.host.carrier.name',\n /**\n * The mobile carrier country code.\n */\n NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc',\n /**\n * The mobile carrier network code.\n */\n NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc',\n /**\n * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\n */\n NET_HOST_CARRIER_ICC: 'net.host.carrier.icc',\n /**\n * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\n */\n PEER_SERVICE: 'peer.service',\n /**\n * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.\n */\n ENDUSER_ID: 'enduser.id',\n /**\n * Actual/assumed role the client is making the request under extracted from token or application security context.\n */\n ENDUSER_ROLE: 'enduser.role',\n /**\n * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).\n */\n ENDUSER_SCOPE: 'enduser.scope',\n /**\n * Current "managed" thread ID (as opposed to OS thread ID).\n */\n THREAD_ID: 'thread.id',\n /**\n * Current thread name.\n */\n THREAD_NAME: 'thread.name',\n /**\n * The method or function name, or equivalent (usually rightmost part of the code unit's name).\n */\n CODE_FUNCTION: 'code.function',\n /**\n * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.\n */\n CODE_NAMESPACE: 'code.namespace',\n /**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\n */\n CODE_FILEPATH: 'code.filepath',\n /**\n * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.\n */\n CODE_LINENO: 'code.lineno',\n /**\n * HTTP request method.\n */\n HTTP_METHOD: 'http.method',\n /**\n * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.\n *\n * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`.\n */\n HTTP_URL: 'http.url',\n /**\n * The full request target as passed in a HTTP request line or equivalent.\n */\n HTTP_TARGET: 'http.target',\n /**\n * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.\n *\n * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.\n */\n HTTP_HOST: 'http.host',\n /**\n * The URI scheme identifying the used protocol.\n */\n HTTP_SCHEME: 'http.scheme',\n /**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n */\n HTTP_STATUS_CODE: 'http.status_code',\n /**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\n HTTP_FLAVOR: 'http.flavor',\n /**\n * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client.\n */\n HTTP_USER_AGENT: 'http.user_agent',\n /**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length',\n /**\n * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed',\n /**\n * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length',\n /**\n * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed',\n /**\n * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).\n *\n * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available.\n */\n HTTP_SERVER_NAME: 'http.server_name',\n /**\n * The matched route (path template).\n */\n HTTP_ROUTE: 'http.route',\n /**\n * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).\n *\n * Note: This is not necessarily the same as `net.peer.ip`, which would\n identify the network-level peer, which may be a proxy.\n \n This attribute should be set when a source of information different\n from the one used for `net.peer.ip`, is available even if that other\n source just confirms the same value as `net.peer.ip`.\n Rationale: For `net.peer.ip`, one typically does not know if it\n comes from a proxy, reverse proxy, or the actual client. Setting\n `http.client_ip` when it's the same as `net.peer.ip` means that\n one is at least somewhat confident that the address is not that of\n the closest proxy.\n */\n HTTP_CLIENT_IP: 'http.client_ip',\n /**\n * The keys in the `RequestItems` object field.\n */\n AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names',\n /**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field.\n */\n AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity',\n /**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field.\n */\n AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics',\n /**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity',\n /**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity',\n /**\n * The value of the `ConsistentRead` request parameter.\n */\n AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read',\n /**\n * The value of the `ProjectionExpression` request parameter.\n */\n AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection',\n /**\n * The value of the `Limit` request parameter.\n */\n AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit',\n /**\n * The value of the `AttributesToGet` request parameter.\n */\n AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get',\n /**\n * The value of the `IndexName` request parameter.\n */\n AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name',\n /**\n * The value of the `Select` request parameter.\n */\n AWS_DYNAMODB_SELECT: 'aws.dynamodb.select',\n /**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes',\n /**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes',\n /**\n * The value of the `ExclusiveStartTableName` request parameter.\n */\n AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table',\n /**\n * The the number of items in the `TableNames` response parameter.\n */\n AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count',\n /**\n * The value of the `ScanIndexForward` request parameter.\n */\n AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward',\n /**\n * The value of the `Segment` request parameter.\n */\n AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment',\n /**\n * The value of the `TotalSegments` request parameter.\n */\n AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments',\n /**\n * The value of the `Count` response parameter.\n */\n AWS_DYNAMODB_COUNT: 'aws.dynamodb.count',\n /**\n * The value of the `ScannedCount` response parameter.\n */\n AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count',\n /**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field.\n */\n AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions',\n /**\n * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates',\n /**\n * A string identifying the messaging system.\n */\n MESSAGING_SYSTEM: 'messaging.system',\n /**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n */\n MESSAGING_DESTINATION: 'messaging.destination',\n /**\n * The kind of message destination.\n */\n MESSAGING_DESTINATION_KIND: 'messaging.destination_kind',\n /**\n * A boolean that is true if the message destination is temporary.\n */\n MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination',\n /**\n * The name of the transport protocol.\n */\n MESSAGING_PROTOCOL: 'messaging.protocol',\n /**\n * The version of the transport protocol.\n */\n MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version',\n /**\n * Connection string.\n */\n MESSAGING_URL: 'messaging.url',\n /**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n */\n MESSAGING_MESSAGE_ID: 'messaging.message_id',\n /**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".\n */\n MESSAGING_CONVERSATION_ID: 'messaging.conversation_id',\n /**\n * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.\n */\n MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes',\n /**\n * The compressed size of the message payload in bytes.\n */\n MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes',\n /**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n */\n MESSAGING_OPERATION: 'messaging.operation',\n /**\n * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.\n */\n MESSAGING_CONSUMER_ID: 'messaging.consumer_id',\n /**\n * RabbitMQ message routing key.\n */\n MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key',\n /**\n * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n *\n * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.\n */\n MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key',\n /**\n * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.\n */\n MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group',\n /**\n * Client Id for the Consumer or Producer that is handling the message.\n */\n MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id',\n /**\n * Partition the message is sent to.\n */\n MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition',\n /**\n * A boolean that is true if the message is a tombstone.\n */\n MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone',\n /**\n * A string identifying the remoting system.\n */\n RPC_SYSTEM: 'rpc.system',\n /**\n * The full (logical) name of the service being called, including its package name, if applicable.\n *\n * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\n */\n RPC_SERVICE: 'rpc.service',\n /**\n * The name of the (logical) method being called, must be equal to the $method part in the span name.\n *\n * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\n */\n RPC_METHOD: 'rpc.method',\n /**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\n RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code',\n /**\n * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.\n */\n RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version',\n /**\n * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\n */\n RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id',\n /**\n * `error.code` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code',\n /**\n * `error.message` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message',\n /**\n * Whether this is a received or sent message.\n */\n MESSAGE_TYPE: 'message.type',\n /**\n * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\n *\n * Note: This way we guarantee that the values will be consistent between different implementations.\n */\n MESSAGE_ID: 'message.id',\n /**\n * Compressed size of the message in bytes.\n */\n MESSAGE_COMPRESSED_SIZE: 'message.compressed_size',\n /**\n * Uncompressed size of the message in bytes.\n */\n MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size',\n};\nexports.DbSystemValues = {\n /** Some other SQL database. Fallback only. See notes. */\n OTHER_SQL: 'other_sql',\n /** Microsoft SQL Server. */\n MSSQL: 'mssql',\n /** MySQL. */\n MYSQL: 'mysql',\n /** Oracle Database. */\n ORACLE: 'oracle',\n /** IBM Db2. */\n DB2: 'db2',\n /** PostgreSQL. */\n POSTGRESQL: 'postgresql',\n /** Amazon Redshift. */\n REDSHIFT: 'redshift',\n /** Apache Hive. */\n HIVE: 'hive',\n /** Cloudscape. */\n CLOUDSCAPE: 'cloudscape',\n /** HyperSQL DataBase. */\n HSQLDB: 'hsqldb',\n /** Progress Database. */\n PROGRESS: 'progress',\n /** SAP MaxDB. */\n MAXDB: 'maxdb',\n /** SAP HANA. */\n HANADB: 'hanadb',\n /** Ingres. */\n INGRES: 'ingres',\n /** FirstSQL. */\n FIRSTSQL: 'firstsql',\n /** EnterpriseDB. */\n EDB: 'edb',\n /** InterSystems Caché. */\n CACHE: 'cache',\n /** Adabas (Adaptable Database System). */\n ADABAS: 'adabas',\n /** Firebird. */\n FIREBIRD: 'firebird',\n /** Apache Derby. */\n DERBY: 'derby',\n /** FileMaker. */\n FILEMAKER: 'filemaker',\n /** Informix. */\n INFORMIX: 'informix',\n /** InstantDB. */\n INSTANTDB: 'instantdb',\n /** InterBase. */\n INTERBASE: 'interbase',\n /** MariaDB. */\n MARIADB: 'mariadb',\n /** Netezza. */\n NETEZZA: 'netezza',\n /** Pervasive PSQL. */\n PERVASIVE: 'pervasive',\n /** PointBase. */\n POINTBASE: 'pointbase',\n /** SQLite. */\n SQLITE: 'sqlite',\n /** Sybase. */\n SYBASE: 'sybase',\n /** Teradata. */\n TERADATA: 'teradata',\n /** Vertica. */\n VERTICA: 'vertica',\n /** H2. */\n H2: 'h2',\n /** ColdFusion IMQ. */\n COLDFUSION: 'coldfusion',\n /** Apache Cassandra. */\n CASSANDRA: 'cassandra',\n /** Apache HBase. */\n HBASE: 'hbase',\n /** MongoDB. */\n MONGODB: 'mongodb',\n /** Redis. */\n REDIS: 'redis',\n /** Couchbase. */\n COUCHBASE: 'couchbase',\n /** CouchDB. */\n COUCHDB: 'couchdb',\n /** Microsoft Azure Cosmos DB. */\n COSMOSDB: 'cosmosdb',\n /** Amazon DynamoDB. */\n DYNAMODB: 'dynamodb',\n /** Neo4j. */\n NEO4J: 'neo4j',\n /** Apache Geode. */\n GEODE: 'geode',\n /** Elasticsearch. */\n ELASTICSEARCH: 'elasticsearch',\n /** Memcached. */\n MEMCACHED: 'memcached',\n /** CockroachDB. */\n COCKROACHDB: 'cockroachdb',\n};\nexports.DbCassandraConsistencyLevelValues = {\n /** all. */\n ALL: 'all',\n /** each_quorum. */\n EACH_QUORUM: 'each_quorum',\n /** quorum. */\n QUORUM: 'quorum',\n /** local_quorum. */\n LOCAL_QUORUM: 'local_quorum',\n /** one. */\n ONE: 'one',\n /** two. */\n TWO: 'two',\n /** three. */\n THREE: 'three',\n /** local_one. */\n LOCAL_ONE: 'local_one',\n /** any. */\n ANY: 'any',\n /** serial. */\n SERIAL: 'serial',\n /** local_serial. */\n LOCAL_SERIAL: 'local_serial',\n};\nexports.FaasTriggerValues = {\n /** A response to some data source operation such as a database or filesystem read/write. */\n DATASOURCE: 'datasource',\n /** To provide an answer to an inbound HTTP request. */\n HTTP: 'http',\n /** A function is set to be executed when messages are sent to a messaging system. */\n PUBSUB: 'pubsub',\n /** A function is scheduled to be executed regularly. */\n TIMER: 'timer',\n /** If none of the others apply. */\n OTHER: 'other',\n};\nexports.FaasDocumentOperationValues = {\n /** When a new object is created. */\n INSERT: 'insert',\n /** When an object is modified. */\n EDIT: 'edit',\n /** When an object is deleted. */\n DELETE: 'delete',\n};\nexports.FaasInvokedProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.NetTransportValues = {\n /** ip_tcp. */\n IP_TCP: 'ip_tcp',\n /** ip_udp. */\n IP_UDP: 'ip_udp',\n /** Another IP-based protocol. */\n IP: 'ip',\n /** Unix Domain socket. See below. */\n UNIX: 'unix',\n /** Named or anonymous pipe. See note below. */\n PIPE: 'pipe',\n /** In-process communication. */\n INPROC: 'inproc',\n /** Something else (non IP-based). */\n OTHER: 'other',\n};\nexports.NetHostConnectionTypeValues = {\n /** wifi. */\n WIFI: 'wifi',\n /** wired. */\n WIRED: 'wired',\n /** cell. */\n CELL: 'cell',\n /** unavailable. */\n UNAVAILABLE: 'unavailable',\n /** unknown. */\n UNKNOWN: 'unknown',\n};\nexports.NetHostConnectionSubtypeValues = {\n /** GPRS. */\n GPRS: 'gprs',\n /** EDGE. */\n EDGE: 'edge',\n /** UMTS. */\n UMTS: 'umts',\n /** CDMA. */\n CDMA: 'cdma',\n /** EVDO Rel. 0. */\n EVDO_0: 'evdo_0',\n /** EVDO Rev. A. */\n EVDO_A: 'evdo_a',\n /** CDMA2000 1XRTT. */\n CDMA2000_1XRTT: 'cdma2000_1xrtt',\n /** HSDPA. */\n HSDPA: 'hsdpa',\n /** HSUPA. */\n HSUPA: 'hsupa',\n /** HSPA. */\n HSPA: 'hspa',\n /** IDEN. */\n IDEN: 'iden',\n /** EVDO Rev. B. */\n EVDO_B: 'evdo_b',\n /** LTE. */\n LTE: 'lte',\n /** EHRPD. */\n EHRPD: 'ehrpd',\n /** HSPAP. */\n HSPAP: 'hspap',\n /** GSM. */\n GSM: 'gsm',\n /** TD-SCDMA. */\n TD_SCDMA: 'td_scdma',\n /** IWLAN. */\n IWLAN: 'iwlan',\n /** 5G NR (New Radio). */\n NR: 'nr',\n /** 5G NRNSA (New Radio Non-Standalone). */\n NRNSA: 'nrnsa',\n /** LTE CA. */\n LTE_CA: 'lte_ca',\n};\nexports.HttpFlavorValues = {\n /** HTTP 1.0. */\n HTTP_1_0: '1.0',\n /** HTTP 1.1. */\n HTTP_1_1: '1.1',\n /** HTTP 2. */\n HTTP_2_0: '2.0',\n /** SPDY protocol. */\n SPDY: 'SPDY',\n /** QUIC protocol. */\n QUIC: 'QUIC',\n};\nexports.MessagingDestinationKindValues = {\n /** A message sent to a queue. */\n QUEUE: 'queue',\n /** A message sent to a topic. */\n TOPIC: 'topic',\n};\nexports.MessagingOperationValues = {\n /** receive. */\n RECEIVE: 'receive',\n /** process. */\n PROCESS: 'process',\n};\nexports.RpcGrpcStatusCodeValues = {\n /** OK. */\n OK: 0,\n /** CANCELLED. */\n CANCELLED: 1,\n /** UNKNOWN. */\n UNKNOWN: 2,\n /** INVALID_ARGUMENT. */\n INVALID_ARGUMENT: 3,\n /** DEADLINE_EXCEEDED. */\n DEADLINE_EXCEEDED: 4,\n /** NOT_FOUND. */\n NOT_FOUND: 5,\n /** ALREADY_EXISTS. */\n ALREADY_EXISTS: 6,\n /** PERMISSION_DENIED. */\n PERMISSION_DENIED: 7,\n /** RESOURCE_EXHAUSTED. */\n RESOURCE_EXHAUSTED: 8,\n /** FAILED_PRECONDITION. */\n FAILED_PRECONDITION: 9,\n /** ABORTED. */\n ABORTED: 10,\n /** OUT_OF_RANGE. */\n OUT_OF_RANGE: 11,\n /** UNIMPLEMENTED. */\n UNIMPLEMENTED: 12,\n /** INTERNAL. */\n INTERNAL: 13,\n /** UNAVAILABLE. */\n UNAVAILABLE: 14,\n /** DATA_LOSS. */\n DATA_LOSS: 15,\n /** UNAUTHENTICATED. */\n UNAUTHENTICATED: 16,\n};\nexports.MessageTypeValues = {\n /** sent. */\n SENT: 'SENT',\n /** received. */\n RECEIVED: 'RECEIVED',\n};\n//# sourceMappingURL=SemanticAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPTraceExporter = void 0;\nconst exporter_trace_otlp_http_1 = require(\"@opentelemetry/exporter-trace-otlp-http\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst otlp_exporter_base_1 = require(\"@opentelemetry/otlp-exporter-base\");\nconst otlp_proto_exporter_base_1 = require(\"@opentelemetry/otlp-proto-exporter-base\");\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = '/v1/traces';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n/**\n * Collector Trace Exporter for Node with protobuf\n */\nclass OTLPTraceExporter extends otlp_proto_exporter_base_1.OTLPProtoExporterNodeBase {\n constructor(config = {}) {\n super(config);\n this.headers = Object.assign(this.headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS));\n }\n convert(spans) {\n return (0, exporter_trace_otlp_http_1.toOTLPExportTraceServiceRequest)(spans, this);\n }\n getDefaultUrl(config) {\n return typeof config.url === 'string'\n ? config.url\n : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0\n ? (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT\n : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? (0, otlp_exporter_base_1.appendResourcePathToUrlIfNotPresent)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : DEFAULT_COLLECTOR_URL;\n }\n getServiceClientType() {\n return otlp_proto_exporter_base_1.ServiceClientType.SPANS;\n }\n}\nexports.OTLPTraceExporter = OTLPTraceExporter;\n//# sourceMappingURL=OTLPTraceExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./OTLPTraceExporter\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExportResultCode = void 0;\nvar ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0;\nexports.BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexports.BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexports.BAGGAGE_ITEMS_SEPARATOR = ',';\n// Name of the http header used to propagate the baggage\nexports.BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CBaggagePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"../../trace/suppress-tracing\");\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\n/**\n * Propagates {@link Baggage} through Context format propagation.\n *\n * Based on the Baggage specification:\n * https://w3c.github.io/baggage/\n */\nclass W3CBaggagePropagator {\n inject(context, carrier, setter) {\n const baggage = api_1.propagation.getBaggage(context);\n if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))\n return;\n const keyPairs = (0, utils_1.getKeyPairs)(baggage)\n .filter((pair) => {\n return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;\n })\n .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS);\n const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs);\n if (headerValue.length > 0) {\n setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);\n }\n }\n extract(context, carrier, getter) {\n const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);\n const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue;\n if (!baggageString)\n return context;\n const baggage = {};\n if (baggageString.length === 0) {\n return context;\n }\n const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);\n pairs.forEach(entry => {\n const keyPair = (0, utils_1.parsePairKeyValue)(entry);\n if (keyPair) {\n const baggageEntry = { value: keyPair.value };\n if (keyPair.metadata) {\n baggageEntry.metadata = keyPair.metadata;\n }\n baggage[keyPair.key] = baggageEntry;\n }\n });\n if (Object.entries(baggage).length === 0) {\n return context;\n }\n return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));\n }\n fields() {\n return [constants_1.BAGGAGE_HEADER];\n }\n}\nexports.W3CBaggagePropagator = W3CBaggagePropagator;\n//# sourceMappingURL=W3CBaggagePropagator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst api_1 = require(\"@opentelemetry/api\");\nconst constants_1 = require(\"./constants\");\nfunction serializeKeyPairs(keyPairs) {\n return keyPairs.reduce((hValue, current) => {\n const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`;\n return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n }, '');\n}\nexports.serializeKeyPairs = serializeKeyPairs;\nfunction getKeyPairs(baggage) {\n return baggage.getAllEntries().map(([key, value]) => {\n let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;\n // include opaque metadata if provided\n // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation\n if (value.metadata !== undefined) {\n entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();\n }\n return entry;\n });\n}\nexports.getKeyPairs = getKeyPairs;\nfunction parsePairKeyValue(entry) {\n const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR);\n if (valueProps.length <= 0)\n return;\n const keyPairPart = valueProps.shift();\n if (!keyPairPart)\n return;\n const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR);\n if (keyPair.length !== 2)\n return;\n const key = decodeURIComponent(keyPair[0].trim());\n const value = decodeURIComponent(keyPair[1].trim());\n let metadata;\n if (valueProps.length > 0) {\n metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR));\n }\n return { key, value, metadata };\n}\nexports.parsePairKeyValue = parsePairKeyValue;\n/**\n * Parse a string serialized in the baggage HTTP Format (without metadata):\n * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md\n */\nfunction parseKeyPairsIntoRecord(value) {\n if (typeof value !== 'string' || value.length === 0)\n return {};\n return value\n .split(constants_1.BAGGAGE_ITEMS_SEPARATOR)\n .map(entry => {\n return parsePairKeyValue(entry);\n })\n .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0)\n .reduce((headers, keyPair) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n headers[keyPair.key] = keyPair.value;\n return headers;\n }, {});\n}\nexports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAttributeValue = exports.sanitizeAttributes = void 0;\nfunction sanitizeAttributes(attributes) {\n const out = {};\n if (attributes == null || typeof attributes !== 'object') {\n return out;\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n for (const [k, v] of Object.entries(attributes)) {\n if (isAttributeValue(v)) {\n if (Array.isArray(v)) {\n out[k] = v.slice();\n }\n else {\n out[k] = v;\n }\n }\n }\n return out;\n}\nexports.sanitizeAttributes = sanitizeAttributes;\nfunction isAttributeValue(val) {\n if (val == null) {\n return true;\n }\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n return isValidPrimitiveAttributeValue(val);\n}\nexports.isAttributeValue = isAttributeValue;\nfunction isHomogeneousAttributeValueArray(arr) {\n let type;\n for (const element of arr) {\n // null/undefined elements are allowed\n if (element == null)\n continue;\n if (!type) {\n if (isValidPrimitiveAttributeValue(element)) {\n type = typeof element;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n if (typeof element === type) {\n continue;\n }\n return false;\n }\n return true;\n}\nfunction isValidPrimitiveAttributeValue(val) {\n switch (typeof val) {\n case 'number':\n return true;\n case 'boolean':\n return true;\n case 'string':\n return true;\n }\n return false;\n}\n//# sourceMappingURL=attributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.globalErrorHandler = exports.setGlobalErrorHandler = void 0;\nconst logging_error_handler_1 = require(\"./logging-error-handler\");\n/** The global error handler delegate */\nlet delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nfunction setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\nexports.setGlobalErrorHandler = setGlobalErrorHandler;\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nfunction globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch (_a) { } // eslint-disable-line no-empty\n}\nexports.globalErrorHandler = globalErrorHandler;\n//# sourceMappingURL=global-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loggingErrorHandler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * Returns a function that logs an error using the provided logger, or a\n * console logger if one was not provided.\n */\nfunction loggingErrorHandler() {\n return (ex) => {\n api_1.diag.error(stringifyException(ex));\n };\n}\nexports.loggingErrorHandler = loggingErrorHandler;\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\n }\n}\n/**\n * Flattens an exception into key-value pairs by traversing the prototype chain\n * and coercing values to strings. Duplicate properties will not be overwritten;\n * the first insert wins.\n */\nfunction flattenException(ex) {\n const result = {};\n let current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(propertyName => {\n if (result[propertyName])\n return;\n const value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0;\nconst platform_1 = require(\"../platform\");\nconst NANOSECOND_DIGITS = 9;\nconst SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number to HrTime, HrTime = [number, number].\n * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970.\n * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds.\n * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150.\n * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds:\n * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210.\n * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:\n * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000.\n * This is represented in HrTime format as [1609504210, 150000000].\n * @param epochMillis\n */\nfunction numberToHrtime(epochMillis) {\n const epochSeconds = epochMillis / 1000;\n // Decimals only.\n const seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) *\n SECOND_TO_NANOSECONDS;\n return [seconds, nanos];\n}\nfunction getTimeOrigin() {\n let timeOrigin = platform_1.otperformance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n const perf = platform_1.otperformance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nfunction hrTime(performanceNow) {\n const timeOrigin = numberToHrtime(getTimeOrigin());\n const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now());\n let seconds = timeOrigin[0] + now[0];\n let nanos = timeOrigin[1] + now[1];\n // Nanoseconds\n if (nanos > SECOND_TO_NANOSECONDS) {\n nanos -= SECOND_TO_NANOSECONDS;\n seconds += 1;\n }\n return [seconds, nanos];\n}\nexports.hrTime = hrTime;\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nfunction timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\n else if (typeof time === 'number') {\n // Must be a performance.now() if it's smaller than process start time.\n if (time < getTimeOrigin()) {\n return hrTime(time);\n }\n else {\n // epoch milliseconds or performance.timeOrigin\n return numberToHrtime(time);\n }\n }\n else if (time instanceof Date) {\n return numberToHrtime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\nexports.timeInputToHrTime = timeInputToHrTime;\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nfunction hrTimeDuration(startTime, endTime) {\n let seconds = endTime[0] - startTime[0];\n let nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\nexports.hrTimeDuration = hrTimeDuration;\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nfunction hrTimeToTimeStamp(time) {\n const precision = NANOSECOND_DIGITS;\n const tmp = `${'0'.repeat(precision)}${time[1]}Z`;\n const nanoString = tmp.substr(tmp.length - precision - 1);\n const date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\nexports.hrTimeToTimeStamp = hrTimeToTimeStamp;\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nfunction hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\nexports.hrTimeToNanoseconds = hrTimeToNanoseconds;\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nfunction hrTimeToMilliseconds(time) {\n return Math.round(time[0] * 1e3 + time[1] / 1e6);\n}\nexports.hrTimeToMilliseconds = hrTimeToMilliseconds;\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nfunction hrTimeToMicroseconds(time) {\n return Math.round(time[0] * 1e6 + time[1] / 1e3);\n}\nexports.hrTimeToMicroseconds = hrTimeToMicroseconds;\n/**\n * check if time is HrTime\n * @param value\n */\nfunction isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\nexports.isTimeInputHrTime = isTimeInputHrTime;\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nfunction isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\nexports.isTimeInput = isTimeInput;\n//# sourceMappingURL=time.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageUtils = void 0;\n__exportStar(require(\"./baggage/propagation/W3CBaggagePropagator\"), exports);\n__exportStar(require(\"./common/attributes\"), exports);\n__exportStar(require(\"./common/global-error-handler\"), exports);\n__exportStar(require(\"./common/logging-error-handler\"), exports);\n__exportStar(require(\"./common/time\"), exports);\n__exportStar(require(\"./common/types\"), exports);\n__exportStar(require(\"./ExportResult\"), exports);\n__exportStar(require(\"./version\"), exports);\nexports.baggageUtils = require(\"./baggage/utils\");\n__exportStar(require(\"./platform\"), exports);\n__exportStar(require(\"./propagation/composite\"), exports);\n__exportStar(require(\"./trace/W3CTraceContextPropagator\"), exports);\n__exportStar(require(\"./trace/IdGenerator\"), exports);\n__exportStar(require(\"./trace/rpc-metadata\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOffSampler\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOnSampler\"), exports);\n__exportStar(require(\"./trace/sampler/ParentBasedSampler\"), exports);\n__exportStar(require(\"./trace/sampler/TraceIdRatioBasedSampler\"), exports);\n__exportStar(require(\"./trace/suppress-tracing\"), exports);\n__exportStar(require(\"./trace/TraceState\"), exports);\n__exportStar(require(\"./utils/environment\"), exports);\n__exportStar(require(\"./utils/merge\"), exports);\n__exportStar(require(\"./utils/sampling\"), exports);\n__exportStar(require(\"./utils/url\"), exports);\n__exportStar(require(\"./utils/wrap\"), exports);\n__exportStar(require(\"./utils/callback\"), exports);\n__exportStar(require(\"./version\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=validators.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomIdGenerator = void 0;\nconst SPAN_ID_BYTES = 8;\nconst TRACE_ID_BYTES = 16;\nclass RandomIdGenerator {\n constructor() {\n /**\n * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex\n * characters corresponding to 128 bits.\n */\n this.generateTraceId = getIdGenerator(TRACE_ID_BYTES);\n /**\n * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex\n * characters corresponding to 64 bits.\n */\n this.generateSpanId = getIdGenerator(SPAN_ID_BYTES);\n }\n}\nexports.RandomIdGenerator = RandomIdGenerator;\nconst SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES);\nfunction getIdGenerator(bytes) {\n return function generateId() {\n for (let i = 0; i < bytes / 4; i++) {\n // unsigned right shift drops decimal part of the number\n // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE\n SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4);\n }\n // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated\n for (let i = 0; i < bytes; i++) {\n if (SHARED_BUFFER[i] > 0) {\n break;\n }\n else if (i === bytes - 1) {\n SHARED_BUFFER[bytes - 1] = 1;\n }\n }\n return SHARED_BUFFER.toString('hex', 0, bytes);\n };\n}\n//# sourceMappingURL=RandomIdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEnv = void 0;\nconst os = require(\"os\");\nconst environment_1 = require(\"../../utils/environment\");\n/**\n * Gets the environment variables\n */\nfunction getEnv() {\n const processEnv = (0, environment_1.parseEnvironment)(process.env);\n return Object.assign({\n HOSTNAME: os.hostname(),\n }, environment_1.DEFAULT_ENVIRONMENT, processEnv);\n}\nexports.getEnv = getEnv;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hexToBase64 = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction hexToBase64(hexStr) {\n const hexStrLen = hexStr.length;\n let hexAsciiCharsStr = '';\n for (let i = 0; i < hexStrLen; i += 2) {\n const hexPair = hexStr.substring(i, i + 2);\n const hexVal = parseInt(hexPair, 16);\n hexAsciiCharsStr += String.fromCharCode(hexVal);\n }\n return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64');\n}\nexports.hexToBase64 = hexToBase64;\n//# sourceMappingURL=hex-to-base64.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./environment\"), exports);\n__exportStar(require(\"./globalThis\"), exports);\n__exportStar(require(\"./hex-to-base64\"), exports);\n__exportStar(require(\"./RandomIdGenerator\"), exports);\n__exportStar(require(\"./performance\"), exports);\n__exportStar(require(\"./sdk-info\"), exports);\n__exportStar(require(\"./timer-util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.otperformance = void 0;\nconst perf_hooks_1 = require(\"perf_hooks\");\nexports.otperformance = perf_hooks_1.performance;\n//# sourceMappingURL=performance.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SDK_INFO = void 0;\nconst version_1 = require(\"../../version\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\n/** Constants describing the SDK in use */\nexports.SDK_INFO = {\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node',\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS,\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION,\n};\n//# sourceMappingURL=sdk-info.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unrefTimer = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction unrefTimer(timer) {\n timer.unref();\n}\nexports.unrefTimer = unrefTimer;\n//# sourceMappingURL=timer-util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompositePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Combines multiple propagators into a single propagator. */\nclass CompositePropagator {\n /**\n * Construct a composite propagator from a list of propagators.\n *\n * @param [config] Configuration object for composite propagator\n */\n constructor(config = {}) {\n var _a;\n this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : [];\n this._fields = Array.from(new Set(this._propagators\n // older propagators may not have fields function, null check to be sure\n .map(p => (typeof p.fields === 'function' ? p.fields() : []))\n .reduce((x, y) => x.concat(y), [])));\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same carrier key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to inject\n * @param carrier Carrier into which context will be injected\n */\n inject(context, carrier, setter) {\n for (const propagator of this._propagators) {\n try {\n propagator.inject(context, carrier, setter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n }\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same context key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to add values to\n * @param carrier Carrier from which to extract context\n */\n extract(context, carrier, getter) {\n return this._propagators.reduce((ctx, propagator) => {\n try {\n return propagator.extract(ctx, carrier, getter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n return ctx;\n }, context);\n }\n fields() {\n // return a new array so our fields cannot be modified\n return this._fields.slice();\n }\n}\nexports.CompositePropagator = CompositePropagator;\n//# sourceMappingURL=composite.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceState = void 0;\nconst validators_1 = require(\"../internal/validators\");\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nclass TraceState {\n constructor(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceState();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\nexports.TraceState = TraceState;\n//# sourceMappingURL=TraceState.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"./suppress-tracing\");\nconst TraceState_1 = require(\"./TraceState\");\nexports.TRACE_PARENT_HEADER = 'traceparent';\nexports.TRACE_STATE_HEADER = 'tracestate';\nconst VERSION = '00';\nconst VERSION_PART = '(?!ff)[\\\\da-f]{2}';\nconst TRACE_ID_PART = '(?![0]{32})[\\\\da-f]{32}';\nconst PARENT_ID_PART = '(?![0]{16})[\\\\da-f]{16}';\nconst FLAGS_PART = '[\\\\da-f]{2}';\nconst TRACE_PARENT_REGEX = new RegExp(`^\\\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\\\s?$`);\n/**\n * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}\n * @param traceParent - A meta property that comes from server.\n * It should be dynamically generated server side to have the server's request trace Id,\n * a parent span Id that was set on the server's request span,\n * and the trace flags to indicate the server's sampling decision\n * (01 = sampled, 00 = not sampled).\n * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'\n * For more information see {@link https://www.w3.org/TR/trace-context/}\n */\nfunction parseTraceParent(traceParent) {\n const match = TRACE_PARENT_REGEX.exec(traceParent);\n if (!match)\n return null;\n // According to the specification the implementation should be compatible\n // with future versions. If there are more parts, we only reject it if it's using version 00\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n if (match[1] === '00' && match[5])\n return null;\n return {\n traceId: match[2],\n spanId: match[3],\n traceFlags: parseInt(match[4], 16),\n };\n}\nexports.parseTraceParent = parseTraceParent;\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n *\n * Based on the Trace Context specification:\n * https://www.w3.org/TR/trace-context/\n */\nclass W3CTraceContextPropagator {\n inject(context, carrier, setter) {\n const spanContext = api_1.trace.getSpanContext(context);\n if (!spanContext ||\n (0, suppress_tracing_1.isTracingSuppressed)(context) ||\n !(0, api_1.isSpanContextValid)(spanContext))\n return;\n const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;\n setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent);\n if (spanContext.traceState) {\n setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize());\n }\n }\n extract(context, carrier, getter) {\n const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER);\n if (!traceParentHeader)\n return context;\n const traceParent = Array.isArray(traceParentHeader)\n ? traceParentHeader[0]\n : traceParentHeader;\n if (typeof traceParent !== 'string')\n return context;\n const spanContext = parseTraceParent(traceParent);\n if (!spanContext)\n return context;\n spanContext.isRemote = true;\n const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER);\n if (traceStateHeader) {\n // If more than one `tracestate` header is found, we merge them into a\n // single header.\n const state = Array.isArray(traceStateHeader)\n ? traceStateHeader.join(',')\n : traceStateHeader;\n spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined);\n }\n return api_1.trace.setSpanContext(context, spanContext);\n }\n fields() {\n return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER];\n }\n}\nexports.W3CTraceContextPropagator = W3CTraceContextPropagator;\n//# sourceMappingURL=W3CTraceContextPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA');\nvar RPCType;\n(function (RPCType) {\n RPCType[\"HTTP\"] = \"http\";\n})(RPCType = exports.RPCType || (exports.RPCType = {}));\nfunction setRPCMetadata(context, meta) {\n return context.setValue(RPC_METADATA_KEY, meta);\n}\nexports.setRPCMetadata = setRPCMetadata;\nfunction deleteRPCMetadata(context) {\n return context.deleteValue(RPC_METADATA_KEY);\n}\nexports.deleteRPCMetadata = deleteRPCMetadata;\nfunction getRPCMetadata(context) {\n return context.getValue(RPC_METADATA_KEY);\n}\nexports.getRPCMetadata = getRPCMetadata;\n//# sourceMappingURL=rpc-metadata.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOffSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples no traces. */\nclass AlwaysOffSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return 'AlwaysOffSampler';\n }\n}\nexports.AlwaysOffSampler = AlwaysOffSampler;\n//# sourceMappingURL=AlwaysOffSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOnSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples all traces. */\nclass AlwaysOnSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.RECORD_AND_SAMPLED,\n };\n }\n toString() {\n return 'AlwaysOnSampler';\n }\n}\nexports.AlwaysOnSampler = AlwaysOnSampler;\n//# sourceMappingURL=AlwaysOnSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParentBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst global_error_handler_1 = require(\"../../common/global-error-handler\");\nconst AlwaysOffSampler_1 = require(\"./AlwaysOffSampler\");\nconst AlwaysOnSampler_1 = require(\"./AlwaysOnSampler\");\n/**\n * A composite sampler that either respects the parent span's sampling decision\n * or delegates to `delegateSampler` for root spans.\n */\nclass ParentBasedSampler {\n constructor(config) {\n var _a, _b, _c, _d;\n this._root = config.root;\n if (!this._root) {\n (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured'));\n this._root = new AlwaysOnSampler_1.AlwaysOnSampler();\n }\n this._remoteParentSampled =\n (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._remoteParentNotSampled =\n (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler();\n this._localParentSampled =\n (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._localParentNotSampled =\n (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();\n }\n shouldSample(context, traceId, spanName, spanKind, attributes, links) {\n const parentContext = api_1.trace.getSpanContext(context);\n if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {\n return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.isRemote) {\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n toString() {\n return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;\n }\n}\nexports.ParentBasedSampler = ParentBasedSampler;\n//# sourceMappingURL=ParentBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceIdRatioBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples a given fraction of traces based of trace id deterministically. */\nclass TraceIdRatioBasedSampler {\n constructor(_ratio = 0) {\n this._ratio = _ratio;\n this._ratio = this._normalize(_ratio);\n this._upperBound = Math.floor(this._ratio * 0xffffffff);\n }\n shouldSample(context, traceId) {\n return {\n decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound\n ? api_1.SamplingDecision.RECORD_AND_SAMPLED\n : api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return `TraceIdRatioBased{${this._ratio}}`;\n }\n _normalize(ratio) {\n if (typeof ratio !== 'number' || isNaN(ratio))\n return 0;\n return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;\n }\n _accumulate(traceId) {\n let accumulation = 0;\n for (let i = 0; i < traceId.length / 8; i++) {\n const pos = i * 8;\n const part = parseInt(traceId.slice(pos, pos + 8), 16);\n accumulation = (accumulation ^ part) >>> 0;\n }\n return accumulation;\n }\n}\nexports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;\n//# sourceMappingURL=TraceIdRatioBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nfunction suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexports.suppressTracing = suppressTracing;\nfunction unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexports.unsuppressTracing = unsuppressTracing;\nfunction isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\nexports.isTracingSuppressed = isTracingSuppressed;\n//# sourceMappingURL=suppress-tracing.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BindOnceFuture = void 0;\nconst promise_1 = require(\"./promise\");\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nclass BindOnceFuture {\n constructor(_callback, _that) {\n this._callback = _callback;\n this._that = _that;\n this._isCalled = false;\n this._deferred = new promise_1.Deferred();\n }\n get isCalled() {\n return this._isCalled;\n }\n get promise() {\n return this._deferred.promise;\n }\n call(...args) {\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve(this._callback.call(this._that, ...args))\n .then(val => this._deferred.resolve(val), err => this._deferred.reject(err));\n }\n catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n }\n}\nexports.BindOnceFuture = BindOnceFuture;\n//# sourceMappingURL=callback.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst sampling_1 = require(\"./sampling\");\nconst DEFAULT_LIST_SEPARATOR = ',';\n/**\n * Environment interface to define all names\n */\nconst ENVIRONMENT_NUMBERS_KEYS = [\n 'OTEL_BSP_EXPORT_TIMEOUT',\n 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BSP_MAX_QUEUE_SIZE',\n 'OTEL_BSP_SCHEDULE_DELAY',\n 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_LINK_COUNT_LIMIT',\n 'OTEL_EXPORTER_JAEGER_AGENT_PORT',\n];\nfunction isEnvVarANumber(key) {\n return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1);\n}\nconst ENVIRONMENT_LISTS_KEYS = [\n 'OTEL_NO_PATCH_MODULES',\n 'OTEL_PROPAGATORS',\n];\nfunction isEnvVarAList(key) {\n return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1;\n}\nexports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\nexports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\n/**\n * Default environment variables\n */\nexports.DEFAULT_ENVIRONMENT = {\n CONTAINER_NAME: '',\n ECS_CONTAINER_METADATA_URI_V4: '',\n ECS_CONTAINER_METADATA_URI: '',\n HOSTNAME: '',\n KUBERNETES_SERVICE_HOST: '',\n NAMESPACE: '',\n OTEL_BSP_EXPORT_TIMEOUT: 30000,\n OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BSP_MAX_QUEUE_SIZE: 2048,\n OTEL_BSP_SCHEDULE_DELAY: 5000,\n OTEL_EXPORTER_JAEGER_AGENT_HOST: '',\n OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832,\n OTEL_EXPORTER_JAEGER_ENDPOINT: '',\n OTEL_EXPORTER_JAEGER_PASSWORD: '',\n OTEL_EXPORTER_JAEGER_USER: '',\n OTEL_EXPORTER_OTLP_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_HEADERS: '',\n OTEL_EXPORTER_OTLP_TRACES_HEADERS: '',\n OTEL_EXPORTER_OTLP_METRICS_HEADERS: '',\n OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans',\n OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO,\n OTEL_NO_PATCH_MODULES: [],\n OTEL_PROPAGATORS: ['tracecontext', 'baggage'],\n OTEL_RESOURCE_ATTRIBUTES: '',\n OTEL_SERVICE_NAME: '',\n OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_EVENT_COUNT_LIMIT: 128,\n OTEL_SPAN_LINK_COUNT_LIMIT: 128,\n OTEL_TRACES_EXPORTER: 'none',\n OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn,\n OTEL_TRACES_SAMPLER_ARG: '',\n OTEL_EXPORTER_OTLP_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: ''\n};\n/**\n * Parses a variable as number with number validation\n * @param name\n * @param environment\n * @param values\n * @param min\n * @param max\n */\nfunction parseNumber(name, environment, values, min = -Infinity, max = Infinity) {\n if (typeof values[name] !== 'undefined') {\n const value = Number(values[name]);\n if (!isNaN(value)) {\n if (value < min) {\n environment[name] = min;\n }\n else if (value > max) {\n environment[name] = max;\n }\n else {\n environment[name] = value;\n }\n }\n }\n}\n/**\n * Parses list-like strings from input into output.\n * @param name\n * @param environment\n * @param values\n * @param separator\n */\nfunction parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) {\n const givenValue = input[name];\n if (typeof givenValue === 'string') {\n output[name] = givenValue.split(separator).map(v => v.trim());\n }\n}\n// The support string -> DiagLogLevel mappings\nconst logLevelMap = {\n ALL: api_1.DiagLogLevel.ALL,\n VERBOSE: api_1.DiagLogLevel.VERBOSE,\n DEBUG: api_1.DiagLogLevel.DEBUG,\n INFO: api_1.DiagLogLevel.INFO,\n WARN: api_1.DiagLogLevel.WARN,\n ERROR: api_1.DiagLogLevel.ERROR,\n NONE: api_1.DiagLogLevel.NONE,\n};\n/**\n * Environmentally sets log level if valid log level string is provided\n * @param key\n * @param environment\n * @param values\n */\nfunction setLogLevelFromEnv(key, environment, values) {\n const value = values[key];\n if (typeof value === 'string') {\n const theLevel = logLevelMap[value.toUpperCase()];\n if (theLevel != null) {\n environment[key] = theLevel;\n }\n }\n}\n/**\n * Parses environment values\n * @param values\n */\nfunction parseEnvironment(values) {\n const environment = {};\n for (const env in exports.DEFAULT_ENVIRONMENT) {\n const key = env;\n switch (key) {\n case 'OTEL_LOG_LEVEL':\n setLogLevelFromEnv(key, environment, values);\n break;\n default:\n if (isEnvVarANumber(key)) {\n parseNumber(key, environment, values);\n }\n else if (isEnvVarAList(key)) {\n parseStringList(key, environment, values);\n }\n else {\n const value = values[key];\n if (typeof value !== 'undefined' && value !== null) {\n environment[key] = String(value);\n }\n }\n }\n }\n return environment;\n}\nexports.parseEnvironment = parseEnvironment;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPlainObject = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\nconst objectTag = '[object Object]';\nconst nullTag = '[object Null]';\nconst undefinedTag = '[object Undefined]';\nconst funcProto = Function.prototype;\nconst funcToString = funcProto.toString;\nconst objectCtorString = funcToString.call(Object);\nconst getPrototype = overArg(Object.getPrototypeOf, Object);\nconst objectProto = Object.prototype;\nconst hasOwnProperty = objectProto.hasOwnProperty;\nconst symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nconst nativeObjectToString = objectProto.toString;\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n return false;\n }\n const proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) === objectCtorString;\n}\nexports.isPlainObject = isPlainObject;\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];\n let unmasked = false;\n try {\n value[symToStringTag] = undefined;\n unmasked = true;\n }\n catch (e) {\n // silence\n }\n const result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n }\n else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n//# sourceMappingURL=lodash.merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.merge = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst lodash_merge_1 = require(\"./lodash.merge\");\nconst MAX_LEVEL = 20;\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nfunction merge(...args) {\n let result = args.shift();\n const objects = new WeakMap();\n while (args.length > 0) {\n result = mergeTwoObjects(result, args.shift(), 0, objects);\n }\n return result;\n}\nexports.merge = merge;\nfunction takeValue(value) {\n if (isArray(value)) {\n return value.slice();\n }\n return value;\n}\n/**\n * Merges two objects\n * @param one - first object\n * @param two - second object\n * @param level - current deep level\n * @param objects - objects holder that has been already referenced - to prevent\n * cyclic dependency\n */\nfunction mergeTwoObjects(one, two, level = 0, objects) {\n let result;\n if (level > MAX_LEVEL) {\n return undefined;\n }\n level++;\n if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n result = takeValue(two);\n }\n else if (isArray(one)) {\n result = one.slice();\n if (isArray(two)) {\n for (let i = 0, j = two.length; i < j; i++) {\n result.push(takeValue(two[i]));\n }\n }\n else if (isObject(two)) {\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n result[key] = takeValue(two[key]);\n }\n }\n }\n else if (isObject(one)) {\n if (isObject(two)) {\n if (!shouldMerge(one, two)) {\n return two;\n }\n result = Object.assign({}, one);\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n const twoValue = two[key];\n if (isPrimitive(twoValue)) {\n if (typeof twoValue === 'undefined') {\n delete result[key];\n }\n else {\n // result[key] = takeValue(twoValue);\n result[key] = twoValue;\n }\n }\n else {\n const obj1 = result[key];\n const obj2 = twoValue;\n if (wasObjectReferenced(one, key, objects) ||\n wasObjectReferenced(two, key, objects)) {\n delete result[key];\n }\n else {\n if (isObject(obj1) && isObject(obj2)) {\n const arr1 = objects.get(obj1) || [];\n const arr2 = objects.get(obj2) || [];\n arr1.push({ obj: one, key });\n arr2.push({ obj: two, key });\n objects.set(obj1, arr1);\n objects.set(obj2, arr2);\n }\n result[key] = mergeTwoObjects(result[key], twoValue, level, objects);\n }\n }\n }\n }\n else {\n result = two;\n }\n }\n return result;\n}\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(obj, key, objects) {\n const arr = objects.get(obj[key]) || [];\n for (let i = 0, j = arr.length; i < j; i++) {\n const info = arr[i];\n if (info.key === key && info.obj === obj) {\n return true;\n }\n }\n return false;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isObject(value) {\n return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object';\n}\nfunction isPrimitive(value) {\n return typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n value instanceof Date ||\n value instanceof RegExp ||\n value === null;\n}\nfunction shouldMerge(one, two) {\n if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Deferred = void 0;\nclass Deferred {\n constructor() {\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n get promise() {\n return this._promise;\n }\n resolve(val) {\n this._resolve(val);\n }\n reject(err) {\n this._reject(err);\n }\n}\nexports.Deferred = Deferred;\n//# sourceMappingURL=promise.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TracesSamplerValues = void 0;\nvar TracesSamplerValues;\n(function (TracesSamplerValues) {\n TracesSamplerValues[\"AlwaysOff\"] = \"always_off\";\n TracesSamplerValues[\"AlwaysOn\"] = \"always_on\";\n TracesSamplerValues[\"ParentBasedAlwaysOff\"] = \"parentbased_always_off\";\n TracesSamplerValues[\"ParentBasedAlwaysOn\"] = \"parentbased_always_on\";\n TracesSamplerValues[\"ParentBasedTraceIdRatio\"] = \"parentbased_traceidratio\";\n TracesSamplerValues[\"TraceIdRatio\"] = \"traceidratio\";\n})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {}));\n//# sourceMappingURL=sampling.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isUrlIgnored = exports.urlMatches = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction urlMatches(url, urlToMatch) {\n if (typeof urlToMatch === 'string') {\n return url === urlToMatch;\n }\n else {\n return !!url.match(urlToMatch);\n }\n}\nexports.urlMatches = urlMatches;\n/**\n * Check if {@param url} should be ignored when comparing against {@param ignoredUrls}\n * @param url\n * @param ignoredUrls\n */\nfunction isUrlIgnored(url, ignoredUrls) {\n if (!ignoredUrls) {\n return false;\n }\n for (const ignoreUrl of ignoredUrls) {\n if (urlMatches(url, ignoreUrl)) {\n return true;\n }\n }\n return false;\n}\nexports.isUrlIgnored = isUrlIgnored;\n//# sourceMappingURL=url.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isWrapped = void 0;\n/**\n * Checks if certain function has been already wrapped\n * @param func\n */\nfunction isWrapped(func) {\n return (typeof func === 'function' &&\n typeof func.__original === 'function' &&\n typeof func.__unwrap === 'function' &&\n func.__wrapped === true);\n}\nexports.isWrapped = isWrapped;\n//# sourceMappingURL=wrap.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.1.1';\n//# sourceMappingURL=version.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./trace\"), exports);\n__exportStar(require(\"./resource\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticResourceAttributes = {\n /**\n * Name of the cloud provider.\n */\n CLOUD_PROVIDER: 'cloud.provider',\n /**\n * The cloud account ID the resource is assigned to.\n */\n CLOUD_ACCOUNT_ID: 'cloud.account.id',\n /**\n * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations).\n */\n CLOUD_REGION: 'cloud.region',\n /**\n * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\n *\n * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud.\n */\n CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone',\n /**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\n CLOUD_PLATFORM: 'cloud.platform',\n /**\n * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).\n */\n AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn',\n /**\n * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).\n */\n AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn',\n /**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n */\n AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype',\n /**\n * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).\n */\n AWS_ECS_TASK_ARN: 'aws.ecs.task.arn',\n /**\n * The task definition family this task definition is a member of.\n */\n AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family',\n /**\n * The revision for this task definition.\n */\n AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision',\n /**\n * The ARN of an EKS cluster.\n */\n AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn',\n /**\n * The name(s) of the AWS log group(s) an application is writing to.\n *\n * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.\n */\n AWS_LOG_GROUP_NAMES: 'aws.log.group.names',\n /**\n * The Amazon Resource Name(s) (ARN) of the AWS log group(s).\n *\n * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).\n */\n AWS_LOG_GROUP_ARNS: 'aws.log.group.arns',\n /**\n * The name(s) of the AWS log stream(s) an application is writing to.\n */\n AWS_LOG_STREAM_NAMES: 'aws.log.stream.names',\n /**\n * The ARN(s) of the AWS log stream(s).\n *\n * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.\n */\n AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns',\n /**\n * Container name.\n */\n CONTAINER_NAME: 'container.name',\n /**\n * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated.\n */\n CONTAINER_ID: 'container.id',\n /**\n * The container runtime managing this container.\n */\n CONTAINER_RUNTIME: 'container.runtime',\n /**\n * Name of the image the container was built on.\n */\n CONTAINER_IMAGE_NAME: 'container.image.name',\n /**\n * Container image tag.\n */\n CONTAINER_IMAGE_TAG: 'container.image.tag',\n /**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n */\n DEPLOYMENT_ENVIRONMENT: 'deployment.environment',\n /**\n * A unique identifier representing the device.\n *\n * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.\n */\n DEVICE_ID: 'device.id',\n /**\n * The model identifier for the device.\n *\n * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.\n */\n DEVICE_MODEL_IDENTIFIER: 'device.model.identifier',\n /**\n * The marketing name for the device model.\n *\n * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.\n */\n DEVICE_MODEL_NAME: 'device.model.name',\n /**\n * The name of the single function that this runtime instance executes.\n *\n * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes).\n */\n FAAS_NAME: 'faas.name',\n /**\n * The unique ID of the single function that this runtime instance executes.\n *\n * Note: Depending on the cloud provider, use:\n \n * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\n Take care not to use the "invoked ARN" directly but replace any\n [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple\n different aliases.\n * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\n * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).\n \n On some providers, it may not be possible to determine the full ID at startup,\n which is why this field cannot be made required. For example, on AWS the account ID\n part of the ARN is not available without calling another AWS API\n which may be deemed too slow for a short-running lambda function.\n As an alternative, consider setting `faas.id` as a span attribute instead.\n */\n FAAS_ID: 'faas.id',\n /**\n * The immutable version of the function being executed.\n *\n * Note: Depending on the cloud provider and platform, use:\n \n * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\n (an integer represented as a decimal string).\n * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions)\n (i.e., the function name plus the revision suffix).\n * **Google Cloud Functions:** The value of the\n [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\n * **Azure Functions:** Not applicable. Do not set this attribute.\n */\n FAAS_VERSION: 'faas.version',\n /**\n * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\n *\n * Note: * **AWS Lambda:** Use the (full) log stream name.\n */\n FAAS_INSTANCE: 'faas.instance',\n /**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.\n */\n FAAS_MAX_MEMORY: 'faas.max_memory',\n /**\n * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.\n */\n HOST_ID: 'host.id',\n /**\n * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\n */\n HOST_NAME: 'host.name',\n /**\n * Type of host. For Cloud, this must be the machine type.\n */\n HOST_TYPE: 'host.type',\n /**\n * The CPU architecture the host system is running on.\n */\n HOST_ARCH: 'host.arch',\n /**\n * Name of the VM image or OS install the host was instantiated from.\n */\n HOST_IMAGE_NAME: 'host.image.name',\n /**\n * VM image ID. For Cloud, this value is from the provider.\n */\n HOST_IMAGE_ID: 'host.image.id',\n /**\n * The version string of the VM image as defined in [Version Attributes](README.md#version-attributes).\n */\n HOST_IMAGE_VERSION: 'host.image.version',\n /**\n * The name of the cluster.\n */\n K8S_CLUSTER_NAME: 'k8s.cluster.name',\n /**\n * The name of the Node.\n */\n K8S_NODE_NAME: 'k8s.node.name',\n /**\n * The UID of the Node.\n */\n K8S_NODE_UID: 'k8s.node.uid',\n /**\n * The name of the namespace that the pod is running in.\n */\n K8S_NAMESPACE_NAME: 'k8s.namespace.name',\n /**\n * The UID of the Pod.\n */\n K8S_POD_UID: 'k8s.pod.uid',\n /**\n * The name of the Pod.\n */\n K8S_POD_NAME: 'k8s.pod.name',\n /**\n * The name of the Container in a Pod template.\n */\n K8S_CONTAINER_NAME: 'k8s.container.name',\n /**\n * The UID of the ReplicaSet.\n */\n K8S_REPLICASET_UID: 'k8s.replicaset.uid',\n /**\n * The name of the ReplicaSet.\n */\n K8S_REPLICASET_NAME: 'k8s.replicaset.name',\n /**\n * The UID of the Deployment.\n */\n K8S_DEPLOYMENT_UID: 'k8s.deployment.uid',\n /**\n * The name of the Deployment.\n */\n K8S_DEPLOYMENT_NAME: 'k8s.deployment.name',\n /**\n * The UID of the StatefulSet.\n */\n K8S_STATEFULSET_UID: 'k8s.statefulset.uid',\n /**\n * The name of the StatefulSet.\n */\n K8S_STATEFULSET_NAME: 'k8s.statefulset.name',\n /**\n * The UID of the DaemonSet.\n */\n K8S_DAEMONSET_UID: 'k8s.daemonset.uid',\n /**\n * The name of the DaemonSet.\n */\n K8S_DAEMONSET_NAME: 'k8s.daemonset.name',\n /**\n * The UID of the Job.\n */\n K8S_JOB_UID: 'k8s.job.uid',\n /**\n * The name of the Job.\n */\n K8S_JOB_NAME: 'k8s.job.name',\n /**\n * The UID of the CronJob.\n */\n K8S_CRONJOB_UID: 'k8s.cronjob.uid',\n /**\n * The name of the CronJob.\n */\n K8S_CRONJOB_NAME: 'k8s.cronjob.name',\n /**\n * The operating system type.\n */\n OS_TYPE: 'os.type',\n /**\n * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\n */\n OS_DESCRIPTION: 'os.description',\n /**\n * Human readable operating system name.\n */\n OS_NAME: 'os.name',\n /**\n * The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes).\n */\n OS_VERSION: 'os.version',\n /**\n * Process identifier (PID).\n */\n PROCESS_PID: 'process.pid',\n /**\n * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_NAME: 'process.executable.name',\n /**\n * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_PATH: 'process.executable.path',\n /**\n * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\n */\n PROCESS_COMMAND: 'process.command',\n /**\n * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead.\n */\n PROCESS_COMMAND_LINE: 'process.command_line',\n /**\n * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.\n */\n PROCESS_COMMAND_ARGS: 'process.command_args',\n /**\n * The username of the user that owns the process.\n */\n PROCESS_OWNER: 'process.owner',\n /**\n * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.\n */\n PROCESS_RUNTIME_NAME: 'process.runtime.name',\n /**\n * The version of the runtime of this process, as returned by the runtime without modification.\n */\n PROCESS_RUNTIME_VERSION: 'process.runtime.version',\n /**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n */\n PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description',\n /**\n * Logical name of the service.\n *\n * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\n */\n SERVICE_NAME: 'service.name',\n /**\n * A namespace for `service.name`.\n *\n * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\n */\n SERVICE_NAMESPACE: 'service.namespace',\n /**\n * The string ID of the service instance.\n *\n * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).\n */\n SERVICE_INSTANCE_ID: 'service.instance.id',\n /**\n * The version string of the service API or implementation.\n */\n SERVICE_VERSION: 'service.version',\n /**\n * The name of the telemetry SDK as defined above.\n */\n TELEMETRY_SDK_NAME: 'telemetry.sdk.name',\n /**\n * The language of the telemetry SDK.\n */\n TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language',\n /**\n * The version string of the telemetry SDK.\n */\n TELEMETRY_SDK_VERSION: 'telemetry.sdk.version',\n /**\n * The version string of the auto instrumentation agent, if used.\n */\n TELEMETRY_AUTO_VERSION: 'telemetry.auto.version',\n /**\n * The name of the web engine.\n */\n WEBENGINE_NAME: 'webengine.name',\n /**\n * The version of the web engine.\n */\n WEBENGINE_VERSION: 'webengine.version',\n /**\n * Additional description of the web engine (e.g. detailed version and edition information).\n */\n WEBENGINE_DESCRIPTION: 'webengine.description',\n};\nexports.CloudProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.CloudPlatformValues = {\n /** Alibaba Cloud Elastic Compute Service. */\n ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs',\n /** Alibaba Cloud Function Compute. */\n ALIBABA_CLOUD_FC: 'alibaba_cloud_fc',\n /** AWS Elastic Compute Cloud. */\n AWS_EC2: 'aws_ec2',\n /** AWS Elastic Container Service. */\n AWS_ECS: 'aws_ecs',\n /** AWS Elastic Kubernetes Service. */\n AWS_EKS: 'aws_eks',\n /** AWS Lambda. */\n AWS_LAMBDA: 'aws_lambda',\n /** AWS Elastic Beanstalk. */\n AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk',\n /** Azure Virtual Machines. */\n AZURE_VM: 'azure_vm',\n /** Azure Container Instances. */\n AZURE_CONTAINER_INSTANCES: 'azure_container_instances',\n /** Azure Kubernetes Service. */\n AZURE_AKS: 'azure_aks',\n /** Azure Functions. */\n AZURE_FUNCTIONS: 'azure_functions',\n /** Azure App Service. */\n AZURE_APP_SERVICE: 'azure_app_service',\n /** Google Cloud Compute Engine (GCE). */\n GCP_COMPUTE_ENGINE: 'gcp_compute_engine',\n /** Google Cloud Run. */\n GCP_CLOUD_RUN: 'gcp_cloud_run',\n /** Google Cloud Kubernetes Engine (GKE). */\n GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine',\n /** Google Cloud Functions (GCF). */\n GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions',\n /** Google Cloud App Engine (GAE). */\n GCP_APP_ENGINE: 'gcp_app_engine',\n};\nexports.AwsEcsLaunchtypeValues = {\n /** ec2. */\n EC2: 'ec2',\n /** fargate. */\n FARGATE: 'fargate',\n};\nexports.HostArchValues = {\n /** AMD64. */\n AMD64: 'amd64',\n /** ARM32. */\n ARM32: 'arm32',\n /** ARM64. */\n ARM64: 'arm64',\n /** Itanium. */\n IA64: 'ia64',\n /** 32-bit PowerPC. */\n PPC32: 'ppc32',\n /** 64-bit PowerPC. */\n PPC64: 'ppc64',\n /** 32-bit x86. */\n X86: 'x86',\n};\nexports.OsTypeValues = {\n /** Microsoft Windows. */\n WINDOWS: 'windows',\n /** Linux. */\n LINUX: 'linux',\n /** Apple Darwin. */\n DARWIN: 'darwin',\n /** FreeBSD. */\n FREEBSD: 'freebsd',\n /** NetBSD. */\n NETBSD: 'netbsd',\n /** OpenBSD. */\n OPENBSD: 'openbsd',\n /** DragonFly BSD. */\n DRAGONFLYBSD: 'dragonflybsd',\n /** HP-UX (Hewlett Packard Unix). */\n HPUX: 'hpux',\n /** AIX (Advanced Interactive eXecutive). */\n AIX: 'aix',\n /** Oracle Solaris. */\n SOLARIS: 'solaris',\n /** IBM z/OS. */\n Z_OS: 'z_os',\n};\nexports.TelemetrySdkLanguageValues = {\n /** cpp. */\n CPP: 'cpp',\n /** dotnet. */\n DOTNET: 'dotnet',\n /** erlang. */\n ERLANG: 'erlang',\n /** go. */\n GO: 'go',\n /** java. */\n JAVA: 'java',\n /** nodejs. */\n NODEJS: 'nodejs',\n /** php. */\n PHP: 'php',\n /** python. */\n PYTHON: 'python',\n /** ruby. */\n RUBY: 'ruby',\n /** webjs. */\n WEBJS: 'webjs',\n};\n//# sourceMappingURL=SemanticResourceAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticResourceAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticAttributes = {\n /**\n * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).\n *\n * Note: This may be different from `faas.id` if an alias is involved.\n */\n AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn',\n /**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\n DB_SYSTEM: 'db.system',\n /**\n * The connection string used to connect to the database. It is recommended to remove embedded credentials.\n */\n DB_CONNECTION_STRING: 'db.connection_string',\n /**\n * Username for accessing the database.\n */\n DB_USER: 'db.user',\n /**\n * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n */\n DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname',\n /**\n * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n *\n * Note: In some SQL databases, the database name to be used is called "schema name".\n */\n DB_NAME: 'db.name',\n /**\n * The database statement being executed.\n *\n * Note: The value may be sanitized to exclude sensitive information.\n */\n DB_STATEMENT: 'db.statement',\n /**\n * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n *\n * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n */\n DB_OPERATION: 'db.operation',\n /**\n * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n *\n * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).\n */\n DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name',\n /**\n * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace',\n /**\n * The fetch size used for paging, i.e. how many rows will be returned at once.\n */\n DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size',\n /**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\n DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_CASSANDRA_TABLE: 'db.cassandra.table',\n /**\n * Whether or not the query is idempotent.\n */\n DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence',\n /**\n * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\n */\n DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count',\n /**\n * The ID of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id',\n /**\n * The data center of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc',\n /**\n * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_HBASE_NAMESPACE: 'db.hbase.namespace',\n /**\n * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n */\n DB_REDIS_DATABASE_INDEX: 'db.redis.database_index',\n /**\n * The collection being accessed within the database stated in `db.name`.\n */\n DB_MONGODB_COLLECTION: 'db.mongodb.collection',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_SQL_TABLE: 'db.sql.table',\n /**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n */\n EXCEPTION_TYPE: 'exception.type',\n /**\n * The exception message.\n */\n EXCEPTION_MESSAGE: 'exception.message',\n /**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n */\n EXCEPTION_STACKTRACE: 'exception.stacktrace',\n /**\n * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n *\n * Note: An exception is considered to have escaped (or left) the scope of a span,\n if that span is ended while the exception is still logically "in flight".\n This may be actually "in flight" in some languages (e.g. if the exception\n is passed to a Context manager's `__exit__` method in Python) but will\n usually be caught at the point of recording the exception in most languages.\n \n It is usually not possible to determine at the point where an exception is thrown\n whether it will escape the scope of a span.\n However, it is trivial to know that an exception\n will escape, if one checks for an active exception just before ending the span,\n as done in the [example above](#exception-end-example).\n \n It follows that an exception may still escape the scope of the span\n even if the `exception.escaped` attribute was not set or set to false,\n since the event might have been recorded at a time where it was not\n clear whether the exception will escape.\n */\n EXCEPTION_ESCAPED: 'exception.escaped',\n /**\n * Type of the trigger on which the function is executed.\n */\n FAAS_TRIGGER: 'faas.trigger',\n /**\n * The execution ID of the current function execution.\n */\n FAAS_EXECUTION: 'faas.execution',\n /**\n * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\n */\n FAAS_DOCUMENT_COLLECTION: 'faas.document.collection',\n /**\n * Describes the type of the operation that was performed on the data.\n */\n FAAS_DOCUMENT_OPERATION: 'faas.document.operation',\n /**\n * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_DOCUMENT_TIME: 'faas.document.time',\n /**\n * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\n */\n FAAS_DOCUMENT_NAME: 'faas.document.name',\n /**\n * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_TIME: 'faas.time',\n /**\n * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\n */\n FAAS_CRON: 'faas.cron',\n /**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start).\n */\n FAAS_COLDSTART: 'faas.coldstart',\n /**\n * The name of the invoked function.\n *\n * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.\n */\n FAAS_INVOKED_NAME: 'faas.invoked_name',\n /**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\n FAAS_INVOKED_PROVIDER: 'faas.invoked_provider',\n /**\n * The cloud region of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\n */\n FAAS_INVOKED_REGION: 'faas.invoked_region',\n /**\n * Transport protocol used. See note below.\n */\n NET_TRANSPORT: 'net.transport',\n /**\n * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6).\n */\n NET_PEER_IP: 'net.peer.ip',\n /**\n * Remote port number.\n */\n NET_PEER_PORT: 'net.peer.port',\n /**\n * Remote hostname or similar, see note below.\n */\n NET_PEER_NAME: 'net.peer.name',\n /**\n * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.\n */\n NET_HOST_IP: 'net.host.ip',\n /**\n * Like `net.peer.port` but for the host port.\n */\n NET_HOST_PORT: 'net.host.port',\n /**\n * Local hostname or similar, see note below.\n */\n NET_HOST_NAME: 'net.host.name',\n /**\n * The internet connection type currently being used by the host.\n */\n NET_HOST_CONNECTION_TYPE: 'net.host.connection.type',\n /**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\n NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype',\n /**\n * The name of the mobile carrier.\n */\n NET_HOST_CARRIER_NAME: 'net.host.carrier.name',\n /**\n * The mobile carrier country code.\n */\n NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc',\n /**\n * The mobile carrier network code.\n */\n NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc',\n /**\n * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\n */\n NET_HOST_CARRIER_ICC: 'net.host.carrier.icc',\n /**\n * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\n */\n PEER_SERVICE: 'peer.service',\n /**\n * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.\n */\n ENDUSER_ID: 'enduser.id',\n /**\n * Actual/assumed role the client is making the request under extracted from token or application security context.\n */\n ENDUSER_ROLE: 'enduser.role',\n /**\n * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).\n */\n ENDUSER_SCOPE: 'enduser.scope',\n /**\n * Current "managed" thread ID (as opposed to OS thread ID).\n */\n THREAD_ID: 'thread.id',\n /**\n * Current thread name.\n */\n THREAD_NAME: 'thread.name',\n /**\n * The method or function name, or equivalent (usually rightmost part of the code unit's name).\n */\n CODE_FUNCTION: 'code.function',\n /**\n * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.\n */\n CODE_NAMESPACE: 'code.namespace',\n /**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\n */\n CODE_FILEPATH: 'code.filepath',\n /**\n * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.\n */\n CODE_LINENO: 'code.lineno',\n /**\n * HTTP request method.\n */\n HTTP_METHOD: 'http.method',\n /**\n * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.\n *\n * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`.\n */\n HTTP_URL: 'http.url',\n /**\n * The full request target as passed in a HTTP request line or equivalent.\n */\n HTTP_TARGET: 'http.target',\n /**\n * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.\n *\n * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.\n */\n HTTP_HOST: 'http.host',\n /**\n * The URI scheme identifying the used protocol.\n */\n HTTP_SCHEME: 'http.scheme',\n /**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n */\n HTTP_STATUS_CODE: 'http.status_code',\n /**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\n HTTP_FLAVOR: 'http.flavor',\n /**\n * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client.\n */\n HTTP_USER_AGENT: 'http.user_agent',\n /**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length',\n /**\n * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed',\n /**\n * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length',\n /**\n * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed',\n /**\n * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).\n *\n * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available.\n */\n HTTP_SERVER_NAME: 'http.server_name',\n /**\n * The matched route (path template).\n */\n HTTP_ROUTE: 'http.route',\n /**\n * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).\n *\n * Note: This is not necessarily the same as `net.peer.ip`, which would\n identify the network-level peer, which may be a proxy.\n \n This attribute should be set when a source of information different\n from the one used for `net.peer.ip`, is available even if that other\n source just confirms the same value as `net.peer.ip`.\n Rationale: For `net.peer.ip`, one typically does not know if it\n comes from a proxy, reverse proxy, or the actual client. Setting\n `http.client_ip` when it's the same as `net.peer.ip` means that\n one is at least somewhat confident that the address is not that of\n the closest proxy.\n */\n HTTP_CLIENT_IP: 'http.client_ip',\n /**\n * The keys in the `RequestItems` object field.\n */\n AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names',\n /**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field.\n */\n AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity',\n /**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field.\n */\n AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics',\n /**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity',\n /**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity',\n /**\n * The value of the `ConsistentRead` request parameter.\n */\n AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read',\n /**\n * The value of the `ProjectionExpression` request parameter.\n */\n AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection',\n /**\n * The value of the `Limit` request parameter.\n */\n AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit',\n /**\n * The value of the `AttributesToGet` request parameter.\n */\n AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get',\n /**\n * The value of the `IndexName` request parameter.\n */\n AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name',\n /**\n * The value of the `Select` request parameter.\n */\n AWS_DYNAMODB_SELECT: 'aws.dynamodb.select',\n /**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes',\n /**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes',\n /**\n * The value of the `ExclusiveStartTableName` request parameter.\n */\n AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table',\n /**\n * The the number of items in the `TableNames` response parameter.\n */\n AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count',\n /**\n * The value of the `ScanIndexForward` request parameter.\n */\n AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward',\n /**\n * The value of the `Segment` request parameter.\n */\n AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment',\n /**\n * The value of the `TotalSegments` request parameter.\n */\n AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments',\n /**\n * The value of the `Count` response parameter.\n */\n AWS_DYNAMODB_COUNT: 'aws.dynamodb.count',\n /**\n * The value of the `ScannedCount` response parameter.\n */\n AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count',\n /**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field.\n */\n AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions',\n /**\n * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates',\n /**\n * A string identifying the messaging system.\n */\n MESSAGING_SYSTEM: 'messaging.system',\n /**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n */\n MESSAGING_DESTINATION: 'messaging.destination',\n /**\n * The kind of message destination.\n */\n MESSAGING_DESTINATION_KIND: 'messaging.destination_kind',\n /**\n * A boolean that is true if the message destination is temporary.\n */\n MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination',\n /**\n * The name of the transport protocol.\n */\n MESSAGING_PROTOCOL: 'messaging.protocol',\n /**\n * The version of the transport protocol.\n */\n MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version',\n /**\n * Connection string.\n */\n MESSAGING_URL: 'messaging.url',\n /**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n */\n MESSAGING_MESSAGE_ID: 'messaging.message_id',\n /**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".\n */\n MESSAGING_CONVERSATION_ID: 'messaging.conversation_id',\n /**\n * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.\n */\n MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes',\n /**\n * The compressed size of the message payload in bytes.\n */\n MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes',\n /**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n */\n MESSAGING_OPERATION: 'messaging.operation',\n /**\n * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.\n */\n MESSAGING_CONSUMER_ID: 'messaging.consumer_id',\n /**\n * RabbitMQ message routing key.\n */\n MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key',\n /**\n * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n *\n * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.\n */\n MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key',\n /**\n * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.\n */\n MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group',\n /**\n * Client Id for the Consumer or Producer that is handling the message.\n */\n MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id',\n /**\n * Partition the message is sent to.\n */\n MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition',\n /**\n * A boolean that is true if the message is a tombstone.\n */\n MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone',\n /**\n * A string identifying the remoting system.\n */\n RPC_SYSTEM: 'rpc.system',\n /**\n * The full (logical) name of the service being called, including its package name, if applicable.\n *\n * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\n */\n RPC_SERVICE: 'rpc.service',\n /**\n * The name of the (logical) method being called, must be equal to the $method part in the span name.\n *\n * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\n */\n RPC_METHOD: 'rpc.method',\n /**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\n RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code',\n /**\n * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.\n */\n RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version',\n /**\n * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\n */\n RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id',\n /**\n * `error.code` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code',\n /**\n * `error.message` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message',\n /**\n * Whether this is a received or sent message.\n */\n MESSAGE_TYPE: 'message.type',\n /**\n * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\n *\n * Note: This way we guarantee that the values will be consistent between different implementations.\n */\n MESSAGE_ID: 'message.id',\n /**\n * Compressed size of the message in bytes.\n */\n MESSAGE_COMPRESSED_SIZE: 'message.compressed_size',\n /**\n * Uncompressed size of the message in bytes.\n */\n MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size',\n};\nexports.DbSystemValues = {\n /** Some other SQL database. Fallback only. See notes. */\n OTHER_SQL: 'other_sql',\n /** Microsoft SQL Server. */\n MSSQL: 'mssql',\n /** MySQL. */\n MYSQL: 'mysql',\n /** Oracle Database. */\n ORACLE: 'oracle',\n /** IBM Db2. */\n DB2: 'db2',\n /** PostgreSQL. */\n POSTGRESQL: 'postgresql',\n /** Amazon Redshift. */\n REDSHIFT: 'redshift',\n /** Apache Hive. */\n HIVE: 'hive',\n /** Cloudscape. */\n CLOUDSCAPE: 'cloudscape',\n /** HyperSQL DataBase. */\n HSQLDB: 'hsqldb',\n /** Progress Database. */\n PROGRESS: 'progress',\n /** SAP MaxDB. */\n MAXDB: 'maxdb',\n /** SAP HANA. */\n HANADB: 'hanadb',\n /** Ingres. */\n INGRES: 'ingres',\n /** FirstSQL. */\n FIRSTSQL: 'firstsql',\n /** EnterpriseDB. */\n EDB: 'edb',\n /** InterSystems Caché. */\n CACHE: 'cache',\n /** Adabas (Adaptable Database System). */\n ADABAS: 'adabas',\n /** Firebird. */\n FIREBIRD: 'firebird',\n /** Apache Derby. */\n DERBY: 'derby',\n /** FileMaker. */\n FILEMAKER: 'filemaker',\n /** Informix. */\n INFORMIX: 'informix',\n /** InstantDB. */\n INSTANTDB: 'instantdb',\n /** InterBase. */\n INTERBASE: 'interbase',\n /** MariaDB. */\n MARIADB: 'mariadb',\n /** Netezza. */\n NETEZZA: 'netezza',\n /** Pervasive PSQL. */\n PERVASIVE: 'pervasive',\n /** PointBase. */\n POINTBASE: 'pointbase',\n /** SQLite. */\n SQLITE: 'sqlite',\n /** Sybase. */\n SYBASE: 'sybase',\n /** Teradata. */\n TERADATA: 'teradata',\n /** Vertica. */\n VERTICA: 'vertica',\n /** H2. */\n H2: 'h2',\n /** ColdFusion IMQ. */\n COLDFUSION: 'coldfusion',\n /** Apache Cassandra. */\n CASSANDRA: 'cassandra',\n /** Apache HBase. */\n HBASE: 'hbase',\n /** MongoDB. */\n MONGODB: 'mongodb',\n /** Redis. */\n REDIS: 'redis',\n /** Couchbase. */\n COUCHBASE: 'couchbase',\n /** CouchDB. */\n COUCHDB: 'couchdb',\n /** Microsoft Azure Cosmos DB. */\n COSMOSDB: 'cosmosdb',\n /** Amazon DynamoDB. */\n DYNAMODB: 'dynamodb',\n /** Neo4j. */\n NEO4J: 'neo4j',\n /** Apache Geode. */\n GEODE: 'geode',\n /** Elasticsearch. */\n ELASTICSEARCH: 'elasticsearch',\n /** Memcached. */\n MEMCACHED: 'memcached',\n /** CockroachDB. */\n COCKROACHDB: 'cockroachdb',\n};\nexports.DbCassandraConsistencyLevelValues = {\n /** all. */\n ALL: 'all',\n /** each_quorum. */\n EACH_QUORUM: 'each_quorum',\n /** quorum. */\n QUORUM: 'quorum',\n /** local_quorum. */\n LOCAL_QUORUM: 'local_quorum',\n /** one. */\n ONE: 'one',\n /** two. */\n TWO: 'two',\n /** three. */\n THREE: 'three',\n /** local_one. */\n LOCAL_ONE: 'local_one',\n /** any. */\n ANY: 'any',\n /** serial. */\n SERIAL: 'serial',\n /** local_serial. */\n LOCAL_SERIAL: 'local_serial',\n};\nexports.FaasTriggerValues = {\n /** A response to some data source operation such as a database or filesystem read/write. */\n DATASOURCE: 'datasource',\n /** To provide an answer to an inbound HTTP request. */\n HTTP: 'http',\n /** A function is set to be executed when messages are sent to a messaging system. */\n PUBSUB: 'pubsub',\n /** A function is scheduled to be executed regularly. */\n TIMER: 'timer',\n /** If none of the others apply. */\n OTHER: 'other',\n};\nexports.FaasDocumentOperationValues = {\n /** When a new object is created. */\n INSERT: 'insert',\n /** When an object is modified. */\n EDIT: 'edit',\n /** When an object is deleted. */\n DELETE: 'delete',\n};\nexports.FaasInvokedProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.NetTransportValues = {\n /** ip_tcp. */\n IP_TCP: 'ip_tcp',\n /** ip_udp. */\n IP_UDP: 'ip_udp',\n /** Another IP-based protocol. */\n IP: 'ip',\n /** Unix Domain socket. See below. */\n UNIX: 'unix',\n /** Named or anonymous pipe. See note below. */\n PIPE: 'pipe',\n /** In-process communication. */\n INPROC: 'inproc',\n /** Something else (non IP-based). */\n OTHER: 'other',\n};\nexports.NetHostConnectionTypeValues = {\n /** wifi. */\n WIFI: 'wifi',\n /** wired. */\n WIRED: 'wired',\n /** cell. */\n CELL: 'cell',\n /** unavailable. */\n UNAVAILABLE: 'unavailable',\n /** unknown. */\n UNKNOWN: 'unknown',\n};\nexports.NetHostConnectionSubtypeValues = {\n /** GPRS. */\n GPRS: 'gprs',\n /** EDGE. */\n EDGE: 'edge',\n /** UMTS. */\n UMTS: 'umts',\n /** CDMA. */\n CDMA: 'cdma',\n /** EVDO Rel. 0. */\n EVDO_0: 'evdo_0',\n /** EVDO Rev. A. */\n EVDO_A: 'evdo_a',\n /** CDMA2000 1XRTT. */\n CDMA2000_1XRTT: 'cdma2000_1xrtt',\n /** HSDPA. */\n HSDPA: 'hsdpa',\n /** HSUPA. */\n HSUPA: 'hsupa',\n /** HSPA. */\n HSPA: 'hspa',\n /** IDEN. */\n IDEN: 'iden',\n /** EVDO Rev. B. */\n EVDO_B: 'evdo_b',\n /** LTE. */\n LTE: 'lte',\n /** EHRPD. */\n EHRPD: 'ehrpd',\n /** HSPAP. */\n HSPAP: 'hspap',\n /** GSM. */\n GSM: 'gsm',\n /** TD-SCDMA. */\n TD_SCDMA: 'td_scdma',\n /** IWLAN. */\n IWLAN: 'iwlan',\n /** 5G NR (New Radio). */\n NR: 'nr',\n /** 5G NRNSA (New Radio Non-Standalone). */\n NRNSA: 'nrnsa',\n /** LTE CA. */\n LTE_CA: 'lte_ca',\n};\nexports.HttpFlavorValues = {\n /** HTTP 1.0. */\n HTTP_1_0: '1.0',\n /** HTTP 1.1. */\n HTTP_1_1: '1.1',\n /** HTTP 2. */\n HTTP_2_0: '2.0',\n /** SPDY protocol. */\n SPDY: 'SPDY',\n /** QUIC protocol. */\n QUIC: 'QUIC',\n};\nexports.MessagingDestinationKindValues = {\n /** A message sent to a queue. */\n QUEUE: 'queue',\n /** A message sent to a topic. */\n TOPIC: 'topic',\n};\nexports.MessagingOperationValues = {\n /** receive. */\n RECEIVE: 'receive',\n /** process. */\n PROCESS: 'process',\n};\nexports.RpcGrpcStatusCodeValues = {\n /** OK. */\n OK: 0,\n /** CANCELLED. */\n CANCELLED: 1,\n /** UNKNOWN. */\n UNKNOWN: 2,\n /** INVALID_ARGUMENT. */\n INVALID_ARGUMENT: 3,\n /** DEADLINE_EXCEEDED. */\n DEADLINE_EXCEEDED: 4,\n /** NOT_FOUND. */\n NOT_FOUND: 5,\n /** ALREADY_EXISTS. */\n ALREADY_EXISTS: 6,\n /** PERMISSION_DENIED. */\n PERMISSION_DENIED: 7,\n /** RESOURCE_EXHAUSTED. */\n RESOURCE_EXHAUSTED: 8,\n /** FAILED_PRECONDITION. */\n FAILED_PRECONDITION: 9,\n /** ABORTED. */\n ABORTED: 10,\n /** OUT_OF_RANGE. */\n OUT_OF_RANGE: 11,\n /** UNIMPLEMENTED. */\n UNIMPLEMENTED: 12,\n /** INTERNAL. */\n INTERNAL: 13,\n /** UNAVAILABLE. */\n UNAVAILABLE: 14,\n /** DATA_LOSS. */\n DATA_LOSS: 15,\n /** UNAUTHENTICATED. */\n UNAUTHENTICATED: 16,\n};\nexports.MessageTypeValues = {\n /** sent. */\n SENT: 'SENT',\n /** received. */\n RECEIVED: 'RECEIVED',\n};\n//# sourceMappingURL=SemanticAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterBase = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * Collector Exporter abstract base class\n */\nclass OTLPExporterBase {\n /**\n * @param config\n */\n constructor(config = {}) {\n this._sendingPromises = [];\n this.url = this.getDefaultUrl(config);\n if (typeof config.hostname === 'string') {\n this.hostname = config.hostname;\n }\n this.attributes = config.attributes;\n this.shutdown = this.shutdown.bind(this);\n this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);\n this._concurrencyLimit =\n typeof config.concurrencyLimit === 'number'\n ? config.concurrencyLimit\n : Infinity;\n // platform dependent\n this.onInit(config);\n }\n /**\n * Export items.\n * @param items\n * @param resultCallback\n */\n export(items, resultCallback) {\n if (this._shutdownOnce.isCalled) {\n resultCallback({\n code: core_1.ExportResultCode.FAILED,\n error: new Error('Exporter has been shutdown'),\n });\n return;\n }\n if (this._sendingPromises.length >= this._concurrencyLimit) {\n resultCallback({\n code: core_1.ExportResultCode.FAILED,\n error: new Error('Concurrent export limit reached'),\n });\n return;\n }\n this._export(items)\n .then(() => {\n resultCallback({ code: core_1.ExportResultCode.SUCCESS });\n })\n .catch((error) => {\n resultCallback({ code: core_1.ExportResultCode.FAILED, error });\n });\n }\n _export(items) {\n return new Promise((resolve, reject) => {\n try {\n api_1.diag.debug('items to be sent', items);\n this.send(items, resolve, reject);\n }\n catch (e) {\n reject(e);\n }\n });\n }\n /**\n * Shutdown the exporter.\n */\n shutdown() {\n return this._shutdownOnce.call();\n }\n /**\n * Called by _shutdownOnce with BindOnceFuture\n */\n _shutdown() {\n api_1.diag.debug('shutdown started');\n this.onShutdown();\n return Promise.all(this._sendingPromises)\n .then(() => {\n /** ignore resolved values */\n });\n }\n}\nexports.OTLPExporterBase = OTLPExporterBase;\n//# sourceMappingURL=OTLPExporterBase.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./OTLPExporterBase\"), exports);\n__exportStar(require(\"./platform\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterBrowserBase = void 0;\nconst OTLPExporterBase_1 = require(\"../../OTLPExporterBase\");\nconst util_1 = require(\"../../util\");\nconst util_2 = require(\"./util\");\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * Collector Metric Exporter abstract base class\n */\nclass OTLPExporterBrowserBase extends OTLPExporterBase_1.OTLPExporterBase {\n /**\n * @param config\n */\n constructor(config = {}) {\n super(config);\n this._useXHR = false;\n this._useXHR =\n !!config.headers || typeof navigator.sendBeacon !== 'function';\n if (this._useXHR) {\n this._headers = Object.assign({}, (0, util_1.parseHeaders)(config.headers), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS));\n }\n else {\n this._headers = {};\n }\n }\n onInit() {\n window.addEventListener('unload', this.shutdown);\n }\n onShutdown() {\n window.removeEventListener('unload', this.shutdown);\n }\n send(items, onSuccess, onError) {\n if (this._shutdownOnce.isCalled) {\n api_1.diag.debug('Shutdown already started. Cannot send objects');\n return;\n }\n const serviceRequest = this.convert(items);\n const body = JSON.stringify(serviceRequest);\n const promise = new Promise((resolve, reject) => {\n if (this._useXHR) {\n (0, util_2.sendWithXhr)(body, this.url, this._headers, resolve, reject);\n }\n else {\n (0, util_2.sendWithBeacon)(body, this.url, { type: 'application/json' }, resolve, reject);\n }\n })\n .then(onSuccess, onError);\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n}\nexports.OTLPExporterBrowserBase = OTLPExporterBrowserBase;\n//# sourceMappingURL=OTLPExporterBrowserBase.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./OTLPExporterBrowserBase\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendWithXhr = exports.sendWithBeacon = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst api_1 = require(\"@opentelemetry/api\");\nconst types_1 = require(\"../../types\");\n/**\n * Send metrics/spans using browser navigator.sendBeacon\n * @param body\n * @param url\n * @param blobPropertyBag\n * @param onSuccess\n * @param onError\n */\nfunction sendWithBeacon(body, url, blobPropertyBag, onSuccess, onError) {\n if (navigator.sendBeacon(url, new Blob([body], blobPropertyBag))) {\n api_1.diag.debug('sendBeacon - can send', body);\n onSuccess();\n }\n else {\n const error = new types_1.OTLPExporterError(`sendBeacon - cannot send ${body}`);\n onError(error);\n }\n}\nexports.sendWithBeacon = sendWithBeacon;\n/**\n * function to send metrics/spans using browser XMLHttpRequest\n * used when navigator.sendBeacon is not available\n * @param body\n * @param url\n * @param headers\n * @param onSuccess\n * @param onError\n */\nfunction sendWithXhr(body, url, headers, onSuccess, onError) {\n const xhr = new XMLHttpRequest();\n xhr.open('POST', url);\n const defaultHeaders = {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n };\n Object.entries(Object.assign(Object.assign({}, defaultHeaders), headers)).forEach(([k, v]) => {\n xhr.setRequestHeader(k, v);\n });\n xhr.send(body);\n xhr.onreadystatechange = () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n if (xhr.status >= 200 && xhr.status <= 299) {\n api_1.diag.debug('xhr success', body);\n onSuccess();\n }\n else {\n const error = new types_1.OTLPExporterError(`Failed to export with XHR (status: ${xhr.status})`, xhr.status);\n onError(error);\n }\n }\n };\n}\nexports.sendWithXhr = sendWithXhr;\n//# sourceMappingURL=util.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterBrowserBase = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./node\"), exports);\nvar browser_1 = require(\"./browser\");\nObject.defineProperty(exports, \"OTLPExporterBrowserBase\", { enumerable: true, get: function () { return browser_1.OTLPExporterBrowserBase; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterNodeBase = void 0;\nconst OTLPExporterBase_1 = require(\"../../OTLPExporterBase\");\nconst util_1 = require(\"../../util\");\nconst util_2 = require(\"./util\");\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * Collector Metric Exporter abstract base class\n */\nclass OTLPExporterNodeBase extends OTLPExporterBase_1.OTLPExporterBase {\n constructor(config = {}) {\n super(config);\n this.DEFAULT_HEADERS = {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (config.metadata) {\n api_1.diag.warn('Metadata cannot be set when using http');\n }\n this.headers = Object.assign(this.DEFAULT_HEADERS, (0, util_1.parseHeaders)(config.headers), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS));\n this.agent = (0, util_2.createHttpAgent)(config);\n this.compression = (0, util_2.configureCompression)(config.compression);\n }\n onInit(_config) { }\n send(objects, onSuccess, onError) {\n if (this._shutdownOnce.isCalled) {\n api_1.diag.debug('Shutdown already started. Cannot send objects');\n return;\n }\n const serviceRequest = this.convert(objects);\n const promise = new Promise((resolve, reject) => {\n (0, util_2.sendWithHttp)(this, JSON.stringify(serviceRequest), 'application/json', resolve, reject);\n })\n .then(onSuccess, onError);\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n // TODO: end gzip stream from util.ts if not undefined\n // It should perhaps be a class member here instead of a variable in util.ts\n onShutdown() { }\n}\nexports.OTLPExporterNodeBase = OTLPExporterNodeBase;\n//# sourceMappingURL=OTLPExporterNodeBase.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./OTLPExporterNodeBase\"), exports);\n__exportStar(require(\"./util\"), exports);\n__exportStar(require(\"./types\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompressionAlgorithm = void 0;\nvar CompressionAlgorithm;\n(function (CompressionAlgorithm) {\n CompressionAlgorithm[\"NONE\"] = \"none\";\n CompressionAlgorithm[\"GZIP\"] = \"gzip\";\n})(CompressionAlgorithm = exports.CompressionAlgorithm || (exports.CompressionAlgorithm = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.configureCompression = exports.createHttpAgent = exports.sendWithHttp = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst url = require(\"url\");\nconst http = require(\"http\");\nconst https = require(\"https\");\nconst zlib = require(\"zlib\");\nconst stream_1 = require(\"stream\");\nconst api_1 = require(\"@opentelemetry/api\");\nconst types_1 = require(\"./types\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst types_2 = require(\"../../types\");\nlet gzip;\n/**\n * Sends data using http\n * @param collector\n * @param data\n * @param contentType\n * @param onSuccess\n * @param onError\n */\nfunction sendWithHttp(collector, data, contentType, onSuccess, onError) {\n const parsedUrl = new url.URL(collector.url);\n const options = {\n hostname: parsedUrl.hostname,\n port: parsedUrl.port,\n path: parsedUrl.pathname,\n method: 'POST',\n headers: Object.assign({ 'Content-Type': contentType }, collector.headers),\n agent: collector.agent,\n };\n const request = parsedUrl.protocol === 'http:' ? http.request : https.request;\n const req = request(options, (res) => {\n let responseData = '';\n res.on('data', chunk => (responseData += chunk));\n res.on('end', () => {\n if (res.statusCode && res.statusCode < 299) {\n api_1.diag.debug(`statusCode: ${res.statusCode}`, responseData);\n onSuccess();\n }\n else {\n const error = new types_2.OTLPExporterError(res.statusMessage, res.statusCode, responseData);\n onError(error);\n }\n });\n });\n req.on('error', (error) => {\n onError(error);\n });\n switch (collector.compression) {\n case types_1.CompressionAlgorithm.GZIP: {\n if (!gzip) {\n gzip = zlib.createGzip();\n }\n req.setHeader('Content-Encoding', 'gzip');\n const dataStream = readableFromBuffer(data);\n dataStream.on('error', onError)\n .pipe(gzip).on('error', onError)\n .pipe(req);\n break;\n }\n default:\n req.end(data);\n break;\n }\n}\nexports.sendWithHttp = sendWithHttp;\nfunction readableFromBuffer(buff) {\n const readable = new stream_1.Readable();\n readable.push(buff);\n readable.push(null);\n return readable;\n}\nfunction createHttpAgent(config) {\n if (config.httpAgentOptions && config.keepAlive === false) {\n api_1.diag.warn('httpAgentOptions is used only when keepAlive is true');\n return undefined;\n }\n if (config.keepAlive === false || !config.url)\n return undefined;\n try {\n const parsedUrl = new url.URL(config.url);\n const Agent = parsedUrl.protocol === 'http:' ? http.Agent : https.Agent;\n return new Agent(Object.assign({ keepAlive: true }, config.httpAgentOptions));\n }\n catch (err) {\n api_1.diag.error(`collector exporter failed to create http agent. err: ${err.message}`);\n return undefined;\n }\n}\nexports.createHttpAgent = createHttpAgent;\nfunction configureCompression(compression) {\n if (compression) {\n return compression;\n }\n else {\n const definedCompression = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION || (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION;\n return definedCompression === types_1.CompressionAlgorithm.GZIP ? types_1.CompressionAlgorithm.GZIP : types_1.CompressionAlgorithm.NONE;\n }\n}\nexports.configureCompression = configureCompression;\n//# sourceMappingURL=util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterError = void 0;\n/**\n * Interface for handling error\n */\nclass OTLPExporterError extends Error {\n constructor(message, code, data) {\n super(message);\n this.name = 'OTLPExporterError';\n this.data = data;\n this.code = code;\n }\n}\nexports.OTLPExporterError = OTLPExporterError;\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.appendResourcePathToUrlIfNotPresent = exports.parseHeaders = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * Parses headers from config leaving only those that have defined values\n * @param partialHeaders\n */\nfunction parseHeaders(partialHeaders = {}) {\n const headers = {};\n Object.entries(partialHeaders).forEach(([key, value]) => {\n if (typeof value !== 'undefined') {\n headers[key] = String(value);\n }\n else {\n api_1.diag.warn(`Header \"${key}\" has wrong value and will be ignored`);\n }\n });\n return headers;\n}\nexports.parseHeaders = parseHeaders;\nfunction appendResourcePathToUrlIfNotPresent(url, path) {\n if (url.match(/v\\d\\/(traces|metrics)$/))\n return url;\n return url + path;\n}\nexports.appendResourcePathToUrlIfNotPresent = appendResourcePathToUrlIfNotPresent;\n//# sourceMappingURL=util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExportResultCode = void 0;\nvar ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0;\nexports.BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexports.BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexports.BAGGAGE_ITEMS_SEPARATOR = ',';\n// Name of the http header used to propagate the baggage\nexports.BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CBaggagePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"../../trace/suppress-tracing\");\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\n/**\n * Propagates {@link Baggage} through Context format propagation.\n *\n * Based on the Baggage specification:\n * https://w3c.github.io/baggage/\n */\nclass W3CBaggagePropagator {\n inject(context, carrier, setter) {\n const baggage = api_1.propagation.getBaggage(context);\n if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))\n return;\n const keyPairs = (0, utils_1.getKeyPairs)(baggage)\n .filter((pair) => {\n return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;\n })\n .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS);\n const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs);\n if (headerValue.length > 0) {\n setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);\n }\n }\n extract(context, carrier, getter) {\n const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);\n const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue;\n if (!baggageString)\n return context;\n const baggage = {};\n if (baggageString.length === 0) {\n return context;\n }\n const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);\n pairs.forEach(entry => {\n const keyPair = (0, utils_1.parsePairKeyValue)(entry);\n if (keyPair) {\n const baggageEntry = { value: keyPair.value };\n if (keyPair.metadata) {\n baggageEntry.metadata = keyPair.metadata;\n }\n baggage[keyPair.key] = baggageEntry;\n }\n });\n if (Object.entries(baggage).length === 0) {\n return context;\n }\n return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));\n }\n fields() {\n return [constants_1.BAGGAGE_HEADER];\n }\n}\nexports.W3CBaggagePropagator = W3CBaggagePropagator;\n//# sourceMappingURL=W3CBaggagePropagator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst api_1 = require(\"@opentelemetry/api\");\nconst constants_1 = require(\"./constants\");\nfunction serializeKeyPairs(keyPairs) {\n return keyPairs.reduce((hValue, current) => {\n const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`;\n return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n }, '');\n}\nexports.serializeKeyPairs = serializeKeyPairs;\nfunction getKeyPairs(baggage) {\n return baggage.getAllEntries().map(([key, value]) => {\n let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;\n // include opaque metadata if provided\n // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation\n if (value.metadata !== undefined) {\n entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();\n }\n return entry;\n });\n}\nexports.getKeyPairs = getKeyPairs;\nfunction parsePairKeyValue(entry) {\n const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR);\n if (valueProps.length <= 0)\n return;\n const keyPairPart = valueProps.shift();\n if (!keyPairPart)\n return;\n const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR);\n if (keyPair.length !== 2)\n return;\n const key = decodeURIComponent(keyPair[0].trim());\n const value = decodeURIComponent(keyPair[1].trim());\n let metadata;\n if (valueProps.length > 0) {\n metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR));\n }\n return { key, value, metadata };\n}\nexports.parsePairKeyValue = parsePairKeyValue;\n/**\n * Parse a string serialized in the baggage HTTP Format (without metadata):\n * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md\n */\nfunction parseKeyPairsIntoRecord(value) {\n if (typeof value !== 'string' || value.length === 0)\n return {};\n return value\n .split(constants_1.BAGGAGE_ITEMS_SEPARATOR)\n .map(entry => {\n return parsePairKeyValue(entry);\n })\n .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0)\n .reduce((headers, keyPair) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n headers[keyPair.key] = keyPair.value;\n return headers;\n }, {});\n}\nexports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nfunction sanitizeAttributes(attributes) {\n const out = {};\n if (typeof attributes !== 'object' || attributes == null) {\n return out;\n }\n for (const [key, val] of Object.entries(attributes)) {\n if (!isAttributeKey(key)) {\n api_1.diag.warn(`Invalid attribute key: ${key}`);\n continue;\n }\n if (!isAttributeValue(val)) {\n api_1.diag.warn(`Invalid attribute value set for key: ${key}`);\n continue;\n }\n if (Array.isArray(val)) {\n out[key] = val.slice();\n }\n else {\n out[key] = val;\n }\n }\n return out;\n}\nexports.sanitizeAttributes = sanitizeAttributes;\nfunction isAttributeKey(key) {\n return typeof key === 'string' && key.length > 0;\n}\nexports.isAttributeKey = isAttributeKey;\nfunction isAttributeValue(val) {\n if (val == null) {\n return true;\n }\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n return isValidPrimitiveAttributeValue(val);\n}\nexports.isAttributeValue = isAttributeValue;\nfunction isHomogeneousAttributeValueArray(arr) {\n let type;\n for (const element of arr) {\n // null/undefined elements are allowed\n if (element == null)\n continue;\n if (!type) {\n if (isValidPrimitiveAttributeValue(element)) {\n type = typeof element;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n if (typeof element === type) {\n continue;\n }\n return false;\n }\n return true;\n}\nfunction isValidPrimitiveAttributeValue(val) {\n switch (typeof val) {\n case 'number':\n case 'boolean':\n case 'string':\n return true;\n }\n return false;\n}\n//# sourceMappingURL=attributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.globalErrorHandler = exports.setGlobalErrorHandler = void 0;\nconst logging_error_handler_1 = require(\"./logging-error-handler\");\n/** The global error handler delegate */\nlet delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nfunction setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\nexports.setGlobalErrorHandler = setGlobalErrorHandler;\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nfunction globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch (_a) { } // eslint-disable-line no-empty\n}\nexports.globalErrorHandler = globalErrorHandler;\n//# sourceMappingURL=global-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loggingErrorHandler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * Returns a function that logs an error using the provided logger, or a\n * console logger if one was not provided.\n */\nfunction loggingErrorHandler() {\n return (ex) => {\n api_1.diag.error(stringifyException(ex));\n };\n}\nexports.loggingErrorHandler = loggingErrorHandler;\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\n }\n}\n/**\n * Flattens an exception into key-value pairs by traversing the prototype chain\n * and coercing values to strings. Duplicate properties will not be overwritten;\n * the first insert wins.\n */\nfunction flattenException(ex) {\n const result = {};\n let current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(propertyName => {\n if (result[propertyName])\n return;\n const value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0;\nconst platform_1 = require(\"../platform\");\nconst NANOSECOND_DIGITS = 9;\nconst SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number to HrTime, HrTime = [number, number].\n * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970.\n * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds.\n * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150.\n * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds:\n * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210.\n * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:\n * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000.\n * This is represented in HrTime format as [1609504210, 150000000].\n * @param epochMillis\n */\nfunction numberToHrtime(epochMillis) {\n const epochSeconds = epochMillis / 1000;\n // Decimals only.\n const seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) *\n SECOND_TO_NANOSECONDS;\n return [seconds, nanos];\n}\nfunction getTimeOrigin() {\n let timeOrigin = platform_1.otperformance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n const perf = platform_1.otperformance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nfunction hrTime(performanceNow) {\n const timeOrigin = numberToHrtime(getTimeOrigin());\n const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now());\n let seconds = timeOrigin[0] + now[0];\n let nanos = timeOrigin[1] + now[1];\n // Nanoseconds\n if (nanos > SECOND_TO_NANOSECONDS) {\n nanos -= SECOND_TO_NANOSECONDS;\n seconds += 1;\n }\n return [seconds, nanos];\n}\nexports.hrTime = hrTime;\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nfunction timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\n else if (typeof time === 'number') {\n // Must be a performance.now() if it's smaller than process start time.\n if (time < getTimeOrigin()) {\n return hrTime(time);\n }\n else {\n // epoch milliseconds or performance.timeOrigin\n return numberToHrtime(time);\n }\n }\n else if (time instanceof Date) {\n return numberToHrtime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\nexports.timeInputToHrTime = timeInputToHrTime;\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nfunction hrTimeDuration(startTime, endTime) {\n let seconds = endTime[0] - startTime[0];\n let nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\nexports.hrTimeDuration = hrTimeDuration;\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nfunction hrTimeToTimeStamp(time) {\n const precision = NANOSECOND_DIGITS;\n const tmp = `${'0'.repeat(precision)}${time[1]}Z`;\n const nanoString = tmp.substr(tmp.length - precision - 1);\n const date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\nexports.hrTimeToTimeStamp = hrTimeToTimeStamp;\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nfunction hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\nexports.hrTimeToNanoseconds = hrTimeToNanoseconds;\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nfunction hrTimeToMilliseconds(time) {\n return Math.round(time[0] * 1e3 + time[1] / 1e6);\n}\nexports.hrTimeToMilliseconds = hrTimeToMilliseconds;\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nfunction hrTimeToMicroseconds(time) {\n return Math.round(time[0] * 1e6 + time[1] / 1e3);\n}\nexports.hrTimeToMicroseconds = hrTimeToMicroseconds;\n/**\n * check if time is HrTime\n * @param value\n */\nfunction isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\nexports.isTimeInputHrTime = isTimeInputHrTime;\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nfunction isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\nexports.isTimeInput = isTimeInput;\n//# sourceMappingURL=time.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageUtils = void 0;\n__exportStar(require(\"./baggage/propagation/W3CBaggagePropagator\"), exports);\n__exportStar(require(\"./common/attributes\"), exports);\n__exportStar(require(\"./common/global-error-handler\"), exports);\n__exportStar(require(\"./common/logging-error-handler\"), exports);\n__exportStar(require(\"./common/time\"), exports);\n__exportStar(require(\"./common/types\"), exports);\n__exportStar(require(\"./ExportResult\"), exports);\n__exportStar(require(\"./version\"), exports);\nexports.baggageUtils = require(\"./baggage/utils\");\n__exportStar(require(\"./platform\"), exports);\n__exportStar(require(\"./propagation/composite\"), exports);\n__exportStar(require(\"./trace/W3CTraceContextPropagator\"), exports);\n__exportStar(require(\"./trace/IdGenerator\"), exports);\n__exportStar(require(\"./trace/rpc-metadata\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOffSampler\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOnSampler\"), exports);\n__exportStar(require(\"./trace/sampler/ParentBasedSampler\"), exports);\n__exportStar(require(\"./trace/sampler/TraceIdRatioBasedSampler\"), exports);\n__exportStar(require(\"./trace/suppress-tracing\"), exports);\n__exportStar(require(\"./trace/TraceState\"), exports);\n__exportStar(require(\"./utils/environment\"), exports);\n__exportStar(require(\"./utils/merge\"), exports);\n__exportStar(require(\"./utils/sampling\"), exports);\n__exportStar(require(\"./utils/url\"), exports);\n__exportStar(require(\"./utils/wrap\"), exports);\n__exportStar(require(\"./utils/callback\"), exports);\n__exportStar(require(\"./version\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=validators.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomIdGenerator = void 0;\nconst SPAN_ID_BYTES = 8;\nconst TRACE_ID_BYTES = 16;\nclass RandomIdGenerator {\n constructor() {\n /**\n * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex\n * characters corresponding to 128 bits.\n */\n this.generateTraceId = getIdGenerator(TRACE_ID_BYTES);\n /**\n * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex\n * characters corresponding to 64 bits.\n */\n this.generateSpanId = getIdGenerator(SPAN_ID_BYTES);\n }\n}\nexports.RandomIdGenerator = RandomIdGenerator;\nconst SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES);\nfunction getIdGenerator(bytes) {\n return function generateId() {\n for (let i = 0; i < bytes / 4; i++) {\n // unsigned right shift drops decimal part of the number\n // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE\n SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4);\n }\n // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated\n for (let i = 0; i < bytes; i++) {\n if (SHARED_BUFFER[i] > 0) {\n break;\n }\n else if (i === bytes - 1) {\n SHARED_BUFFER[bytes - 1] = 1;\n }\n }\n return SHARED_BUFFER.toString('hex', 0, bytes);\n };\n}\n//# sourceMappingURL=RandomIdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEnv = void 0;\nconst os = require(\"os\");\nconst environment_1 = require(\"../../utils/environment\");\n/**\n * Gets the environment variables\n */\nfunction getEnv() {\n const processEnv = (0, environment_1.parseEnvironment)(process.env);\n return Object.assign({\n HOSTNAME: os.hostname(),\n }, environment_1.DEFAULT_ENVIRONMENT, processEnv);\n}\nexports.getEnv = getEnv;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hexToBase64 = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction hexToBase64(hexStr) {\n const hexStrLen = hexStr.length;\n let hexAsciiCharsStr = '';\n for (let i = 0; i < hexStrLen; i += 2) {\n const hexPair = hexStr.substring(i, i + 2);\n const hexVal = parseInt(hexPair, 16);\n hexAsciiCharsStr += String.fromCharCode(hexVal);\n }\n return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64');\n}\nexports.hexToBase64 = hexToBase64;\n//# sourceMappingURL=hex-to-base64.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./environment\"), exports);\n__exportStar(require(\"./globalThis\"), exports);\n__exportStar(require(\"./hex-to-base64\"), exports);\n__exportStar(require(\"./RandomIdGenerator\"), exports);\n__exportStar(require(\"./performance\"), exports);\n__exportStar(require(\"./sdk-info\"), exports);\n__exportStar(require(\"./timer-util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.otperformance = void 0;\nconst perf_hooks_1 = require(\"perf_hooks\");\nexports.otperformance = perf_hooks_1.performance;\n//# sourceMappingURL=performance.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SDK_INFO = void 0;\nconst version_1 = require(\"../../version\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\n/** Constants describing the SDK in use */\nexports.SDK_INFO = {\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node',\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS,\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION,\n};\n//# sourceMappingURL=sdk-info.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unrefTimer = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction unrefTimer(timer) {\n timer.unref();\n}\nexports.unrefTimer = unrefTimer;\n//# sourceMappingURL=timer-util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompositePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Combines multiple propagators into a single propagator. */\nclass CompositePropagator {\n /**\n * Construct a composite propagator from a list of propagators.\n *\n * @param [config] Configuration object for composite propagator\n */\n constructor(config = {}) {\n var _a;\n this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : [];\n this._fields = Array.from(new Set(this._propagators\n // older propagators may not have fields function, null check to be sure\n .map(p => (typeof p.fields === 'function' ? p.fields() : []))\n .reduce((x, y) => x.concat(y), [])));\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same carrier key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to inject\n * @param carrier Carrier into which context will be injected\n */\n inject(context, carrier, setter) {\n for (const propagator of this._propagators) {\n try {\n propagator.inject(context, carrier, setter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n }\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same context key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to add values to\n * @param carrier Carrier from which to extract context\n */\n extract(context, carrier, getter) {\n return this._propagators.reduce((ctx, propagator) => {\n try {\n return propagator.extract(ctx, carrier, getter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n return ctx;\n }, context);\n }\n fields() {\n // return a new array so our fields cannot be modified\n return this._fields.slice();\n }\n}\nexports.CompositePropagator = CompositePropagator;\n//# sourceMappingURL=composite.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceState = void 0;\nconst validators_1 = require(\"../internal/validators\");\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nclass TraceState {\n constructor(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceState();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\nexports.TraceState = TraceState;\n//# sourceMappingURL=TraceState.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"./suppress-tracing\");\nconst TraceState_1 = require(\"./TraceState\");\nexports.TRACE_PARENT_HEADER = 'traceparent';\nexports.TRACE_STATE_HEADER = 'tracestate';\nconst VERSION = '00';\nconst VERSION_PART = '(?!ff)[\\\\da-f]{2}';\nconst TRACE_ID_PART = '(?![0]{32})[\\\\da-f]{32}';\nconst PARENT_ID_PART = '(?![0]{16})[\\\\da-f]{16}';\nconst FLAGS_PART = '[\\\\da-f]{2}';\nconst TRACE_PARENT_REGEX = new RegExp(`^\\\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\\\s?$`);\n/**\n * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}\n * @param traceParent - A meta property that comes from server.\n * It should be dynamically generated server side to have the server's request trace Id,\n * a parent span Id that was set on the server's request span,\n * and the trace flags to indicate the server's sampling decision\n * (01 = sampled, 00 = not sampled).\n * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'\n * For more information see {@link https://www.w3.org/TR/trace-context/}\n */\nfunction parseTraceParent(traceParent) {\n const match = TRACE_PARENT_REGEX.exec(traceParent);\n if (!match)\n return null;\n // According to the specification the implementation should be compatible\n // with future versions. If there are more parts, we only reject it if it's using version 00\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n if (match[1] === '00' && match[5])\n return null;\n return {\n traceId: match[2],\n spanId: match[3],\n traceFlags: parseInt(match[4], 16),\n };\n}\nexports.parseTraceParent = parseTraceParent;\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n *\n * Based on the Trace Context specification:\n * https://www.w3.org/TR/trace-context/\n */\nclass W3CTraceContextPropagator {\n inject(context, carrier, setter) {\n const spanContext = api_1.trace.getSpanContext(context);\n if (!spanContext ||\n (0, suppress_tracing_1.isTracingSuppressed)(context) ||\n !(0, api_1.isSpanContextValid)(spanContext))\n return;\n const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;\n setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent);\n if (spanContext.traceState) {\n setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize());\n }\n }\n extract(context, carrier, getter) {\n const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER);\n if (!traceParentHeader)\n return context;\n const traceParent = Array.isArray(traceParentHeader)\n ? traceParentHeader[0]\n : traceParentHeader;\n if (typeof traceParent !== 'string')\n return context;\n const spanContext = parseTraceParent(traceParent);\n if (!spanContext)\n return context;\n spanContext.isRemote = true;\n const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER);\n if (traceStateHeader) {\n // If more than one `tracestate` header is found, we merge them into a\n // single header.\n const state = Array.isArray(traceStateHeader)\n ? traceStateHeader.join(',')\n : traceStateHeader;\n spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined);\n }\n return api_1.trace.setSpanContext(context, spanContext);\n }\n fields() {\n return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER];\n }\n}\nexports.W3CTraceContextPropagator = W3CTraceContextPropagator;\n//# sourceMappingURL=W3CTraceContextPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA');\nvar RPCType;\n(function (RPCType) {\n RPCType[\"HTTP\"] = \"http\";\n})(RPCType = exports.RPCType || (exports.RPCType = {}));\nfunction setRPCMetadata(context, meta) {\n return context.setValue(RPC_METADATA_KEY, meta);\n}\nexports.setRPCMetadata = setRPCMetadata;\nfunction deleteRPCMetadata(context) {\n return context.deleteValue(RPC_METADATA_KEY);\n}\nexports.deleteRPCMetadata = deleteRPCMetadata;\nfunction getRPCMetadata(context) {\n return context.getValue(RPC_METADATA_KEY);\n}\nexports.getRPCMetadata = getRPCMetadata;\n//# sourceMappingURL=rpc-metadata.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOffSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples no traces. */\nclass AlwaysOffSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return 'AlwaysOffSampler';\n }\n}\nexports.AlwaysOffSampler = AlwaysOffSampler;\n//# sourceMappingURL=AlwaysOffSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOnSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples all traces. */\nclass AlwaysOnSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.RECORD_AND_SAMPLED,\n };\n }\n toString() {\n return 'AlwaysOnSampler';\n }\n}\nexports.AlwaysOnSampler = AlwaysOnSampler;\n//# sourceMappingURL=AlwaysOnSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParentBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst global_error_handler_1 = require(\"../../common/global-error-handler\");\nconst AlwaysOffSampler_1 = require(\"./AlwaysOffSampler\");\nconst AlwaysOnSampler_1 = require(\"./AlwaysOnSampler\");\n/**\n * A composite sampler that either respects the parent span's sampling decision\n * or delegates to `delegateSampler` for root spans.\n */\nclass ParentBasedSampler {\n constructor(config) {\n var _a, _b, _c, _d;\n this._root = config.root;\n if (!this._root) {\n (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured'));\n this._root = new AlwaysOnSampler_1.AlwaysOnSampler();\n }\n this._remoteParentSampled =\n (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._remoteParentNotSampled =\n (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler();\n this._localParentSampled =\n (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._localParentNotSampled =\n (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();\n }\n shouldSample(context, traceId, spanName, spanKind, attributes, links) {\n const parentContext = api_1.trace.getSpanContext(context);\n if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {\n return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.isRemote) {\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n toString() {\n return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;\n }\n}\nexports.ParentBasedSampler = ParentBasedSampler;\n//# sourceMappingURL=ParentBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceIdRatioBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples a given fraction of traces based of trace id deterministically. */\nclass TraceIdRatioBasedSampler {\n constructor(_ratio = 0) {\n this._ratio = _ratio;\n this._ratio = this._normalize(_ratio);\n this._upperBound = Math.floor(this._ratio * 0xffffffff);\n }\n shouldSample(context, traceId) {\n return {\n decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound\n ? api_1.SamplingDecision.RECORD_AND_SAMPLED\n : api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return `TraceIdRatioBased{${this._ratio}}`;\n }\n _normalize(ratio) {\n if (typeof ratio !== 'number' || isNaN(ratio))\n return 0;\n return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;\n }\n _accumulate(traceId) {\n let accumulation = 0;\n for (let i = 0; i < traceId.length / 8; i++) {\n const pos = i * 8;\n const part = parseInt(traceId.slice(pos, pos + 8), 16);\n accumulation = (accumulation ^ part) >>> 0;\n }\n return accumulation;\n }\n}\nexports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;\n//# sourceMappingURL=TraceIdRatioBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nfunction suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexports.suppressTracing = suppressTracing;\nfunction unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexports.unsuppressTracing = unsuppressTracing;\nfunction isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\nexports.isTracingSuppressed = isTracingSuppressed;\n//# sourceMappingURL=suppress-tracing.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BindOnceFuture = void 0;\nconst promise_1 = require(\"./promise\");\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nclass BindOnceFuture {\n constructor(_callback, _that) {\n this._callback = _callback;\n this._that = _that;\n this._isCalled = false;\n this._deferred = new promise_1.Deferred();\n }\n get isCalled() {\n return this._isCalled;\n }\n get promise() {\n return this._deferred.promise;\n }\n call(...args) {\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve(this._callback.call(this._that, ...args))\n .then(val => this._deferred.resolve(val), err => this._deferred.reject(err));\n }\n catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n }\n}\nexports.BindOnceFuture = BindOnceFuture;\n//# sourceMappingURL=callback.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst sampling_1 = require(\"./sampling\");\nconst DEFAULT_LIST_SEPARATOR = ',';\n/**\n * Environment interface to define all names\n */\nconst ENVIRONMENT_NUMBERS_KEYS = [\n 'OTEL_BSP_EXPORT_TIMEOUT',\n 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BSP_MAX_QUEUE_SIZE',\n 'OTEL_BSP_SCHEDULE_DELAY',\n 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_LINK_COUNT_LIMIT',\n 'OTEL_EXPORTER_JAEGER_AGENT_PORT',\n];\nfunction isEnvVarANumber(key) {\n return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1);\n}\nconst ENVIRONMENT_LISTS_KEYS = [\n 'OTEL_NO_PATCH_MODULES',\n 'OTEL_PROPAGATORS',\n];\nfunction isEnvVarAList(key) {\n return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1;\n}\nexports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\nexports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\n/**\n * Default environment variables\n */\nexports.DEFAULT_ENVIRONMENT = {\n CONTAINER_NAME: '',\n ECS_CONTAINER_METADATA_URI_V4: '',\n ECS_CONTAINER_METADATA_URI: '',\n HOSTNAME: '',\n KUBERNETES_SERVICE_HOST: '',\n NAMESPACE: '',\n OTEL_BSP_EXPORT_TIMEOUT: 30000,\n OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BSP_MAX_QUEUE_SIZE: 2048,\n OTEL_BSP_SCHEDULE_DELAY: 5000,\n OTEL_EXPORTER_JAEGER_AGENT_HOST: '',\n OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832,\n OTEL_EXPORTER_JAEGER_ENDPOINT: '',\n OTEL_EXPORTER_JAEGER_PASSWORD: '',\n OTEL_EXPORTER_JAEGER_USER: '',\n OTEL_EXPORTER_OTLP_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_HEADERS: '',\n OTEL_EXPORTER_OTLP_TRACES_HEADERS: '',\n OTEL_EXPORTER_OTLP_METRICS_HEADERS: '',\n OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans',\n OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO,\n OTEL_NO_PATCH_MODULES: [],\n OTEL_PROPAGATORS: ['tracecontext', 'baggage'],\n OTEL_RESOURCE_ATTRIBUTES: '',\n OTEL_SERVICE_NAME: '',\n OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_EVENT_COUNT_LIMIT: 128,\n OTEL_SPAN_LINK_COUNT_LIMIT: 128,\n OTEL_TRACES_EXPORTER: 'none',\n OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn,\n OTEL_TRACES_SAMPLER_ARG: '',\n OTEL_EXPORTER_OTLP_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: ''\n};\n/**\n * Parses a variable as number with number validation\n * @param name\n * @param environment\n * @param values\n * @param min\n * @param max\n */\nfunction parseNumber(name, environment, values, min = -Infinity, max = Infinity) {\n if (typeof values[name] !== 'undefined') {\n const value = Number(values[name]);\n if (!isNaN(value)) {\n if (value < min) {\n environment[name] = min;\n }\n else if (value > max) {\n environment[name] = max;\n }\n else {\n environment[name] = value;\n }\n }\n }\n}\n/**\n * Parses list-like strings from input into output.\n * @param name\n * @param environment\n * @param values\n * @param separator\n */\nfunction parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) {\n const givenValue = input[name];\n if (typeof givenValue === 'string') {\n output[name] = givenValue.split(separator).map(v => v.trim());\n }\n}\n// The support string -> DiagLogLevel mappings\nconst logLevelMap = {\n ALL: api_1.DiagLogLevel.ALL,\n VERBOSE: api_1.DiagLogLevel.VERBOSE,\n DEBUG: api_1.DiagLogLevel.DEBUG,\n INFO: api_1.DiagLogLevel.INFO,\n WARN: api_1.DiagLogLevel.WARN,\n ERROR: api_1.DiagLogLevel.ERROR,\n NONE: api_1.DiagLogLevel.NONE,\n};\n/**\n * Environmentally sets log level if valid log level string is provided\n * @param key\n * @param environment\n * @param values\n */\nfunction setLogLevelFromEnv(key, environment, values) {\n const value = values[key];\n if (typeof value === 'string') {\n const theLevel = logLevelMap[value.toUpperCase()];\n if (theLevel != null) {\n environment[key] = theLevel;\n }\n }\n}\n/**\n * Parses environment values\n * @param values\n */\nfunction parseEnvironment(values) {\n const environment = {};\n for (const env in exports.DEFAULT_ENVIRONMENT) {\n const key = env;\n switch (key) {\n case 'OTEL_LOG_LEVEL':\n setLogLevelFromEnv(key, environment, values);\n break;\n default:\n if (isEnvVarANumber(key)) {\n parseNumber(key, environment, values);\n }\n else if (isEnvVarAList(key)) {\n parseStringList(key, environment, values);\n }\n else {\n const value = values[key];\n if (typeof value !== 'undefined' && value !== null) {\n environment[key] = String(value);\n }\n }\n }\n }\n return environment;\n}\nexports.parseEnvironment = parseEnvironment;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPlainObject = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\nconst objectTag = '[object Object]';\nconst nullTag = '[object Null]';\nconst undefinedTag = '[object Undefined]';\nconst funcProto = Function.prototype;\nconst funcToString = funcProto.toString;\nconst objectCtorString = funcToString.call(Object);\nconst getPrototype = overArg(Object.getPrototypeOf, Object);\nconst objectProto = Object.prototype;\nconst hasOwnProperty = objectProto.hasOwnProperty;\nconst symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nconst nativeObjectToString = objectProto.toString;\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n return false;\n }\n const proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) === objectCtorString;\n}\nexports.isPlainObject = isPlainObject;\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];\n let unmasked = false;\n try {\n value[symToStringTag] = undefined;\n unmasked = true;\n }\n catch (e) {\n // silence\n }\n const result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n }\n else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n//# sourceMappingURL=lodash.merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.merge = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst lodash_merge_1 = require(\"./lodash.merge\");\nconst MAX_LEVEL = 20;\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nfunction merge(...args) {\n let result = args.shift();\n const objects = new WeakMap();\n while (args.length > 0) {\n result = mergeTwoObjects(result, args.shift(), 0, objects);\n }\n return result;\n}\nexports.merge = merge;\nfunction takeValue(value) {\n if (isArray(value)) {\n return value.slice();\n }\n return value;\n}\n/**\n * Merges two objects\n * @param one - first object\n * @param two - second object\n * @param level - current deep level\n * @param objects - objects holder that has been already referenced - to prevent\n * cyclic dependency\n */\nfunction mergeTwoObjects(one, two, level = 0, objects) {\n let result;\n if (level > MAX_LEVEL) {\n return undefined;\n }\n level++;\n if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n result = takeValue(two);\n }\n else if (isArray(one)) {\n result = one.slice();\n if (isArray(two)) {\n for (let i = 0, j = two.length; i < j; i++) {\n result.push(takeValue(two[i]));\n }\n }\n else if (isObject(two)) {\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n result[key] = takeValue(two[key]);\n }\n }\n }\n else if (isObject(one)) {\n if (isObject(two)) {\n if (!shouldMerge(one, two)) {\n return two;\n }\n result = Object.assign({}, one);\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n const twoValue = two[key];\n if (isPrimitive(twoValue)) {\n if (typeof twoValue === 'undefined') {\n delete result[key];\n }\n else {\n // result[key] = takeValue(twoValue);\n result[key] = twoValue;\n }\n }\n else {\n const obj1 = result[key];\n const obj2 = twoValue;\n if (wasObjectReferenced(one, key, objects) ||\n wasObjectReferenced(two, key, objects)) {\n delete result[key];\n }\n else {\n if (isObject(obj1) && isObject(obj2)) {\n const arr1 = objects.get(obj1) || [];\n const arr2 = objects.get(obj2) || [];\n arr1.push({ obj: one, key });\n arr2.push({ obj: two, key });\n objects.set(obj1, arr1);\n objects.set(obj2, arr2);\n }\n result[key] = mergeTwoObjects(result[key], twoValue, level, objects);\n }\n }\n }\n }\n else {\n result = two;\n }\n }\n return result;\n}\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(obj, key, objects) {\n const arr = objects.get(obj[key]) || [];\n for (let i = 0, j = arr.length; i < j; i++) {\n const info = arr[i];\n if (info.key === key && info.obj === obj) {\n return true;\n }\n }\n return false;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isObject(value) {\n return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object';\n}\nfunction isPrimitive(value) {\n return typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n value instanceof Date ||\n value instanceof RegExp ||\n value === null;\n}\nfunction shouldMerge(one, two) {\n if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Deferred = void 0;\nclass Deferred {\n constructor() {\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n get promise() {\n return this._promise;\n }\n resolve(val) {\n this._resolve(val);\n }\n reject(err) {\n this._reject(err);\n }\n}\nexports.Deferred = Deferred;\n//# sourceMappingURL=promise.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TracesSamplerValues = void 0;\nvar TracesSamplerValues;\n(function (TracesSamplerValues) {\n TracesSamplerValues[\"AlwaysOff\"] = \"always_off\";\n TracesSamplerValues[\"AlwaysOn\"] = \"always_on\";\n TracesSamplerValues[\"ParentBasedAlwaysOff\"] = \"parentbased_always_off\";\n TracesSamplerValues[\"ParentBasedAlwaysOn\"] = \"parentbased_always_on\";\n TracesSamplerValues[\"ParentBasedTraceIdRatio\"] = \"parentbased_traceidratio\";\n TracesSamplerValues[\"TraceIdRatio\"] = \"traceidratio\";\n})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {}));\n//# sourceMappingURL=sampling.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isUrlIgnored = exports.urlMatches = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction urlMatches(url, urlToMatch) {\n if (typeof urlToMatch === 'string') {\n return url === urlToMatch;\n }\n else {\n return !!url.match(urlToMatch);\n }\n}\nexports.urlMatches = urlMatches;\n/**\n * Check if {@param url} should be ignored when comparing against {@param ignoredUrls}\n * @param url\n * @param ignoredUrls\n */\nfunction isUrlIgnored(url, ignoredUrls) {\n if (!ignoredUrls) {\n return false;\n }\n for (const ignoreUrl of ignoredUrls) {\n if (urlMatches(url, ignoreUrl)) {\n return true;\n }\n }\n return false;\n}\nexports.isUrlIgnored = isUrlIgnored;\n//# sourceMappingURL=url.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isWrapped = void 0;\n/**\n * Checks if certain function has been already wrapped\n * @param func\n */\nfunction isWrapped(func) {\n return (typeof func === 'function' &&\n typeof func.__original === 'function' &&\n typeof func.__unwrap === 'function' &&\n func.__wrapped === true);\n}\nexports.isWrapped = isWrapped;\n//# sourceMappingURL=wrap.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.2.0';\n//# sourceMappingURL=version.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./trace\"), exports);\n__exportStar(require(\"./resource\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticResourceAttributes = {\n /**\n * Name of the cloud provider.\n */\n CLOUD_PROVIDER: 'cloud.provider',\n /**\n * The cloud account ID the resource is assigned to.\n */\n CLOUD_ACCOUNT_ID: 'cloud.account.id',\n /**\n * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations).\n */\n CLOUD_REGION: 'cloud.region',\n /**\n * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\n *\n * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud.\n */\n CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone',\n /**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\n CLOUD_PLATFORM: 'cloud.platform',\n /**\n * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).\n */\n AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn',\n /**\n * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).\n */\n AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn',\n /**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n */\n AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype',\n /**\n * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).\n */\n AWS_ECS_TASK_ARN: 'aws.ecs.task.arn',\n /**\n * The task definition family this task definition is a member of.\n */\n AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family',\n /**\n * The revision for this task definition.\n */\n AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision',\n /**\n * The ARN of an EKS cluster.\n */\n AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn',\n /**\n * The name(s) of the AWS log group(s) an application is writing to.\n *\n * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.\n */\n AWS_LOG_GROUP_NAMES: 'aws.log.group.names',\n /**\n * The Amazon Resource Name(s) (ARN) of the AWS log group(s).\n *\n * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).\n */\n AWS_LOG_GROUP_ARNS: 'aws.log.group.arns',\n /**\n * The name(s) of the AWS log stream(s) an application is writing to.\n */\n AWS_LOG_STREAM_NAMES: 'aws.log.stream.names',\n /**\n * The ARN(s) of the AWS log stream(s).\n *\n * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.\n */\n AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns',\n /**\n * Container name.\n */\n CONTAINER_NAME: 'container.name',\n /**\n * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated.\n */\n CONTAINER_ID: 'container.id',\n /**\n * The container runtime managing this container.\n */\n CONTAINER_RUNTIME: 'container.runtime',\n /**\n * Name of the image the container was built on.\n */\n CONTAINER_IMAGE_NAME: 'container.image.name',\n /**\n * Container image tag.\n */\n CONTAINER_IMAGE_TAG: 'container.image.tag',\n /**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n */\n DEPLOYMENT_ENVIRONMENT: 'deployment.environment',\n /**\n * A unique identifier representing the device.\n *\n * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.\n */\n DEVICE_ID: 'device.id',\n /**\n * The model identifier for the device.\n *\n * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.\n */\n DEVICE_MODEL_IDENTIFIER: 'device.model.identifier',\n /**\n * The marketing name for the device model.\n *\n * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.\n */\n DEVICE_MODEL_NAME: 'device.model.name',\n /**\n * The name of the single function that this runtime instance executes.\n *\n * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes).\n */\n FAAS_NAME: 'faas.name',\n /**\n * The unique ID of the single function that this runtime instance executes.\n *\n * Note: Depending on the cloud provider, use:\n \n * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\n Take care not to use the "invoked ARN" directly but replace any\n [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple\n different aliases.\n * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\n * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).\n \n On some providers, it may not be possible to determine the full ID at startup,\n which is why this field cannot be made required. For example, on AWS the account ID\n part of the ARN is not available without calling another AWS API\n which may be deemed too slow for a short-running lambda function.\n As an alternative, consider setting `faas.id` as a span attribute instead.\n */\n FAAS_ID: 'faas.id',\n /**\n * The immutable version of the function being executed.\n *\n * Note: Depending on the cloud provider and platform, use:\n \n * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\n (an integer represented as a decimal string).\n * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions)\n (i.e., the function name plus the revision suffix).\n * **Google Cloud Functions:** The value of the\n [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\n * **Azure Functions:** Not applicable. Do not set this attribute.\n */\n FAAS_VERSION: 'faas.version',\n /**\n * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\n *\n * Note: * **AWS Lambda:** Use the (full) log stream name.\n */\n FAAS_INSTANCE: 'faas.instance',\n /**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.\n */\n FAAS_MAX_MEMORY: 'faas.max_memory',\n /**\n * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.\n */\n HOST_ID: 'host.id',\n /**\n * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\n */\n HOST_NAME: 'host.name',\n /**\n * Type of host. For Cloud, this must be the machine type.\n */\n HOST_TYPE: 'host.type',\n /**\n * The CPU architecture the host system is running on.\n */\n HOST_ARCH: 'host.arch',\n /**\n * Name of the VM image or OS install the host was instantiated from.\n */\n HOST_IMAGE_NAME: 'host.image.name',\n /**\n * VM image ID. For Cloud, this value is from the provider.\n */\n HOST_IMAGE_ID: 'host.image.id',\n /**\n * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes).\n */\n HOST_IMAGE_VERSION: 'host.image.version',\n /**\n * The name of the cluster.\n */\n K8S_CLUSTER_NAME: 'k8s.cluster.name',\n /**\n * The name of the Node.\n */\n K8S_NODE_NAME: 'k8s.node.name',\n /**\n * The UID of the Node.\n */\n K8S_NODE_UID: 'k8s.node.uid',\n /**\n * The name of the namespace that the pod is running in.\n */\n K8S_NAMESPACE_NAME: 'k8s.namespace.name',\n /**\n * The UID of the Pod.\n */\n K8S_POD_UID: 'k8s.pod.uid',\n /**\n * The name of the Pod.\n */\n K8S_POD_NAME: 'k8s.pod.name',\n /**\n * The name of the Container in a Pod template.\n */\n K8S_CONTAINER_NAME: 'k8s.container.name',\n /**\n * The UID of the ReplicaSet.\n */\n K8S_REPLICASET_UID: 'k8s.replicaset.uid',\n /**\n * The name of the ReplicaSet.\n */\n K8S_REPLICASET_NAME: 'k8s.replicaset.name',\n /**\n * The UID of the Deployment.\n */\n K8S_DEPLOYMENT_UID: 'k8s.deployment.uid',\n /**\n * The name of the Deployment.\n */\n K8S_DEPLOYMENT_NAME: 'k8s.deployment.name',\n /**\n * The UID of the StatefulSet.\n */\n K8S_STATEFULSET_UID: 'k8s.statefulset.uid',\n /**\n * The name of the StatefulSet.\n */\n K8S_STATEFULSET_NAME: 'k8s.statefulset.name',\n /**\n * The UID of the DaemonSet.\n */\n K8S_DAEMONSET_UID: 'k8s.daemonset.uid',\n /**\n * The name of the DaemonSet.\n */\n K8S_DAEMONSET_NAME: 'k8s.daemonset.name',\n /**\n * The UID of the Job.\n */\n K8S_JOB_UID: 'k8s.job.uid',\n /**\n * The name of the Job.\n */\n K8S_JOB_NAME: 'k8s.job.name',\n /**\n * The UID of the CronJob.\n */\n K8S_CRONJOB_UID: 'k8s.cronjob.uid',\n /**\n * The name of the CronJob.\n */\n K8S_CRONJOB_NAME: 'k8s.cronjob.name',\n /**\n * The operating system type.\n */\n OS_TYPE: 'os.type',\n /**\n * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\n */\n OS_DESCRIPTION: 'os.description',\n /**\n * Human readable operating system name.\n */\n OS_NAME: 'os.name',\n /**\n * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes).\n */\n OS_VERSION: 'os.version',\n /**\n * Process identifier (PID).\n */\n PROCESS_PID: 'process.pid',\n /**\n * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_NAME: 'process.executable.name',\n /**\n * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_PATH: 'process.executable.path',\n /**\n * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\n */\n PROCESS_COMMAND: 'process.command',\n /**\n * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead.\n */\n PROCESS_COMMAND_LINE: 'process.command_line',\n /**\n * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.\n */\n PROCESS_COMMAND_ARGS: 'process.command_args',\n /**\n * The username of the user that owns the process.\n */\n PROCESS_OWNER: 'process.owner',\n /**\n * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.\n */\n PROCESS_RUNTIME_NAME: 'process.runtime.name',\n /**\n * The version of the runtime of this process, as returned by the runtime without modification.\n */\n PROCESS_RUNTIME_VERSION: 'process.runtime.version',\n /**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n */\n PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description',\n /**\n * Logical name of the service.\n *\n * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\n */\n SERVICE_NAME: 'service.name',\n /**\n * A namespace for `service.name`.\n *\n * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\n */\n SERVICE_NAMESPACE: 'service.namespace',\n /**\n * The string ID of the service instance.\n *\n * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).\n */\n SERVICE_INSTANCE_ID: 'service.instance.id',\n /**\n * The version string of the service API or implementation.\n */\n SERVICE_VERSION: 'service.version',\n /**\n * The name of the telemetry SDK as defined above.\n */\n TELEMETRY_SDK_NAME: 'telemetry.sdk.name',\n /**\n * The language of the telemetry SDK.\n */\n TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language',\n /**\n * The version string of the telemetry SDK.\n */\n TELEMETRY_SDK_VERSION: 'telemetry.sdk.version',\n /**\n * The version string of the auto instrumentation agent, if used.\n */\n TELEMETRY_AUTO_VERSION: 'telemetry.auto.version',\n /**\n * The name of the web engine.\n */\n WEBENGINE_NAME: 'webengine.name',\n /**\n * The version of the web engine.\n */\n WEBENGINE_VERSION: 'webengine.version',\n /**\n * Additional description of the web engine (e.g. detailed version and edition information).\n */\n WEBENGINE_DESCRIPTION: 'webengine.description',\n};\nexports.CloudProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.CloudPlatformValues = {\n /** Alibaba Cloud Elastic Compute Service. */\n ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs',\n /** Alibaba Cloud Function Compute. */\n ALIBABA_CLOUD_FC: 'alibaba_cloud_fc',\n /** AWS Elastic Compute Cloud. */\n AWS_EC2: 'aws_ec2',\n /** AWS Elastic Container Service. */\n AWS_ECS: 'aws_ecs',\n /** AWS Elastic Kubernetes Service. */\n AWS_EKS: 'aws_eks',\n /** AWS Lambda. */\n AWS_LAMBDA: 'aws_lambda',\n /** AWS Elastic Beanstalk. */\n AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk',\n /** Azure Virtual Machines. */\n AZURE_VM: 'azure_vm',\n /** Azure Container Instances. */\n AZURE_CONTAINER_INSTANCES: 'azure_container_instances',\n /** Azure Kubernetes Service. */\n AZURE_AKS: 'azure_aks',\n /** Azure Functions. */\n AZURE_FUNCTIONS: 'azure_functions',\n /** Azure App Service. */\n AZURE_APP_SERVICE: 'azure_app_service',\n /** Google Cloud Compute Engine (GCE). */\n GCP_COMPUTE_ENGINE: 'gcp_compute_engine',\n /** Google Cloud Run. */\n GCP_CLOUD_RUN: 'gcp_cloud_run',\n /** Google Cloud Kubernetes Engine (GKE). */\n GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine',\n /** Google Cloud Functions (GCF). */\n GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions',\n /** Google Cloud App Engine (GAE). */\n GCP_APP_ENGINE: 'gcp_app_engine',\n};\nexports.AwsEcsLaunchtypeValues = {\n /** ec2. */\n EC2: 'ec2',\n /** fargate. */\n FARGATE: 'fargate',\n};\nexports.HostArchValues = {\n /** AMD64. */\n AMD64: 'amd64',\n /** ARM32. */\n ARM32: 'arm32',\n /** ARM64. */\n ARM64: 'arm64',\n /** Itanium. */\n IA64: 'ia64',\n /** 32-bit PowerPC. */\n PPC32: 'ppc32',\n /** 64-bit PowerPC. */\n PPC64: 'ppc64',\n /** 32-bit x86. */\n X86: 'x86',\n};\nexports.OsTypeValues = {\n /** Microsoft Windows. */\n WINDOWS: 'windows',\n /** Linux. */\n LINUX: 'linux',\n /** Apple Darwin. */\n DARWIN: 'darwin',\n /** FreeBSD. */\n FREEBSD: 'freebsd',\n /** NetBSD. */\n NETBSD: 'netbsd',\n /** OpenBSD. */\n OPENBSD: 'openbsd',\n /** DragonFly BSD. */\n DRAGONFLYBSD: 'dragonflybsd',\n /** HP-UX (Hewlett Packard Unix). */\n HPUX: 'hpux',\n /** AIX (Advanced Interactive eXecutive). */\n AIX: 'aix',\n /** Oracle Solaris. */\n SOLARIS: 'solaris',\n /** IBM z/OS. */\n Z_OS: 'z_os',\n};\nexports.TelemetrySdkLanguageValues = {\n /** cpp. */\n CPP: 'cpp',\n /** dotnet. */\n DOTNET: 'dotnet',\n /** erlang. */\n ERLANG: 'erlang',\n /** go. */\n GO: 'go',\n /** java. */\n JAVA: 'java',\n /** nodejs. */\n NODEJS: 'nodejs',\n /** php. */\n PHP: 'php',\n /** python. */\n PYTHON: 'python',\n /** ruby. */\n RUBY: 'ruby',\n /** webjs. */\n WEBJS: 'webjs',\n};\n//# sourceMappingURL=SemanticResourceAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticResourceAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticAttributes = {\n /**\n * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).\n *\n * Note: This may be different from `faas.id` if an alias is involved.\n */\n AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn',\n /**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\n DB_SYSTEM: 'db.system',\n /**\n * The connection string used to connect to the database. It is recommended to remove embedded credentials.\n */\n DB_CONNECTION_STRING: 'db.connection_string',\n /**\n * Username for accessing the database.\n */\n DB_USER: 'db.user',\n /**\n * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n */\n DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname',\n /**\n * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n *\n * Note: In some SQL databases, the database name to be used is called "schema name".\n */\n DB_NAME: 'db.name',\n /**\n * The database statement being executed.\n *\n * Note: The value may be sanitized to exclude sensitive information.\n */\n DB_STATEMENT: 'db.statement',\n /**\n * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n *\n * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n */\n DB_OPERATION: 'db.operation',\n /**\n * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n *\n * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).\n */\n DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name',\n /**\n * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace',\n /**\n * The fetch size used for paging, i.e. how many rows will be returned at once.\n */\n DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size',\n /**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\n DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_CASSANDRA_TABLE: 'db.cassandra.table',\n /**\n * Whether or not the query is idempotent.\n */\n DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence',\n /**\n * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\n */\n DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count',\n /**\n * The ID of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id',\n /**\n * The data center of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc',\n /**\n * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_HBASE_NAMESPACE: 'db.hbase.namespace',\n /**\n * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n */\n DB_REDIS_DATABASE_INDEX: 'db.redis.database_index',\n /**\n * The collection being accessed within the database stated in `db.name`.\n */\n DB_MONGODB_COLLECTION: 'db.mongodb.collection',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_SQL_TABLE: 'db.sql.table',\n /**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n */\n EXCEPTION_TYPE: 'exception.type',\n /**\n * The exception message.\n */\n EXCEPTION_MESSAGE: 'exception.message',\n /**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n */\n EXCEPTION_STACKTRACE: 'exception.stacktrace',\n /**\n * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n *\n * Note: An exception is considered to have escaped (or left) the scope of a span,\n if that span is ended while the exception is still logically "in flight".\n This may be actually "in flight" in some languages (e.g. if the exception\n is passed to a Context manager's `__exit__` method in Python) but will\n usually be caught at the point of recording the exception in most languages.\n \n It is usually not possible to determine at the point where an exception is thrown\n whether it will escape the scope of a span.\n However, it is trivial to know that an exception\n will escape, if one checks for an active exception just before ending the span,\n as done in the [example above](#exception-end-example).\n \n It follows that an exception may still escape the scope of the span\n even if the `exception.escaped` attribute was not set or set to false,\n since the event might have been recorded at a time where it was not\n clear whether the exception will escape.\n */\n EXCEPTION_ESCAPED: 'exception.escaped',\n /**\n * Type of the trigger on which the function is executed.\n */\n FAAS_TRIGGER: 'faas.trigger',\n /**\n * The execution ID of the current function execution.\n */\n FAAS_EXECUTION: 'faas.execution',\n /**\n * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\n */\n FAAS_DOCUMENT_COLLECTION: 'faas.document.collection',\n /**\n * Describes the type of the operation that was performed on the data.\n */\n FAAS_DOCUMENT_OPERATION: 'faas.document.operation',\n /**\n * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_DOCUMENT_TIME: 'faas.document.time',\n /**\n * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\n */\n FAAS_DOCUMENT_NAME: 'faas.document.name',\n /**\n * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_TIME: 'faas.time',\n /**\n * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\n */\n FAAS_CRON: 'faas.cron',\n /**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start).\n */\n FAAS_COLDSTART: 'faas.coldstart',\n /**\n * The name of the invoked function.\n *\n * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.\n */\n FAAS_INVOKED_NAME: 'faas.invoked_name',\n /**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\n FAAS_INVOKED_PROVIDER: 'faas.invoked_provider',\n /**\n * The cloud region of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\n */\n FAAS_INVOKED_REGION: 'faas.invoked_region',\n /**\n * Transport protocol used. See note below.\n */\n NET_TRANSPORT: 'net.transport',\n /**\n * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6).\n */\n NET_PEER_IP: 'net.peer.ip',\n /**\n * Remote port number.\n */\n NET_PEER_PORT: 'net.peer.port',\n /**\n * Remote hostname or similar, see note below.\n */\n NET_PEER_NAME: 'net.peer.name',\n /**\n * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.\n */\n NET_HOST_IP: 'net.host.ip',\n /**\n * Like `net.peer.port` but for the host port.\n */\n NET_HOST_PORT: 'net.host.port',\n /**\n * Local hostname or similar, see note below.\n */\n NET_HOST_NAME: 'net.host.name',\n /**\n * The internet connection type currently being used by the host.\n */\n NET_HOST_CONNECTION_TYPE: 'net.host.connection.type',\n /**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\n NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype',\n /**\n * The name of the mobile carrier.\n */\n NET_HOST_CARRIER_NAME: 'net.host.carrier.name',\n /**\n * The mobile carrier country code.\n */\n NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc',\n /**\n * The mobile carrier network code.\n */\n NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc',\n /**\n * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\n */\n NET_HOST_CARRIER_ICC: 'net.host.carrier.icc',\n /**\n * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\n */\n PEER_SERVICE: 'peer.service',\n /**\n * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.\n */\n ENDUSER_ID: 'enduser.id',\n /**\n * Actual/assumed role the client is making the request under extracted from token or application security context.\n */\n ENDUSER_ROLE: 'enduser.role',\n /**\n * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).\n */\n ENDUSER_SCOPE: 'enduser.scope',\n /**\n * Current "managed" thread ID (as opposed to OS thread ID).\n */\n THREAD_ID: 'thread.id',\n /**\n * Current thread name.\n */\n THREAD_NAME: 'thread.name',\n /**\n * The method or function name, or equivalent (usually rightmost part of the code unit's name).\n */\n CODE_FUNCTION: 'code.function',\n /**\n * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.\n */\n CODE_NAMESPACE: 'code.namespace',\n /**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\n */\n CODE_FILEPATH: 'code.filepath',\n /**\n * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.\n */\n CODE_LINENO: 'code.lineno',\n /**\n * HTTP request method.\n */\n HTTP_METHOD: 'http.method',\n /**\n * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.\n *\n * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`.\n */\n HTTP_URL: 'http.url',\n /**\n * The full request target as passed in a HTTP request line or equivalent.\n */\n HTTP_TARGET: 'http.target',\n /**\n * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.\n *\n * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.\n */\n HTTP_HOST: 'http.host',\n /**\n * The URI scheme identifying the used protocol.\n */\n HTTP_SCHEME: 'http.scheme',\n /**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n */\n HTTP_STATUS_CODE: 'http.status_code',\n /**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\n HTTP_FLAVOR: 'http.flavor',\n /**\n * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client.\n */\n HTTP_USER_AGENT: 'http.user_agent',\n /**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length',\n /**\n * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed',\n /**\n * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length',\n /**\n * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed',\n /**\n * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).\n *\n * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available.\n */\n HTTP_SERVER_NAME: 'http.server_name',\n /**\n * The matched route (path template).\n */\n HTTP_ROUTE: 'http.route',\n /**\n * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).\n *\n * Note: This is not necessarily the same as `net.peer.ip`, which would\n identify the network-level peer, which may be a proxy.\n \n This attribute should be set when a source of information different\n from the one used for `net.peer.ip`, is available even if that other\n source just confirms the same value as `net.peer.ip`.\n Rationale: For `net.peer.ip`, one typically does not know if it\n comes from a proxy, reverse proxy, or the actual client. Setting\n `http.client_ip` when it's the same as `net.peer.ip` means that\n one is at least somewhat confident that the address is not that of\n the closest proxy.\n */\n HTTP_CLIENT_IP: 'http.client_ip',\n /**\n * The keys in the `RequestItems` object field.\n */\n AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names',\n /**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field.\n */\n AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity',\n /**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field.\n */\n AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics',\n /**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity',\n /**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity',\n /**\n * The value of the `ConsistentRead` request parameter.\n */\n AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read',\n /**\n * The value of the `ProjectionExpression` request parameter.\n */\n AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection',\n /**\n * The value of the `Limit` request parameter.\n */\n AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit',\n /**\n * The value of the `AttributesToGet` request parameter.\n */\n AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get',\n /**\n * The value of the `IndexName` request parameter.\n */\n AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name',\n /**\n * The value of the `Select` request parameter.\n */\n AWS_DYNAMODB_SELECT: 'aws.dynamodb.select',\n /**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes',\n /**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes',\n /**\n * The value of the `ExclusiveStartTableName` request parameter.\n */\n AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table',\n /**\n * The the number of items in the `TableNames` response parameter.\n */\n AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count',\n /**\n * The value of the `ScanIndexForward` request parameter.\n */\n AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward',\n /**\n * The value of the `Segment` request parameter.\n */\n AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment',\n /**\n * The value of the `TotalSegments` request parameter.\n */\n AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments',\n /**\n * The value of the `Count` response parameter.\n */\n AWS_DYNAMODB_COUNT: 'aws.dynamodb.count',\n /**\n * The value of the `ScannedCount` response parameter.\n */\n AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count',\n /**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field.\n */\n AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions',\n /**\n * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates',\n /**\n * A string identifying the messaging system.\n */\n MESSAGING_SYSTEM: 'messaging.system',\n /**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n */\n MESSAGING_DESTINATION: 'messaging.destination',\n /**\n * The kind of message destination.\n */\n MESSAGING_DESTINATION_KIND: 'messaging.destination_kind',\n /**\n * A boolean that is true if the message destination is temporary.\n */\n MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination',\n /**\n * The name of the transport protocol.\n */\n MESSAGING_PROTOCOL: 'messaging.protocol',\n /**\n * The version of the transport protocol.\n */\n MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version',\n /**\n * Connection string.\n */\n MESSAGING_URL: 'messaging.url',\n /**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n */\n MESSAGING_MESSAGE_ID: 'messaging.message_id',\n /**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".\n */\n MESSAGING_CONVERSATION_ID: 'messaging.conversation_id',\n /**\n * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.\n */\n MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes',\n /**\n * The compressed size of the message payload in bytes.\n */\n MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes',\n /**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n */\n MESSAGING_OPERATION: 'messaging.operation',\n /**\n * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.\n */\n MESSAGING_CONSUMER_ID: 'messaging.consumer_id',\n /**\n * RabbitMQ message routing key.\n */\n MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key',\n /**\n * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n *\n * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.\n */\n MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key',\n /**\n * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.\n */\n MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group',\n /**\n * Client Id for the Consumer or Producer that is handling the message.\n */\n MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id',\n /**\n * Partition the message is sent to.\n */\n MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition',\n /**\n * A boolean that is true if the message is a tombstone.\n */\n MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone',\n /**\n * A string identifying the remoting system.\n */\n RPC_SYSTEM: 'rpc.system',\n /**\n * The full (logical) name of the service being called, including its package name, if applicable.\n *\n * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\n */\n RPC_SERVICE: 'rpc.service',\n /**\n * The name of the (logical) method being called, must be equal to the $method part in the span name.\n *\n * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\n */\n RPC_METHOD: 'rpc.method',\n /**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\n RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code',\n /**\n * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.\n */\n RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version',\n /**\n * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\n */\n RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id',\n /**\n * `error.code` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code',\n /**\n * `error.message` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message',\n /**\n * Whether this is a received or sent message.\n */\n MESSAGE_TYPE: 'message.type',\n /**\n * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\n *\n * Note: This way we guarantee that the values will be consistent between different implementations.\n */\n MESSAGE_ID: 'message.id',\n /**\n * Compressed size of the message in bytes.\n */\n MESSAGE_COMPRESSED_SIZE: 'message.compressed_size',\n /**\n * Uncompressed size of the message in bytes.\n */\n MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size',\n};\nexports.DbSystemValues = {\n /** Some other SQL database. Fallback only. See notes. */\n OTHER_SQL: 'other_sql',\n /** Microsoft SQL Server. */\n MSSQL: 'mssql',\n /** MySQL. */\n MYSQL: 'mysql',\n /** Oracle Database. */\n ORACLE: 'oracle',\n /** IBM Db2. */\n DB2: 'db2',\n /** PostgreSQL. */\n POSTGRESQL: 'postgresql',\n /** Amazon Redshift. */\n REDSHIFT: 'redshift',\n /** Apache Hive. */\n HIVE: 'hive',\n /** Cloudscape. */\n CLOUDSCAPE: 'cloudscape',\n /** HyperSQL DataBase. */\n HSQLDB: 'hsqldb',\n /** Progress Database. */\n PROGRESS: 'progress',\n /** SAP MaxDB. */\n MAXDB: 'maxdb',\n /** SAP HANA. */\n HANADB: 'hanadb',\n /** Ingres. */\n INGRES: 'ingres',\n /** FirstSQL. */\n FIRSTSQL: 'firstsql',\n /** EnterpriseDB. */\n EDB: 'edb',\n /** InterSystems Caché. */\n CACHE: 'cache',\n /** Adabas (Adaptable Database System). */\n ADABAS: 'adabas',\n /** Firebird. */\n FIREBIRD: 'firebird',\n /** Apache Derby. */\n DERBY: 'derby',\n /** FileMaker. */\n FILEMAKER: 'filemaker',\n /** Informix. */\n INFORMIX: 'informix',\n /** InstantDB. */\n INSTANTDB: 'instantdb',\n /** InterBase. */\n INTERBASE: 'interbase',\n /** MariaDB. */\n MARIADB: 'mariadb',\n /** Netezza. */\n NETEZZA: 'netezza',\n /** Pervasive PSQL. */\n PERVASIVE: 'pervasive',\n /** PointBase. */\n POINTBASE: 'pointbase',\n /** SQLite. */\n SQLITE: 'sqlite',\n /** Sybase. */\n SYBASE: 'sybase',\n /** Teradata. */\n TERADATA: 'teradata',\n /** Vertica. */\n VERTICA: 'vertica',\n /** H2. */\n H2: 'h2',\n /** ColdFusion IMQ. */\n COLDFUSION: 'coldfusion',\n /** Apache Cassandra. */\n CASSANDRA: 'cassandra',\n /** Apache HBase. */\n HBASE: 'hbase',\n /** MongoDB. */\n MONGODB: 'mongodb',\n /** Redis. */\n REDIS: 'redis',\n /** Couchbase. */\n COUCHBASE: 'couchbase',\n /** CouchDB. */\n COUCHDB: 'couchdb',\n /** Microsoft Azure Cosmos DB. */\n COSMOSDB: 'cosmosdb',\n /** Amazon DynamoDB. */\n DYNAMODB: 'dynamodb',\n /** Neo4j. */\n NEO4J: 'neo4j',\n /** Apache Geode. */\n GEODE: 'geode',\n /** Elasticsearch. */\n ELASTICSEARCH: 'elasticsearch',\n /** Memcached. */\n MEMCACHED: 'memcached',\n /** CockroachDB. */\n COCKROACHDB: 'cockroachdb',\n};\nexports.DbCassandraConsistencyLevelValues = {\n /** all. */\n ALL: 'all',\n /** each_quorum. */\n EACH_QUORUM: 'each_quorum',\n /** quorum. */\n QUORUM: 'quorum',\n /** local_quorum. */\n LOCAL_QUORUM: 'local_quorum',\n /** one. */\n ONE: 'one',\n /** two. */\n TWO: 'two',\n /** three. */\n THREE: 'three',\n /** local_one. */\n LOCAL_ONE: 'local_one',\n /** any. */\n ANY: 'any',\n /** serial. */\n SERIAL: 'serial',\n /** local_serial. */\n LOCAL_SERIAL: 'local_serial',\n};\nexports.FaasTriggerValues = {\n /** A response to some data source operation such as a database or filesystem read/write. */\n DATASOURCE: 'datasource',\n /** To provide an answer to an inbound HTTP request. */\n HTTP: 'http',\n /** A function is set to be executed when messages are sent to a messaging system. */\n PUBSUB: 'pubsub',\n /** A function is scheduled to be executed regularly. */\n TIMER: 'timer',\n /** If none of the others apply. */\n OTHER: 'other',\n};\nexports.FaasDocumentOperationValues = {\n /** When a new object is created. */\n INSERT: 'insert',\n /** When an object is modified. */\n EDIT: 'edit',\n /** When an object is deleted. */\n DELETE: 'delete',\n};\nexports.FaasInvokedProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.NetTransportValues = {\n /** ip_tcp. */\n IP_TCP: 'ip_tcp',\n /** ip_udp. */\n IP_UDP: 'ip_udp',\n /** Another IP-based protocol. */\n IP: 'ip',\n /** Unix Domain socket. See below. */\n UNIX: 'unix',\n /** Named or anonymous pipe. See note below. */\n PIPE: 'pipe',\n /** In-process communication. */\n INPROC: 'inproc',\n /** Something else (non IP-based). */\n OTHER: 'other',\n};\nexports.NetHostConnectionTypeValues = {\n /** wifi. */\n WIFI: 'wifi',\n /** wired. */\n WIRED: 'wired',\n /** cell. */\n CELL: 'cell',\n /** unavailable. */\n UNAVAILABLE: 'unavailable',\n /** unknown. */\n UNKNOWN: 'unknown',\n};\nexports.NetHostConnectionSubtypeValues = {\n /** GPRS. */\n GPRS: 'gprs',\n /** EDGE. */\n EDGE: 'edge',\n /** UMTS. */\n UMTS: 'umts',\n /** CDMA. */\n CDMA: 'cdma',\n /** EVDO Rel. 0. */\n EVDO_0: 'evdo_0',\n /** EVDO Rev. A. */\n EVDO_A: 'evdo_a',\n /** CDMA2000 1XRTT. */\n CDMA2000_1XRTT: 'cdma2000_1xrtt',\n /** HSDPA. */\n HSDPA: 'hsdpa',\n /** HSUPA. */\n HSUPA: 'hsupa',\n /** HSPA. */\n HSPA: 'hspa',\n /** IDEN. */\n IDEN: 'iden',\n /** EVDO Rev. B. */\n EVDO_B: 'evdo_b',\n /** LTE. */\n LTE: 'lte',\n /** EHRPD. */\n EHRPD: 'ehrpd',\n /** HSPAP. */\n HSPAP: 'hspap',\n /** GSM. */\n GSM: 'gsm',\n /** TD-SCDMA. */\n TD_SCDMA: 'td_scdma',\n /** IWLAN. */\n IWLAN: 'iwlan',\n /** 5G NR (New Radio). */\n NR: 'nr',\n /** 5G NRNSA (New Radio Non-Standalone). */\n NRNSA: 'nrnsa',\n /** LTE CA. */\n LTE_CA: 'lte_ca',\n};\nexports.HttpFlavorValues = {\n /** HTTP 1.0. */\n HTTP_1_0: '1.0',\n /** HTTP 1.1. */\n HTTP_1_1: '1.1',\n /** HTTP 2. */\n HTTP_2_0: '2.0',\n /** SPDY protocol. */\n SPDY: 'SPDY',\n /** QUIC protocol. */\n QUIC: 'QUIC',\n};\nexports.MessagingDestinationKindValues = {\n /** A message sent to a queue. */\n QUEUE: 'queue',\n /** A message sent to a topic. */\n TOPIC: 'topic',\n};\nexports.MessagingOperationValues = {\n /** receive. */\n RECEIVE: 'receive',\n /** process. */\n PROCESS: 'process',\n};\nexports.RpcGrpcStatusCodeValues = {\n /** OK. */\n OK: 0,\n /** CANCELLED. */\n CANCELLED: 1,\n /** UNKNOWN. */\n UNKNOWN: 2,\n /** INVALID_ARGUMENT. */\n INVALID_ARGUMENT: 3,\n /** DEADLINE_EXCEEDED. */\n DEADLINE_EXCEEDED: 4,\n /** NOT_FOUND. */\n NOT_FOUND: 5,\n /** ALREADY_EXISTS. */\n ALREADY_EXISTS: 6,\n /** PERMISSION_DENIED. */\n PERMISSION_DENIED: 7,\n /** RESOURCE_EXHAUSTED. */\n RESOURCE_EXHAUSTED: 8,\n /** FAILED_PRECONDITION. */\n FAILED_PRECONDITION: 9,\n /** ABORTED. */\n ABORTED: 10,\n /** OUT_OF_RANGE. */\n OUT_OF_RANGE: 11,\n /** UNIMPLEMENTED. */\n UNIMPLEMENTED: 12,\n /** INTERNAL. */\n INTERNAL: 13,\n /** UNAVAILABLE. */\n UNAVAILABLE: 14,\n /** DATA_LOSS. */\n DATA_LOSS: 15,\n /** UNAUTHENTICATED. */\n UNAUTHENTICATED: 16,\n};\nexports.MessageTypeValues = {\n /** sent. */\n SENT: 'SENT',\n /** received. */\n RECEIVED: 'RECEIVED',\n};\n//# sourceMappingURL=SemanticAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPGRPCExporterNodeBase = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst grpc_js_1 = require(\"@grpc/grpc-js\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst util_1 = require(\"./util\");\nconst otlp_exporter_base_1 = require(\"@opentelemetry/otlp-exporter-base\");\n/**\n * OTLP Exporter abstract base class\n */\nclass OTLPGRPCExporterNodeBase extends otlp_exporter_base_1.OTLPExporterBase {\n constructor(config = {}) {\n super(config);\n this.grpcQueue = [];\n this.serviceClient = undefined;\n if (config.headers) {\n api_1.diag.warn('Headers cannot be set when using grpc');\n }\n const headers = core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS);\n this.metadata = config.metadata || new grpc_js_1.Metadata();\n for (const [k, v] of Object.entries(headers)) {\n this.metadata.set(k, v);\n }\n this.compression = (0, util_1.configureCompression)(config.compression);\n }\n _sendPromise(objects, onSuccess, onError) {\n const promise = new Promise((resolve, reject) => {\n this._send(this, objects, resolve, reject);\n })\n .then(onSuccess, onError);\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n onInit(config) {\n // defer to next tick and lazy load to avoid loading grpc too early\n // and making this impossible to be instrumented\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { onInit } = require('./util');\n onInit(this, config);\n });\n }\n send(objects, onSuccess, onError) {\n if (this._shutdownOnce.isCalled) {\n api_1.diag.debug('Shutdown already started. Cannot send objects');\n return;\n }\n if (!this._send) {\n // defer to next tick and lazy load to avoid loading grpc too early\n // and making this impossible to be instrumented\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { send } = require('./util');\n this._send = send;\n this._sendPromise(objects, onSuccess, onError);\n });\n }\n else {\n this._sendPromise(objects, onSuccess, onError);\n }\n }\n onShutdown() {\n if (this.serviceClient) {\n this.serviceClient.close();\n }\n }\n}\nexports.OTLPGRPCExporterNodeBase = OTLPGRPCExporterNodeBase;\n//# sourceMappingURL=OTLPGRPCExporterNodeBase.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GrpcCompressionAlgorithm = exports.validateAndNormalizeUrl = exports.ServiceClientType = void 0;\n__exportStar(require(\"./OTLPGRPCExporterNodeBase\"), exports);\nvar types_1 = require(\"./types\");\nObject.defineProperty(exports, \"ServiceClientType\", { enumerable: true, get: function () { return types_1.ServiceClientType; } });\nvar util_1 = require(\"./util\");\nObject.defineProperty(exports, \"validateAndNormalizeUrl\", { enumerable: true, get: function () { return util_1.validateAndNormalizeUrl; } });\nObject.defineProperty(exports, \"GrpcCompressionAlgorithm\", { enumerable: true, get: function () { return util_1.GrpcCompressionAlgorithm; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServiceClientType = void 0;\nvar ServiceClientType;\n(function (ServiceClientType) {\n ServiceClientType[ServiceClientType[\"SPANS\"] = 0] = \"SPANS\";\n ServiceClientType[ServiceClientType[\"METRICS\"] = 1] = \"METRICS\";\n})(ServiceClientType = exports.ServiceClientType || (exports.ServiceClientType = {}));\n//# sourceMappingURL=types.js.map",null,"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExportResultCode = void 0;\nvar ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0;\nexports.BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexports.BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexports.BAGGAGE_ITEMS_SEPARATOR = ',';\n// Name of the http header used to propagate the baggage\nexports.BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CBaggagePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"../../trace/suppress-tracing\");\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\n/**\n * Propagates {@link Baggage} through Context format propagation.\n *\n * Based on the Baggage specification:\n * https://w3c.github.io/baggage/\n */\nclass W3CBaggagePropagator {\n inject(context, carrier, setter) {\n const baggage = api_1.propagation.getBaggage(context);\n if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))\n return;\n const keyPairs = (0, utils_1.getKeyPairs)(baggage)\n .filter((pair) => {\n return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;\n })\n .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS);\n const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs);\n if (headerValue.length > 0) {\n setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);\n }\n }\n extract(context, carrier, getter) {\n const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);\n const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue;\n if (!baggageString)\n return context;\n const baggage = {};\n if (baggageString.length === 0) {\n return context;\n }\n const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);\n pairs.forEach(entry => {\n const keyPair = (0, utils_1.parsePairKeyValue)(entry);\n if (keyPair) {\n const baggageEntry = { value: keyPair.value };\n if (keyPair.metadata) {\n baggageEntry.metadata = keyPair.metadata;\n }\n baggage[keyPair.key] = baggageEntry;\n }\n });\n if (Object.entries(baggage).length === 0) {\n return context;\n }\n return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));\n }\n fields() {\n return [constants_1.BAGGAGE_HEADER];\n }\n}\nexports.W3CBaggagePropagator = W3CBaggagePropagator;\n//# sourceMappingURL=W3CBaggagePropagator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst api_1 = require(\"@opentelemetry/api\");\nconst constants_1 = require(\"./constants\");\nfunction serializeKeyPairs(keyPairs) {\n return keyPairs.reduce((hValue, current) => {\n const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`;\n return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n }, '');\n}\nexports.serializeKeyPairs = serializeKeyPairs;\nfunction getKeyPairs(baggage) {\n return baggage.getAllEntries().map(([key, value]) => {\n let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;\n // include opaque metadata if provided\n // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation\n if (value.metadata !== undefined) {\n entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();\n }\n return entry;\n });\n}\nexports.getKeyPairs = getKeyPairs;\nfunction parsePairKeyValue(entry) {\n const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR);\n if (valueProps.length <= 0)\n return;\n const keyPairPart = valueProps.shift();\n if (!keyPairPart)\n return;\n const keyPair = keyPairPart.split(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR);\n if (keyPair.length !== 2)\n return;\n const key = decodeURIComponent(keyPair[0].trim());\n const value = decodeURIComponent(keyPair[1].trim());\n let metadata;\n if (valueProps.length > 0) {\n metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR));\n }\n return { key, value, metadata };\n}\nexports.parsePairKeyValue = parsePairKeyValue;\n/**\n * Parse a string serialized in the baggage HTTP Format (without metadata):\n * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md\n */\nfunction parseKeyPairsIntoRecord(value) {\n if (typeof value !== 'string' || value.length === 0)\n return {};\n return value\n .split(constants_1.BAGGAGE_ITEMS_SEPARATOR)\n .map(entry => {\n return parsePairKeyValue(entry);\n })\n .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0)\n .reduce((headers, keyPair) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n headers[keyPair.key] = keyPair.value;\n return headers;\n }, {});\n}\nexports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nfunction sanitizeAttributes(attributes) {\n const out = {};\n if (typeof attributes !== 'object' || attributes == null) {\n return out;\n }\n for (const [key, val] of Object.entries(attributes)) {\n if (!isAttributeKey(key)) {\n api_1.diag.warn(`Invalid attribute key: ${key}`);\n continue;\n }\n if (!isAttributeValue(val)) {\n api_1.diag.warn(`Invalid attribute value set for key: ${key}`);\n continue;\n }\n if (Array.isArray(val)) {\n out[key] = val.slice();\n }\n else {\n out[key] = val;\n }\n }\n return out;\n}\nexports.sanitizeAttributes = sanitizeAttributes;\nfunction isAttributeKey(key) {\n return typeof key === 'string' && key.length > 0;\n}\nexports.isAttributeKey = isAttributeKey;\nfunction isAttributeValue(val) {\n if (val == null) {\n return true;\n }\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n return isValidPrimitiveAttributeValue(val);\n}\nexports.isAttributeValue = isAttributeValue;\nfunction isHomogeneousAttributeValueArray(arr) {\n let type;\n for (const element of arr) {\n // null/undefined elements are allowed\n if (element == null)\n continue;\n if (!type) {\n if (isValidPrimitiveAttributeValue(element)) {\n type = typeof element;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n if (typeof element === type) {\n continue;\n }\n return false;\n }\n return true;\n}\nfunction isValidPrimitiveAttributeValue(val) {\n switch (typeof val) {\n case 'number':\n case 'boolean':\n case 'string':\n return true;\n }\n return false;\n}\n//# sourceMappingURL=attributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.globalErrorHandler = exports.setGlobalErrorHandler = void 0;\nconst logging_error_handler_1 = require(\"./logging-error-handler\");\n/** The global error handler delegate */\nlet delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nfunction setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\nexports.setGlobalErrorHandler = setGlobalErrorHandler;\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nfunction globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch (_a) { } // eslint-disable-line no-empty\n}\nexports.globalErrorHandler = globalErrorHandler;\n//# sourceMappingURL=global-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loggingErrorHandler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * Returns a function that logs an error using the provided logger, or a\n * console logger if one was not provided.\n */\nfunction loggingErrorHandler() {\n return (ex) => {\n api_1.diag.error(stringifyException(ex));\n };\n}\nexports.loggingErrorHandler = loggingErrorHandler;\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\n }\n}\n/**\n * Flattens an exception into key-value pairs by traversing the prototype chain\n * and coercing values to strings. Duplicate properties will not be overwritten;\n * the first insert wins.\n */\nfunction flattenException(ex) {\n const result = {};\n let current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(propertyName => {\n if (result[propertyName])\n return;\n const value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = void 0;\nconst platform_1 = require(\"../platform\");\nconst NANOSECOND_DIGITS = 9;\nconst SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number to HrTime, HrTime = [number, number].\n * The first number is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970.\n * The second number represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds.\n * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150.\n * numberToHrtime calculates the first number by converting and truncating the Epoch time in milliseconds to seconds:\n * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210.\n * numberToHrtime calculates the second number by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:\n * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * SECOND_TO_NANOSECONDS = 150000000.\n * This is represented in HrTime format as [1609504210, 150000000].\n * @param epochMillis\n */\nfunction numberToHrtime(epochMillis) {\n const epochSeconds = epochMillis / 1000;\n // Decimals only.\n const seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n const nanos = Number((epochSeconds - seconds).toFixed(NANOSECOND_DIGITS)) *\n SECOND_TO_NANOSECONDS;\n return [seconds, nanos];\n}\nfunction getTimeOrigin() {\n let timeOrigin = platform_1.otperformance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n const perf = platform_1.otperformance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nfunction hrTime(performanceNow) {\n const timeOrigin = numberToHrtime(getTimeOrigin());\n const now = numberToHrtime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now());\n let seconds = timeOrigin[0] + now[0];\n let nanos = timeOrigin[1] + now[1];\n // Nanoseconds\n if (nanos > SECOND_TO_NANOSECONDS) {\n nanos -= SECOND_TO_NANOSECONDS;\n seconds += 1;\n }\n return [seconds, nanos];\n}\nexports.hrTime = hrTime;\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nfunction timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\n else if (typeof time === 'number') {\n // Must be a performance.now() if it's smaller than process start time.\n if (time < getTimeOrigin()) {\n return hrTime(time);\n }\n else {\n // epoch milliseconds or performance.timeOrigin\n return numberToHrtime(time);\n }\n }\n else if (time instanceof Date) {\n return numberToHrtime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\nexports.timeInputToHrTime = timeInputToHrTime;\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nfunction hrTimeDuration(startTime, endTime) {\n let seconds = endTime[0] - startTime[0];\n let nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\nexports.hrTimeDuration = hrTimeDuration;\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nfunction hrTimeToTimeStamp(time) {\n const precision = NANOSECOND_DIGITS;\n const tmp = `${'0'.repeat(precision)}${time[1]}Z`;\n const nanoString = tmp.substr(tmp.length - precision - 1);\n const date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\nexports.hrTimeToTimeStamp = hrTimeToTimeStamp;\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nfunction hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\nexports.hrTimeToNanoseconds = hrTimeToNanoseconds;\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nfunction hrTimeToMilliseconds(time) {\n return Math.round(time[0] * 1e3 + time[1] / 1e6);\n}\nexports.hrTimeToMilliseconds = hrTimeToMilliseconds;\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nfunction hrTimeToMicroseconds(time) {\n return Math.round(time[0] * 1e6 + time[1] / 1e3);\n}\nexports.hrTimeToMicroseconds = hrTimeToMicroseconds;\n/**\n * check if time is HrTime\n * @param value\n */\nfunction isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\nexports.isTimeInputHrTime = isTimeInputHrTime;\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nfunction isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\nexports.isTimeInput = isTimeInput;\n//# sourceMappingURL=time.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageUtils = void 0;\n__exportStar(require(\"./baggage/propagation/W3CBaggagePropagator\"), exports);\n__exportStar(require(\"./common/attributes\"), exports);\n__exportStar(require(\"./common/global-error-handler\"), exports);\n__exportStar(require(\"./common/logging-error-handler\"), exports);\n__exportStar(require(\"./common/time\"), exports);\n__exportStar(require(\"./common/types\"), exports);\n__exportStar(require(\"./ExportResult\"), exports);\n__exportStar(require(\"./version\"), exports);\nexports.baggageUtils = require(\"./baggage/utils\");\n__exportStar(require(\"./platform\"), exports);\n__exportStar(require(\"./propagation/composite\"), exports);\n__exportStar(require(\"./trace/W3CTraceContextPropagator\"), exports);\n__exportStar(require(\"./trace/IdGenerator\"), exports);\n__exportStar(require(\"./trace/rpc-metadata\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOffSampler\"), exports);\n__exportStar(require(\"./trace/sampler/AlwaysOnSampler\"), exports);\n__exportStar(require(\"./trace/sampler/ParentBasedSampler\"), exports);\n__exportStar(require(\"./trace/sampler/TraceIdRatioBasedSampler\"), exports);\n__exportStar(require(\"./trace/suppress-tracing\"), exports);\n__exportStar(require(\"./trace/TraceState\"), exports);\n__exportStar(require(\"./utils/environment\"), exports);\n__exportStar(require(\"./utils/merge\"), exports);\n__exportStar(require(\"./utils/sampling\"), exports);\n__exportStar(require(\"./utils/url\"), exports);\n__exportStar(require(\"./utils/wrap\"), exports);\n__exportStar(require(\"./utils/callback\"), exports);\n__exportStar(require(\"./version\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=validators.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomIdGenerator = void 0;\nconst SPAN_ID_BYTES = 8;\nconst TRACE_ID_BYTES = 16;\nclass RandomIdGenerator {\n constructor() {\n /**\n * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex\n * characters corresponding to 128 bits.\n */\n this.generateTraceId = getIdGenerator(TRACE_ID_BYTES);\n /**\n * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex\n * characters corresponding to 64 bits.\n */\n this.generateSpanId = getIdGenerator(SPAN_ID_BYTES);\n }\n}\nexports.RandomIdGenerator = RandomIdGenerator;\nconst SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES);\nfunction getIdGenerator(bytes) {\n return function generateId() {\n for (let i = 0; i < bytes / 4; i++) {\n // unsigned right shift drops decimal part of the number\n // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE\n SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4);\n }\n // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated\n for (let i = 0; i < bytes; i++) {\n if (SHARED_BUFFER[i] > 0) {\n break;\n }\n else if (i === bytes - 1) {\n SHARED_BUFFER[bytes - 1] = 1;\n }\n }\n return SHARED_BUFFER.toString('hex', 0, bytes);\n };\n}\n//# sourceMappingURL=RandomIdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEnv = void 0;\nconst os = require(\"os\");\nconst environment_1 = require(\"../../utils/environment\");\n/**\n * Gets the environment variables\n */\nfunction getEnv() {\n const processEnv = (0, environment_1.parseEnvironment)(process.env);\n return Object.assign({\n HOSTNAME: os.hostname(),\n }, environment_1.DEFAULT_ENVIRONMENT, processEnv);\n}\nexports.getEnv = getEnv;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hexToBase64 = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction hexToBase64(hexStr) {\n const hexStrLen = hexStr.length;\n let hexAsciiCharsStr = '';\n for (let i = 0; i < hexStrLen; i += 2) {\n const hexPair = hexStr.substring(i, i + 2);\n const hexVal = parseInt(hexPair, 16);\n hexAsciiCharsStr += String.fromCharCode(hexVal);\n }\n return Buffer.from(hexAsciiCharsStr, 'ascii').toString('base64');\n}\nexports.hexToBase64 = hexToBase64;\n//# sourceMappingURL=hex-to-base64.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./environment\"), exports);\n__exportStar(require(\"./globalThis\"), exports);\n__exportStar(require(\"./hex-to-base64\"), exports);\n__exportStar(require(\"./RandomIdGenerator\"), exports);\n__exportStar(require(\"./performance\"), exports);\n__exportStar(require(\"./sdk-info\"), exports);\n__exportStar(require(\"./timer-util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.otperformance = void 0;\nconst perf_hooks_1 = require(\"perf_hooks\");\nexports.otperformance = perf_hooks_1.performance;\n//# sourceMappingURL=performance.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SDK_INFO = void 0;\nconst version_1 = require(\"../../version\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\n/** Constants describing the SDK in use */\nexports.SDK_INFO = {\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: 'opentelemetry',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'node',\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TelemetrySdkLanguageValues.NODEJS,\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: version_1.VERSION,\n};\n//# sourceMappingURL=sdk-info.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unrefTimer = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction unrefTimer(timer) {\n timer.unref();\n}\nexports.unrefTimer = unrefTimer;\n//# sourceMappingURL=timer-util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompositePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Combines multiple propagators into a single propagator. */\nclass CompositePropagator {\n /**\n * Construct a composite propagator from a list of propagators.\n *\n * @param [config] Configuration object for composite propagator\n */\n constructor(config = {}) {\n var _a;\n this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : [];\n this._fields = Array.from(new Set(this._propagators\n // older propagators may not have fields function, null check to be sure\n .map(p => (typeof p.fields === 'function' ? p.fields() : []))\n .reduce((x, y) => x.concat(y), [])));\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same carrier key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to inject\n * @param carrier Carrier into which context will be injected\n */\n inject(context, carrier, setter) {\n for (const propagator of this._propagators) {\n try {\n propagator.inject(context, carrier, setter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n }\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same context key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to add values to\n * @param carrier Carrier from which to extract context\n */\n extract(context, carrier, getter) {\n return this._propagators.reduce((ctx, propagator) => {\n try {\n return propagator.extract(ctx, carrier, getter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n return ctx;\n }, context);\n }\n fields() {\n // return a new array so our fields cannot be modified\n return this._fields.slice();\n }\n}\nexports.CompositePropagator = CompositePropagator;\n//# sourceMappingURL=composite.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceState = void 0;\nconst validators_1 = require(\"../internal/validators\");\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nclass TraceState {\n constructor(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceState();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\nexports.TraceState = TraceState;\n//# sourceMappingURL=TraceState.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"./suppress-tracing\");\nconst TraceState_1 = require(\"./TraceState\");\nexports.TRACE_PARENT_HEADER = 'traceparent';\nexports.TRACE_STATE_HEADER = 'tracestate';\nconst VERSION = '00';\nconst VERSION_PART = '(?!ff)[\\\\da-f]{2}';\nconst TRACE_ID_PART = '(?![0]{32})[\\\\da-f]{32}';\nconst PARENT_ID_PART = '(?![0]{16})[\\\\da-f]{16}';\nconst FLAGS_PART = '[\\\\da-f]{2}';\nconst TRACE_PARENT_REGEX = new RegExp(`^\\\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\\\s?$`);\n/**\n * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}\n * @param traceParent - A meta property that comes from server.\n * It should be dynamically generated server side to have the server's request trace Id,\n * a parent span Id that was set on the server's request span,\n * and the trace flags to indicate the server's sampling decision\n * (01 = sampled, 00 = not sampled).\n * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'\n * For more information see {@link https://www.w3.org/TR/trace-context/}\n */\nfunction parseTraceParent(traceParent) {\n const match = TRACE_PARENT_REGEX.exec(traceParent);\n if (!match)\n return null;\n // According to the specification the implementation should be compatible\n // with future versions. If there are more parts, we only reject it if it's using version 00\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n if (match[1] === '00' && match[5])\n return null;\n return {\n traceId: match[2],\n spanId: match[3],\n traceFlags: parseInt(match[4], 16),\n };\n}\nexports.parseTraceParent = parseTraceParent;\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n *\n * Based on the Trace Context specification:\n * https://www.w3.org/TR/trace-context/\n */\nclass W3CTraceContextPropagator {\n inject(context, carrier, setter) {\n const spanContext = api_1.trace.getSpanContext(context);\n if (!spanContext ||\n (0, suppress_tracing_1.isTracingSuppressed)(context) ||\n !(0, api_1.isSpanContextValid)(spanContext))\n return;\n const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;\n setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent);\n if (spanContext.traceState) {\n setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize());\n }\n }\n extract(context, carrier, getter) {\n const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER);\n if (!traceParentHeader)\n return context;\n const traceParent = Array.isArray(traceParentHeader)\n ? traceParentHeader[0]\n : traceParentHeader;\n if (typeof traceParent !== 'string')\n return context;\n const spanContext = parseTraceParent(traceParent);\n if (!spanContext)\n return context;\n spanContext.isRemote = true;\n const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER);\n if (traceStateHeader) {\n // If more than one `tracestate` header is found, we merge them into a\n // single header.\n const state = Array.isArray(traceStateHeader)\n ? traceStateHeader.join(',')\n : traceStateHeader;\n spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined);\n }\n return api_1.trace.setSpanContext(context, spanContext);\n }\n fields() {\n return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER];\n }\n}\nexports.W3CTraceContextPropagator = W3CTraceContextPropagator;\n//# sourceMappingURL=W3CTraceContextPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA');\nvar RPCType;\n(function (RPCType) {\n RPCType[\"HTTP\"] = \"http\";\n})(RPCType = exports.RPCType || (exports.RPCType = {}));\nfunction setRPCMetadata(context, meta) {\n return context.setValue(RPC_METADATA_KEY, meta);\n}\nexports.setRPCMetadata = setRPCMetadata;\nfunction deleteRPCMetadata(context) {\n return context.deleteValue(RPC_METADATA_KEY);\n}\nexports.deleteRPCMetadata = deleteRPCMetadata;\nfunction getRPCMetadata(context) {\n return context.getValue(RPC_METADATA_KEY);\n}\nexports.getRPCMetadata = getRPCMetadata;\n//# sourceMappingURL=rpc-metadata.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOffSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples no traces. */\nclass AlwaysOffSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return 'AlwaysOffSampler';\n }\n}\nexports.AlwaysOffSampler = AlwaysOffSampler;\n//# sourceMappingURL=AlwaysOffSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOnSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples all traces. */\nclass AlwaysOnSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.RECORD_AND_SAMPLED,\n };\n }\n toString() {\n return 'AlwaysOnSampler';\n }\n}\nexports.AlwaysOnSampler = AlwaysOnSampler;\n//# sourceMappingURL=AlwaysOnSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParentBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst global_error_handler_1 = require(\"../../common/global-error-handler\");\nconst AlwaysOffSampler_1 = require(\"./AlwaysOffSampler\");\nconst AlwaysOnSampler_1 = require(\"./AlwaysOnSampler\");\n/**\n * A composite sampler that either respects the parent span's sampling decision\n * or delegates to `delegateSampler` for root spans.\n */\nclass ParentBasedSampler {\n constructor(config) {\n var _a, _b, _c, _d;\n this._root = config.root;\n if (!this._root) {\n (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured'));\n this._root = new AlwaysOnSampler_1.AlwaysOnSampler();\n }\n this._remoteParentSampled =\n (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._remoteParentNotSampled =\n (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler();\n this._localParentSampled =\n (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._localParentNotSampled =\n (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();\n }\n shouldSample(context, traceId, spanName, spanKind, attributes, links) {\n const parentContext = api_1.trace.getSpanContext(context);\n if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {\n return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.isRemote) {\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n toString() {\n return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;\n }\n}\nexports.ParentBasedSampler = ParentBasedSampler;\n//# sourceMappingURL=ParentBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceIdRatioBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Sampler that samples a given fraction of traces based of trace id deterministically. */\nclass TraceIdRatioBasedSampler {\n constructor(_ratio = 0) {\n this._ratio = _ratio;\n this._ratio = this._normalize(_ratio);\n this._upperBound = Math.floor(this._ratio * 0xffffffff);\n }\n shouldSample(context, traceId) {\n return {\n decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound\n ? api_1.SamplingDecision.RECORD_AND_SAMPLED\n : api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return `TraceIdRatioBased{${this._ratio}}`;\n }\n _normalize(ratio) {\n if (typeof ratio !== 'number' || isNaN(ratio))\n return 0;\n return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;\n }\n _accumulate(traceId) {\n let accumulation = 0;\n for (let i = 0; i < traceId.length / 8; i++) {\n const pos = i * 8;\n const part = parseInt(traceId.slice(pos, pos + 8), 16);\n accumulation = (accumulation ^ part) >>> 0;\n }\n return accumulation;\n }\n}\nexports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;\n//# sourceMappingURL=TraceIdRatioBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nfunction suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexports.suppressTracing = suppressTracing;\nfunction unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexports.unsuppressTracing = unsuppressTracing;\nfunction isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\nexports.isTracingSuppressed = isTracingSuppressed;\n//# sourceMappingURL=suppress-tracing.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BindOnceFuture = void 0;\nconst promise_1 = require(\"./promise\");\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nclass BindOnceFuture {\n constructor(_callback, _that) {\n this._callback = _callback;\n this._that = _that;\n this._isCalled = false;\n this._deferred = new promise_1.Deferred();\n }\n get isCalled() {\n return this._isCalled;\n }\n get promise() {\n return this._deferred.promise;\n }\n call(...args) {\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve(this._callback.call(this._that, ...args))\n .then(val => this._deferred.resolve(val), err => this._deferred.reject(err));\n }\n catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n }\n}\nexports.BindOnceFuture = BindOnceFuture;\n//# sourceMappingURL=callback.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst sampling_1 = require(\"./sampling\");\nconst DEFAULT_LIST_SEPARATOR = ',';\n/**\n * Environment interface to define all names\n */\nconst ENVIRONMENT_NUMBERS_KEYS = [\n 'OTEL_BSP_EXPORT_TIMEOUT',\n 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BSP_MAX_QUEUE_SIZE',\n 'OTEL_BSP_SCHEDULE_DELAY',\n 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_LINK_COUNT_LIMIT',\n 'OTEL_EXPORTER_JAEGER_AGENT_PORT',\n];\nfunction isEnvVarANumber(key) {\n return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1);\n}\nconst ENVIRONMENT_LISTS_KEYS = [\n 'OTEL_NO_PATCH_MODULES',\n 'OTEL_PROPAGATORS',\n];\nfunction isEnvVarAList(key) {\n return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1;\n}\nexports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\nexports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\n/**\n * Default environment variables\n */\nexports.DEFAULT_ENVIRONMENT = {\n CONTAINER_NAME: '',\n ECS_CONTAINER_METADATA_URI_V4: '',\n ECS_CONTAINER_METADATA_URI: '',\n HOSTNAME: '',\n KUBERNETES_SERVICE_HOST: '',\n NAMESPACE: '',\n OTEL_BSP_EXPORT_TIMEOUT: 30000,\n OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BSP_MAX_QUEUE_SIZE: 2048,\n OTEL_BSP_SCHEDULE_DELAY: 5000,\n OTEL_EXPORTER_JAEGER_AGENT_HOST: '',\n OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832,\n OTEL_EXPORTER_JAEGER_ENDPOINT: '',\n OTEL_EXPORTER_JAEGER_PASSWORD: '',\n OTEL_EXPORTER_JAEGER_USER: '',\n OTEL_EXPORTER_OTLP_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_HEADERS: '',\n OTEL_EXPORTER_OTLP_TRACES_HEADERS: '',\n OTEL_EXPORTER_OTLP_METRICS_HEADERS: '',\n OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans',\n OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO,\n OTEL_NO_PATCH_MODULES: [],\n OTEL_PROPAGATORS: ['tracecontext', 'baggage'],\n OTEL_RESOURCE_ATTRIBUTES: '',\n OTEL_SERVICE_NAME: '',\n OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_EVENT_COUNT_LIMIT: 128,\n OTEL_SPAN_LINK_COUNT_LIMIT: 128,\n OTEL_TRACES_EXPORTER: 'none',\n OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn,\n OTEL_TRACES_SAMPLER_ARG: '',\n OTEL_EXPORTER_OTLP_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: ''\n};\n/**\n * Parses a variable as number with number validation\n * @param name\n * @param environment\n * @param values\n * @param min\n * @param max\n */\nfunction parseNumber(name, environment, values, min = -Infinity, max = Infinity) {\n if (typeof values[name] !== 'undefined') {\n const value = Number(values[name]);\n if (!isNaN(value)) {\n if (value < min) {\n environment[name] = min;\n }\n else if (value > max) {\n environment[name] = max;\n }\n else {\n environment[name] = value;\n }\n }\n }\n}\n/**\n * Parses list-like strings from input into output.\n * @param name\n * @param environment\n * @param values\n * @param separator\n */\nfunction parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) {\n const givenValue = input[name];\n if (typeof givenValue === 'string') {\n output[name] = givenValue.split(separator).map(v => v.trim());\n }\n}\n// The support string -> DiagLogLevel mappings\nconst logLevelMap = {\n ALL: api_1.DiagLogLevel.ALL,\n VERBOSE: api_1.DiagLogLevel.VERBOSE,\n DEBUG: api_1.DiagLogLevel.DEBUG,\n INFO: api_1.DiagLogLevel.INFO,\n WARN: api_1.DiagLogLevel.WARN,\n ERROR: api_1.DiagLogLevel.ERROR,\n NONE: api_1.DiagLogLevel.NONE,\n};\n/**\n * Environmentally sets log level if valid log level string is provided\n * @param key\n * @param environment\n * @param values\n */\nfunction setLogLevelFromEnv(key, environment, values) {\n const value = values[key];\n if (typeof value === 'string') {\n const theLevel = logLevelMap[value.toUpperCase()];\n if (theLevel != null) {\n environment[key] = theLevel;\n }\n }\n}\n/**\n * Parses environment values\n * @param values\n */\nfunction parseEnvironment(values) {\n const environment = {};\n for (const env in exports.DEFAULT_ENVIRONMENT) {\n const key = env;\n switch (key) {\n case 'OTEL_LOG_LEVEL':\n setLogLevelFromEnv(key, environment, values);\n break;\n default:\n if (isEnvVarANumber(key)) {\n parseNumber(key, environment, values);\n }\n else if (isEnvVarAList(key)) {\n parseStringList(key, environment, values);\n }\n else {\n const value = values[key];\n if (typeof value !== 'undefined' && value !== null) {\n environment[key] = String(value);\n }\n }\n }\n }\n return environment;\n}\nexports.parseEnvironment = parseEnvironment;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPlainObject = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\nconst objectTag = '[object Object]';\nconst nullTag = '[object Null]';\nconst undefinedTag = '[object Undefined]';\nconst funcProto = Function.prototype;\nconst funcToString = funcProto.toString;\nconst objectCtorString = funcToString.call(Object);\nconst getPrototype = overArg(Object.getPrototypeOf, Object);\nconst objectProto = Object.prototype;\nconst hasOwnProperty = objectProto.hasOwnProperty;\nconst symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nconst nativeObjectToString = objectProto.toString;\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n return false;\n }\n const proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) === objectCtorString;\n}\nexports.isPlainObject = isPlainObject;\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];\n let unmasked = false;\n try {\n value[symToStringTag] = undefined;\n unmasked = true;\n }\n catch (e) {\n // silence\n }\n const result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n }\n else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n//# sourceMappingURL=lodash.merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.merge = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst lodash_merge_1 = require(\"./lodash.merge\");\nconst MAX_LEVEL = 20;\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nfunction merge(...args) {\n let result = args.shift();\n const objects = new WeakMap();\n while (args.length > 0) {\n result = mergeTwoObjects(result, args.shift(), 0, objects);\n }\n return result;\n}\nexports.merge = merge;\nfunction takeValue(value) {\n if (isArray(value)) {\n return value.slice();\n }\n return value;\n}\n/**\n * Merges two objects\n * @param one - first object\n * @param two - second object\n * @param level - current deep level\n * @param objects - objects holder that has been already referenced - to prevent\n * cyclic dependency\n */\nfunction mergeTwoObjects(one, two, level = 0, objects) {\n let result;\n if (level > MAX_LEVEL) {\n return undefined;\n }\n level++;\n if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n result = takeValue(two);\n }\n else if (isArray(one)) {\n result = one.slice();\n if (isArray(two)) {\n for (let i = 0, j = two.length; i < j; i++) {\n result.push(takeValue(two[i]));\n }\n }\n else if (isObject(two)) {\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n result[key] = takeValue(two[key]);\n }\n }\n }\n else if (isObject(one)) {\n if (isObject(two)) {\n if (!shouldMerge(one, two)) {\n return two;\n }\n result = Object.assign({}, one);\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n const twoValue = two[key];\n if (isPrimitive(twoValue)) {\n if (typeof twoValue === 'undefined') {\n delete result[key];\n }\n else {\n // result[key] = takeValue(twoValue);\n result[key] = twoValue;\n }\n }\n else {\n const obj1 = result[key];\n const obj2 = twoValue;\n if (wasObjectReferenced(one, key, objects) ||\n wasObjectReferenced(two, key, objects)) {\n delete result[key];\n }\n else {\n if (isObject(obj1) && isObject(obj2)) {\n const arr1 = objects.get(obj1) || [];\n const arr2 = objects.get(obj2) || [];\n arr1.push({ obj: one, key });\n arr2.push({ obj: two, key });\n objects.set(obj1, arr1);\n objects.set(obj2, arr2);\n }\n result[key] = mergeTwoObjects(result[key], twoValue, level, objects);\n }\n }\n }\n }\n else {\n result = two;\n }\n }\n return result;\n}\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(obj, key, objects) {\n const arr = objects.get(obj[key]) || [];\n for (let i = 0, j = arr.length; i < j; i++) {\n const info = arr[i];\n if (info.key === key && info.obj === obj) {\n return true;\n }\n }\n return false;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isObject(value) {\n return !isPrimitive(value) && !isArray(value) && !isFunction(value) && typeof value === 'object';\n}\nfunction isPrimitive(value) {\n return typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n value instanceof Date ||\n value instanceof RegExp ||\n value === null;\n}\nfunction shouldMerge(one, two) {\n if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Deferred = void 0;\nclass Deferred {\n constructor() {\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n get promise() {\n return this._promise;\n }\n resolve(val) {\n this._resolve(val);\n }\n reject(err) {\n this._reject(err);\n }\n}\nexports.Deferred = Deferred;\n//# sourceMappingURL=promise.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TracesSamplerValues = void 0;\nvar TracesSamplerValues;\n(function (TracesSamplerValues) {\n TracesSamplerValues[\"AlwaysOff\"] = \"always_off\";\n TracesSamplerValues[\"AlwaysOn\"] = \"always_on\";\n TracesSamplerValues[\"ParentBasedAlwaysOff\"] = \"parentbased_always_off\";\n TracesSamplerValues[\"ParentBasedAlwaysOn\"] = \"parentbased_always_on\";\n TracesSamplerValues[\"ParentBasedTraceIdRatio\"] = \"parentbased_traceidratio\";\n TracesSamplerValues[\"TraceIdRatio\"] = \"traceidratio\";\n})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {}));\n//# sourceMappingURL=sampling.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isUrlIgnored = exports.urlMatches = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction urlMatches(url, urlToMatch) {\n if (typeof urlToMatch === 'string') {\n return url === urlToMatch;\n }\n else {\n return !!url.match(urlToMatch);\n }\n}\nexports.urlMatches = urlMatches;\n/**\n * Check if {@param url} should be ignored when comparing against {@param ignoredUrls}\n * @param url\n * @param ignoredUrls\n */\nfunction isUrlIgnored(url, ignoredUrls) {\n if (!ignoredUrls) {\n return false;\n }\n for (const ignoreUrl of ignoredUrls) {\n if (urlMatches(url, ignoreUrl)) {\n return true;\n }\n }\n return false;\n}\nexports.isUrlIgnored = isUrlIgnored;\n//# sourceMappingURL=url.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isWrapped = void 0;\n/**\n * Checks if certain function has been already wrapped\n * @param func\n */\nfunction isWrapped(func) {\n return (typeof func === 'function' &&\n typeof func.__original === 'function' &&\n typeof func.__unwrap === 'function' &&\n func.__wrapped === true);\n}\nexports.isWrapped = isWrapped;\n//# sourceMappingURL=wrap.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.2.0';\n//# sourceMappingURL=version.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./trace\"), exports);\n__exportStar(require(\"./resource\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticResourceAttributes = {\n /**\n * Name of the cloud provider.\n */\n CLOUD_PROVIDER: 'cloud.provider',\n /**\n * The cloud account ID the resource is assigned to.\n */\n CLOUD_ACCOUNT_ID: 'cloud.account.id',\n /**\n * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations).\n */\n CLOUD_REGION: 'cloud.region',\n /**\n * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\n *\n * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud.\n */\n CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone',\n /**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\n CLOUD_PLATFORM: 'cloud.platform',\n /**\n * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).\n */\n AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn',\n /**\n * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).\n */\n AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn',\n /**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n */\n AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype',\n /**\n * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).\n */\n AWS_ECS_TASK_ARN: 'aws.ecs.task.arn',\n /**\n * The task definition family this task definition is a member of.\n */\n AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family',\n /**\n * The revision for this task definition.\n */\n AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision',\n /**\n * The ARN of an EKS cluster.\n */\n AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn',\n /**\n * The name(s) of the AWS log group(s) an application is writing to.\n *\n * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.\n */\n AWS_LOG_GROUP_NAMES: 'aws.log.group.names',\n /**\n * The Amazon Resource Name(s) (ARN) of the AWS log group(s).\n *\n * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).\n */\n AWS_LOG_GROUP_ARNS: 'aws.log.group.arns',\n /**\n * The name(s) of the AWS log stream(s) an application is writing to.\n */\n AWS_LOG_STREAM_NAMES: 'aws.log.stream.names',\n /**\n * The ARN(s) of the AWS log stream(s).\n *\n * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.\n */\n AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns',\n /**\n * Container name.\n */\n CONTAINER_NAME: 'container.name',\n /**\n * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated.\n */\n CONTAINER_ID: 'container.id',\n /**\n * The container runtime managing this container.\n */\n CONTAINER_RUNTIME: 'container.runtime',\n /**\n * Name of the image the container was built on.\n */\n CONTAINER_IMAGE_NAME: 'container.image.name',\n /**\n * Container image tag.\n */\n CONTAINER_IMAGE_TAG: 'container.image.tag',\n /**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n */\n DEPLOYMENT_ENVIRONMENT: 'deployment.environment',\n /**\n * A unique identifier representing the device.\n *\n * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.\n */\n DEVICE_ID: 'device.id',\n /**\n * The model identifier for the device.\n *\n * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.\n */\n DEVICE_MODEL_IDENTIFIER: 'device.model.identifier',\n /**\n * The marketing name for the device model.\n *\n * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.\n */\n DEVICE_MODEL_NAME: 'device.model.name',\n /**\n * The name of the single function that this runtime instance executes.\n *\n * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes).\n */\n FAAS_NAME: 'faas.name',\n /**\n * The unique ID of the single function that this runtime instance executes.\n *\n * Note: Depending on the cloud provider, use:\n \n * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\n Take care not to use the "invoked ARN" directly but replace any\n [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple\n different aliases.\n * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\n * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).\n \n On some providers, it may not be possible to determine the full ID at startup,\n which is why this field cannot be made required. For example, on AWS the account ID\n part of the ARN is not available without calling another AWS API\n which may be deemed too slow for a short-running lambda function.\n As an alternative, consider setting `faas.id` as a span attribute instead.\n */\n FAAS_ID: 'faas.id',\n /**\n * The immutable version of the function being executed.\n *\n * Note: Depending on the cloud provider and platform, use:\n \n * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\n (an integer represented as a decimal string).\n * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions)\n (i.e., the function name plus the revision suffix).\n * **Google Cloud Functions:** The value of the\n [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\n * **Azure Functions:** Not applicable. Do not set this attribute.\n */\n FAAS_VERSION: 'faas.version',\n /**\n * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\n *\n * Note: * **AWS Lambda:** Use the (full) log stream name.\n */\n FAAS_INSTANCE: 'faas.instance',\n /**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.\n */\n FAAS_MAX_MEMORY: 'faas.max_memory',\n /**\n * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.\n */\n HOST_ID: 'host.id',\n /**\n * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\n */\n HOST_NAME: 'host.name',\n /**\n * Type of host. For Cloud, this must be the machine type.\n */\n HOST_TYPE: 'host.type',\n /**\n * The CPU architecture the host system is running on.\n */\n HOST_ARCH: 'host.arch',\n /**\n * Name of the VM image or OS install the host was instantiated from.\n */\n HOST_IMAGE_NAME: 'host.image.name',\n /**\n * VM image ID. For Cloud, this value is from the provider.\n */\n HOST_IMAGE_ID: 'host.image.id',\n /**\n * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes).\n */\n HOST_IMAGE_VERSION: 'host.image.version',\n /**\n * The name of the cluster.\n */\n K8S_CLUSTER_NAME: 'k8s.cluster.name',\n /**\n * The name of the Node.\n */\n K8S_NODE_NAME: 'k8s.node.name',\n /**\n * The UID of the Node.\n */\n K8S_NODE_UID: 'k8s.node.uid',\n /**\n * The name of the namespace that the pod is running in.\n */\n K8S_NAMESPACE_NAME: 'k8s.namespace.name',\n /**\n * The UID of the Pod.\n */\n K8S_POD_UID: 'k8s.pod.uid',\n /**\n * The name of the Pod.\n */\n K8S_POD_NAME: 'k8s.pod.name',\n /**\n * The name of the Container in a Pod template.\n */\n K8S_CONTAINER_NAME: 'k8s.container.name',\n /**\n * The UID of the ReplicaSet.\n */\n K8S_REPLICASET_UID: 'k8s.replicaset.uid',\n /**\n * The name of the ReplicaSet.\n */\n K8S_REPLICASET_NAME: 'k8s.replicaset.name',\n /**\n * The UID of the Deployment.\n */\n K8S_DEPLOYMENT_UID: 'k8s.deployment.uid',\n /**\n * The name of the Deployment.\n */\n K8S_DEPLOYMENT_NAME: 'k8s.deployment.name',\n /**\n * The UID of the StatefulSet.\n */\n K8S_STATEFULSET_UID: 'k8s.statefulset.uid',\n /**\n * The name of the StatefulSet.\n */\n K8S_STATEFULSET_NAME: 'k8s.statefulset.name',\n /**\n * The UID of the DaemonSet.\n */\n K8S_DAEMONSET_UID: 'k8s.daemonset.uid',\n /**\n * The name of the DaemonSet.\n */\n K8S_DAEMONSET_NAME: 'k8s.daemonset.name',\n /**\n * The UID of the Job.\n */\n K8S_JOB_UID: 'k8s.job.uid',\n /**\n * The name of the Job.\n */\n K8S_JOB_NAME: 'k8s.job.name',\n /**\n * The UID of the CronJob.\n */\n K8S_CRONJOB_UID: 'k8s.cronjob.uid',\n /**\n * The name of the CronJob.\n */\n K8S_CRONJOB_NAME: 'k8s.cronjob.name',\n /**\n * The operating system type.\n */\n OS_TYPE: 'os.type',\n /**\n * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\n */\n OS_DESCRIPTION: 'os.description',\n /**\n * Human readable operating system name.\n */\n OS_NAME: 'os.name',\n /**\n * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes).\n */\n OS_VERSION: 'os.version',\n /**\n * Process identifier (PID).\n */\n PROCESS_PID: 'process.pid',\n /**\n * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_NAME: 'process.executable.name',\n /**\n * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_PATH: 'process.executable.path',\n /**\n * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\n */\n PROCESS_COMMAND: 'process.command',\n /**\n * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead.\n */\n PROCESS_COMMAND_LINE: 'process.command_line',\n /**\n * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.\n */\n PROCESS_COMMAND_ARGS: 'process.command_args',\n /**\n * The username of the user that owns the process.\n */\n PROCESS_OWNER: 'process.owner',\n /**\n * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.\n */\n PROCESS_RUNTIME_NAME: 'process.runtime.name',\n /**\n * The version of the runtime of this process, as returned by the runtime without modification.\n */\n PROCESS_RUNTIME_VERSION: 'process.runtime.version',\n /**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n */\n PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description',\n /**\n * Logical name of the service.\n *\n * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\n */\n SERVICE_NAME: 'service.name',\n /**\n * A namespace for `service.name`.\n *\n * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\n */\n SERVICE_NAMESPACE: 'service.namespace',\n /**\n * The string ID of the service instance.\n *\n * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).\n */\n SERVICE_INSTANCE_ID: 'service.instance.id',\n /**\n * The version string of the service API or implementation.\n */\n SERVICE_VERSION: 'service.version',\n /**\n * The name of the telemetry SDK as defined above.\n */\n TELEMETRY_SDK_NAME: 'telemetry.sdk.name',\n /**\n * The language of the telemetry SDK.\n */\n TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language',\n /**\n * The version string of the telemetry SDK.\n */\n TELEMETRY_SDK_VERSION: 'telemetry.sdk.version',\n /**\n * The version string of the auto instrumentation agent, if used.\n */\n TELEMETRY_AUTO_VERSION: 'telemetry.auto.version',\n /**\n * The name of the web engine.\n */\n WEBENGINE_NAME: 'webengine.name',\n /**\n * The version of the web engine.\n */\n WEBENGINE_VERSION: 'webengine.version',\n /**\n * Additional description of the web engine (e.g. detailed version and edition information).\n */\n WEBENGINE_DESCRIPTION: 'webengine.description',\n};\nexports.CloudProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.CloudPlatformValues = {\n /** Alibaba Cloud Elastic Compute Service. */\n ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs',\n /** Alibaba Cloud Function Compute. */\n ALIBABA_CLOUD_FC: 'alibaba_cloud_fc',\n /** AWS Elastic Compute Cloud. */\n AWS_EC2: 'aws_ec2',\n /** AWS Elastic Container Service. */\n AWS_ECS: 'aws_ecs',\n /** AWS Elastic Kubernetes Service. */\n AWS_EKS: 'aws_eks',\n /** AWS Lambda. */\n AWS_LAMBDA: 'aws_lambda',\n /** AWS Elastic Beanstalk. */\n AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk',\n /** Azure Virtual Machines. */\n AZURE_VM: 'azure_vm',\n /** Azure Container Instances. */\n AZURE_CONTAINER_INSTANCES: 'azure_container_instances',\n /** Azure Kubernetes Service. */\n AZURE_AKS: 'azure_aks',\n /** Azure Functions. */\n AZURE_FUNCTIONS: 'azure_functions',\n /** Azure App Service. */\n AZURE_APP_SERVICE: 'azure_app_service',\n /** Google Cloud Compute Engine (GCE). */\n GCP_COMPUTE_ENGINE: 'gcp_compute_engine',\n /** Google Cloud Run. */\n GCP_CLOUD_RUN: 'gcp_cloud_run',\n /** Google Cloud Kubernetes Engine (GKE). */\n GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine',\n /** Google Cloud Functions (GCF). */\n GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions',\n /** Google Cloud App Engine (GAE). */\n GCP_APP_ENGINE: 'gcp_app_engine',\n};\nexports.AwsEcsLaunchtypeValues = {\n /** ec2. */\n EC2: 'ec2',\n /** fargate. */\n FARGATE: 'fargate',\n};\nexports.HostArchValues = {\n /** AMD64. */\n AMD64: 'amd64',\n /** ARM32. */\n ARM32: 'arm32',\n /** ARM64. */\n ARM64: 'arm64',\n /** Itanium. */\n IA64: 'ia64',\n /** 32-bit PowerPC. */\n PPC32: 'ppc32',\n /** 64-bit PowerPC. */\n PPC64: 'ppc64',\n /** 32-bit x86. */\n X86: 'x86',\n};\nexports.OsTypeValues = {\n /** Microsoft Windows. */\n WINDOWS: 'windows',\n /** Linux. */\n LINUX: 'linux',\n /** Apple Darwin. */\n DARWIN: 'darwin',\n /** FreeBSD. */\n FREEBSD: 'freebsd',\n /** NetBSD. */\n NETBSD: 'netbsd',\n /** OpenBSD. */\n OPENBSD: 'openbsd',\n /** DragonFly BSD. */\n DRAGONFLYBSD: 'dragonflybsd',\n /** HP-UX (Hewlett Packard Unix). */\n HPUX: 'hpux',\n /** AIX (Advanced Interactive eXecutive). */\n AIX: 'aix',\n /** Oracle Solaris. */\n SOLARIS: 'solaris',\n /** IBM z/OS. */\n Z_OS: 'z_os',\n};\nexports.TelemetrySdkLanguageValues = {\n /** cpp. */\n CPP: 'cpp',\n /** dotnet. */\n DOTNET: 'dotnet',\n /** erlang. */\n ERLANG: 'erlang',\n /** go. */\n GO: 'go',\n /** java. */\n JAVA: 'java',\n /** nodejs. */\n NODEJS: 'nodejs',\n /** php. */\n PHP: 'php',\n /** python. */\n PYTHON: 'python',\n /** ruby. */\n RUBY: 'ruby',\n /** webjs. */\n WEBJS: 'webjs',\n};\n//# sourceMappingURL=SemanticResourceAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticResourceAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticAttributes = {\n /**\n * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).\n *\n * Note: This may be different from `faas.id` if an alias is involved.\n */\n AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn',\n /**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\n DB_SYSTEM: 'db.system',\n /**\n * The connection string used to connect to the database. It is recommended to remove embedded credentials.\n */\n DB_CONNECTION_STRING: 'db.connection_string',\n /**\n * Username for accessing the database.\n */\n DB_USER: 'db.user',\n /**\n * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n */\n DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname',\n /**\n * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n *\n * Note: In some SQL databases, the database name to be used is called "schema name".\n */\n DB_NAME: 'db.name',\n /**\n * The database statement being executed.\n *\n * Note: The value may be sanitized to exclude sensitive information.\n */\n DB_STATEMENT: 'db.statement',\n /**\n * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n *\n * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n */\n DB_OPERATION: 'db.operation',\n /**\n * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n *\n * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).\n */\n DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name',\n /**\n * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace',\n /**\n * The fetch size used for paging, i.e. how many rows will be returned at once.\n */\n DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size',\n /**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\n DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_CASSANDRA_TABLE: 'db.cassandra.table',\n /**\n * Whether or not the query is idempotent.\n */\n DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence',\n /**\n * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\n */\n DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count',\n /**\n * The ID of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id',\n /**\n * The data center of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc',\n /**\n * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_HBASE_NAMESPACE: 'db.hbase.namespace',\n /**\n * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n */\n DB_REDIS_DATABASE_INDEX: 'db.redis.database_index',\n /**\n * The collection being accessed within the database stated in `db.name`.\n */\n DB_MONGODB_COLLECTION: 'db.mongodb.collection',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_SQL_TABLE: 'db.sql.table',\n /**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n */\n EXCEPTION_TYPE: 'exception.type',\n /**\n * The exception message.\n */\n EXCEPTION_MESSAGE: 'exception.message',\n /**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n */\n EXCEPTION_STACKTRACE: 'exception.stacktrace',\n /**\n * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n *\n * Note: An exception is considered to have escaped (or left) the scope of a span,\n if that span is ended while the exception is still logically "in flight".\n This may be actually "in flight" in some languages (e.g. if the exception\n is passed to a Context manager's `__exit__` method in Python) but will\n usually be caught at the point of recording the exception in most languages.\n \n It is usually not possible to determine at the point where an exception is thrown\n whether it will escape the scope of a span.\n However, it is trivial to know that an exception\n will escape, if one checks for an active exception just before ending the span,\n as done in the [example above](#exception-end-example).\n \n It follows that an exception may still escape the scope of the span\n even if the `exception.escaped` attribute was not set or set to false,\n since the event might have been recorded at a time where it was not\n clear whether the exception will escape.\n */\n EXCEPTION_ESCAPED: 'exception.escaped',\n /**\n * Type of the trigger on which the function is executed.\n */\n FAAS_TRIGGER: 'faas.trigger',\n /**\n * The execution ID of the current function execution.\n */\n FAAS_EXECUTION: 'faas.execution',\n /**\n * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\n */\n FAAS_DOCUMENT_COLLECTION: 'faas.document.collection',\n /**\n * Describes the type of the operation that was performed on the data.\n */\n FAAS_DOCUMENT_OPERATION: 'faas.document.operation',\n /**\n * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_DOCUMENT_TIME: 'faas.document.time',\n /**\n * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\n */\n FAAS_DOCUMENT_NAME: 'faas.document.name',\n /**\n * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_TIME: 'faas.time',\n /**\n * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\n */\n FAAS_CRON: 'faas.cron',\n /**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start).\n */\n FAAS_COLDSTART: 'faas.coldstart',\n /**\n * The name of the invoked function.\n *\n * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.\n */\n FAAS_INVOKED_NAME: 'faas.invoked_name',\n /**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\n FAAS_INVOKED_PROVIDER: 'faas.invoked_provider',\n /**\n * The cloud region of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\n */\n FAAS_INVOKED_REGION: 'faas.invoked_region',\n /**\n * Transport protocol used. See note below.\n */\n NET_TRANSPORT: 'net.transport',\n /**\n * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6).\n */\n NET_PEER_IP: 'net.peer.ip',\n /**\n * Remote port number.\n */\n NET_PEER_PORT: 'net.peer.port',\n /**\n * Remote hostname or similar, see note below.\n */\n NET_PEER_NAME: 'net.peer.name',\n /**\n * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.\n */\n NET_HOST_IP: 'net.host.ip',\n /**\n * Like `net.peer.port` but for the host port.\n */\n NET_HOST_PORT: 'net.host.port',\n /**\n * Local hostname or similar, see note below.\n */\n NET_HOST_NAME: 'net.host.name',\n /**\n * The internet connection type currently being used by the host.\n */\n NET_HOST_CONNECTION_TYPE: 'net.host.connection.type',\n /**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\n NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype',\n /**\n * The name of the mobile carrier.\n */\n NET_HOST_CARRIER_NAME: 'net.host.carrier.name',\n /**\n * The mobile carrier country code.\n */\n NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc',\n /**\n * The mobile carrier network code.\n */\n NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc',\n /**\n * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\n */\n NET_HOST_CARRIER_ICC: 'net.host.carrier.icc',\n /**\n * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\n */\n PEER_SERVICE: 'peer.service',\n /**\n * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.\n */\n ENDUSER_ID: 'enduser.id',\n /**\n * Actual/assumed role the client is making the request under extracted from token or application security context.\n */\n ENDUSER_ROLE: 'enduser.role',\n /**\n * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).\n */\n ENDUSER_SCOPE: 'enduser.scope',\n /**\n * Current "managed" thread ID (as opposed to OS thread ID).\n */\n THREAD_ID: 'thread.id',\n /**\n * Current thread name.\n */\n THREAD_NAME: 'thread.name',\n /**\n * The method or function name, or equivalent (usually rightmost part of the code unit's name).\n */\n CODE_FUNCTION: 'code.function',\n /**\n * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.\n */\n CODE_NAMESPACE: 'code.namespace',\n /**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\n */\n CODE_FILEPATH: 'code.filepath',\n /**\n * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.\n */\n CODE_LINENO: 'code.lineno',\n /**\n * HTTP request method.\n */\n HTTP_METHOD: 'http.method',\n /**\n * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.\n *\n * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`.\n */\n HTTP_URL: 'http.url',\n /**\n * The full request target as passed in a HTTP request line or equivalent.\n */\n HTTP_TARGET: 'http.target',\n /**\n * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.\n *\n * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.\n */\n HTTP_HOST: 'http.host',\n /**\n * The URI scheme identifying the used protocol.\n */\n HTTP_SCHEME: 'http.scheme',\n /**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n */\n HTTP_STATUS_CODE: 'http.status_code',\n /**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\n HTTP_FLAVOR: 'http.flavor',\n /**\n * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client.\n */\n HTTP_USER_AGENT: 'http.user_agent',\n /**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length',\n /**\n * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed',\n /**\n * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length',\n /**\n * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed',\n /**\n * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).\n *\n * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available.\n */\n HTTP_SERVER_NAME: 'http.server_name',\n /**\n * The matched route (path template).\n */\n HTTP_ROUTE: 'http.route',\n /**\n * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).\n *\n * Note: This is not necessarily the same as `net.peer.ip`, which would\n identify the network-level peer, which may be a proxy.\n \n This attribute should be set when a source of information different\n from the one used for `net.peer.ip`, is available even if that other\n source just confirms the same value as `net.peer.ip`.\n Rationale: For `net.peer.ip`, one typically does not know if it\n comes from a proxy, reverse proxy, or the actual client. Setting\n `http.client_ip` when it's the same as `net.peer.ip` means that\n one is at least somewhat confident that the address is not that of\n the closest proxy.\n */\n HTTP_CLIENT_IP: 'http.client_ip',\n /**\n * The keys in the `RequestItems` object field.\n */\n AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names',\n /**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field.\n */\n AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity',\n /**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field.\n */\n AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics',\n /**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity',\n /**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity',\n /**\n * The value of the `ConsistentRead` request parameter.\n */\n AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read',\n /**\n * The value of the `ProjectionExpression` request parameter.\n */\n AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection',\n /**\n * The value of the `Limit` request parameter.\n */\n AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit',\n /**\n * The value of the `AttributesToGet` request parameter.\n */\n AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get',\n /**\n * The value of the `IndexName` request parameter.\n */\n AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name',\n /**\n * The value of the `Select` request parameter.\n */\n AWS_DYNAMODB_SELECT: 'aws.dynamodb.select',\n /**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes',\n /**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes',\n /**\n * The value of the `ExclusiveStartTableName` request parameter.\n */\n AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table',\n /**\n * The the number of items in the `TableNames` response parameter.\n */\n AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count',\n /**\n * The value of the `ScanIndexForward` request parameter.\n */\n AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward',\n /**\n * The value of the `Segment` request parameter.\n */\n AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment',\n /**\n * The value of the `TotalSegments` request parameter.\n */\n AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments',\n /**\n * The value of the `Count` response parameter.\n */\n AWS_DYNAMODB_COUNT: 'aws.dynamodb.count',\n /**\n * The value of the `ScannedCount` response parameter.\n */\n AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count',\n /**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field.\n */\n AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions',\n /**\n * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates',\n /**\n * A string identifying the messaging system.\n */\n MESSAGING_SYSTEM: 'messaging.system',\n /**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n */\n MESSAGING_DESTINATION: 'messaging.destination',\n /**\n * The kind of message destination.\n */\n MESSAGING_DESTINATION_KIND: 'messaging.destination_kind',\n /**\n * A boolean that is true if the message destination is temporary.\n */\n MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination',\n /**\n * The name of the transport protocol.\n */\n MESSAGING_PROTOCOL: 'messaging.protocol',\n /**\n * The version of the transport protocol.\n */\n MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version',\n /**\n * Connection string.\n */\n MESSAGING_URL: 'messaging.url',\n /**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n */\n MESSAGING_MESSAGE_ID: 'messaging.message_id',\n /**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".\n */\n MESSAGING_CONVERSATION_ID: 'messaging.conversation_id',\n /**\n * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.\n */\n MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes',\n /**\n * The compressed size of the message payload in bytes.\n */\n MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes',\n /**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n */\n MESSAGING_OPERATION: 'messaging.operation',\n /**\n * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.\n */\n MESSAGING_CONSUMER_ID: 'messaging.consumer_id',\n /**\n * RabbitMQ message routing key.\n */\n MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key',\n /**\n * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n *\n * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.\n */\n MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key',\n /**\n * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.\n */\n MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group',\n /**\n * Client Id for the Consumer or Producer that is handling the message.\n */\n MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id',\n /**\n * Partition the message is sent to.\n */\n MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition',\n /**\n * A boolean that is true if the message is a tombstone.\n */\n MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone',\n /**\n * A string identifying the remoting system.\n */\n RPC_SYSTEM: 'rpc.system',\n /**\n * The full (logical) name of the service being called, including its package name, if applicable.\n *\n * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\n */\n RPC_SERVICE: 'rpc.service',\n /**\n * The name of the (logical) method being called, must be equal to the $method part in the span name.\n *\n * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\n */\n RPC_METHOD: 'rpc.method',\n /**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\n RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code',\n /**\n * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.\n */\n RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version',\n /**\n * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\n */\n RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id',\n /**\n * `error.code` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code',\n /**\n * `error.message` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message',\n /**\n * Whether this is a received or sent message.\n */\n MESSAGE_TYPE: 'message.type',\n /**\n * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\n *\n * Note: This way we guarantee that the values will be consistent between different implementations.\n */\n MESSAGE_ID: 'message.id',\n /**\n * Compressed size of the message in bytes.\n */\n MESSAGE_COMPRESSED_SIZE: 'message.compressed_size',\n /**\n * Uncompressed size of the message in bytes.\n */\n MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size',\n};\nexports.DbSystemValues = {\n /** Some other SQL database. Fallback only. See notes. */\n OTHER_SQL: 'other_sql',\n /** Microsoft SQL Server. */\n MSSQL: 'mssql',\n /** MySQL. */\n MYSQL: 'mysql',\n /** Oracle Database. */\n ORACLE: 'oracle',\n /** IBM Db2. */\n DB2: 'db2',\n /** PostgreSQL. */\n POSTGRESQL: 'postgresql',\n /** Amazon Redshift. */\n REDSHIFT: 'redshift',\n /** Apache Hive. */\n HIVE: 'hive',\n /** Cloudscape. */\n CLOUDSCAPE: 'cloudscape',\n /** HyperSQL DataBase. */\n HSQLDB: 'hsqldb',\n /** Progress Database. */\n PROGRESS: 'progress',\n /** SAP MaxDB. */\n MAXDB: 'maxdb',\n /** SAP HANA. */\n HANADB: 'hanadb',\n /** Ingres. */\n INGRES: 'ingres',\n /** FirstSQL. */\n FIRSTSQL: 'firstsql',\n /** EnterpriseDB. */\n EDB: 'edb',\n /** InterSystems Caché. */\n CACHE: 'cache',\n /** Adabas (Adaptable Database System). */\n ADABAS: 'adabas',\n /** Firebird. */\n FIREBIRD: 'firebird',\n /** Apache Derby. */\n DERBY: 'derby',\n /** FileMaker. */\n FILEMAKER: 'filemaker',\n /** Informix. */\n INFORMIX: 'informix',\n /** InstantDB. */\n INSTANTDB: 'instantdb',\n /** InterBase. */\n INTERBASE: 'interbase',\n /** MariaDB. */\n MARIADB: 'mariadb',\n /** Netezza. */\n NETEZZA: 'netezza',\n /** Pervasive PSQL. */\n PERVASIVE: 'pervasive',\n /** PointBase. */\n POINTBASE: 'pointbase',\n /** SQLite. */\n SQLITE: 'sqlite',\n /** Sybase. */\n SYBASE: 'sybase',\n /** Teradata. */\n TERADATA: 'teradata',\n /** Vertica. */\n VERTICA: 'vertica',\n /** H2. */\n H2: 'h2',\n /** ColdFusion IMQ. */\n COLDFUSION: 'coldfusion',\n /** Apache Cassandra. */\n CASSANDRA: 'cassandra',\n /** Apache HBase. */\n HBASE: 'hbase',\n /** MongoDB. */\n MONGODB: 'mongodb',\n /** Redis. */\n REDIS: 'redis',\n /** Couchbase. */\n COUCHBASE: 'couchbase',\n /** CouchDB. */\n COUCHDB: 'couchdb',\n /** Microsoft Azure Cosmos DB. */\n COSMOSDB: 'cosmosdb',\n /** Amazon DynamoDB. */\n DYNAMODB: 'dynamodb',\n /** Neo4j. */\n NEO4J: 'neo4j',\n /** Apache Geode. */\n GEODE: 'geode',\n /** Elasticsearch. */\n ELASTICSEARCH: 'elasticsearch',\n /** Memcached. */\n MEMCACHED: 'memcached',\n /** CockroachDB. */\n COCKROACHDB: 'cockroachdb',\n};\nexports.DbCassandraConsistencyLevelValues = {\n /** all. */\n ALL: 'all',\n /** each_quorum. */\n EACH_QUORUM: 'each_quorum',\n /** quorum. */\n QUORUM: 'quorum',\n /** local_quorum. */\n LOCAL_QUORUM: 'local_quorum',\n /** one. */\n ONE: 'one',\n /** two. */\n TWO: 'two',\n /** three. */\n THREE: 'three',\n /** local_one. */\n LOCAL_ONE: 'local_one',\n /** any. */\n ANY: 'any',\n /** serial. */\n SERIAL: 'serial',\n /** local_serial. */\n LOCAL_SERIAL: 'local_serial',\n};\nexports.FaasTriggerValues = {\n /** A response to some data source operation such as a database or filesystem read/write. */\n DATASOURCE: 'datasource',\n /** To provide an answer to an inbound HTTP request. */\n HTTP: 'http',\n /** A function is set to be executed when messages are sent to a messaging system. */\n PUBSUB: 'pubsub',\n /** A function is scheduled to be executed regularly. */\n TIMER: 'timer',\n /** If none of the others apply. */\n OTHER: 'other',\n};\nexports.FaasDocumentOperationValues = {\n /** When a new object is created. */\n INSERT: 'insert',\n /** When an object is modified. */\n EDIT: 'edit',\n /** When an object is deleted. */\n DELETE: 'delete',\n};\nexports.FaasInvokedProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.NetTransportValues = {\n /** ip_tcp. */\n IP_TCP: 'ip_tcp',\n /** ip_udp. */\n IP_UDP: 'ip_udp',\n /** Another IP-based protocol. */\n IP: 'ip',\n /** Unix Domain socket. See below. */\n UNIX: 'unix',\n /** Named or anonymous pipe. See note below. */\n PIPE: 'pipe',\n /** In-process communication. */\n INPROC: 'inproc',\n /** Something else (non IP-based). */\n OTHER: 'other',\n};\nexports.NetHostConnectionTypeValues = {\n /** wifi. */\n WIFI: 'wifi',\n /** wired. */\n WIRED: 'wired',\n /** cell. */\n CELL: 'cell',\n /** unavailable. */\n UNAVAILABLE: 'unavailable',\n /** unknown. */\n UNKNOWN: 'unknown',\n};\nexports.NetHostConnectionSubtypeValues = {\n /** GPRS. */\n GPRS: 'gprs',\n /** EDGE. */\n EDGE: 'edge',\n /** UMTS. */\n UMTS: 'umts',\n /** CDMA. */\n CDMA: 'cdma',\n /** EVDO Rel. 0. */\n EVDO_0: 'evdo_0',\n /** EVDO Rev. A. */\n EVDO_A: 'evdo_a',\n /** CDMA2000 1XRTT. */\n CDMA2000_1XRTT: 'cdma2000_1xrtt',\n /** HSDPA. */\n HSDPA: 'hsdpa',\n /** HSUPA. */\n HSUPA: 'hsupa',\n /** HSPA. */\n HSPA: 'hspa',\n /** IDEN. */\n IDEN: 'iden',\n /** EVDO Rev. B. */\n EVDO_B: 'evdo_b',\n /** LTE. */\n LTE: 'lte',\n /** EHRPD. */\n EHRPD: 'ehrpd',\n /** HSPAP. */\n HSPAP: 'hspap',\n /** GSM. */\n GSM: 'gsm',\n /** TD-SCDMA. */\n TD_SCDMA: 'td_scdma',\n /** IWLAN. */\n IWLAN: 'iwlan',\n /** 5G NR (New Radio). */\n NR: 'nr',\n /** 5G NRNSA (New Radio Non-Standalone). */\n NRNSA: 'nrnsa',\n /** LTE CA. */\n LTE_CA: 'lte_ca',\n};\nexports.HttpFlavorValues = {\n /** HTTP 1.0. */\n HTTP_1_0: '1.0',\n /** HTTP 1.1. */\n HTTP_1_1: '1.1',\n /** HTTP 2. */\n HTTP_2_0: '2.0',\n /** SPDY protocol. */\n SPDY: 'SPDY',\n /** QUIC protocol. */\n QUIC: 'QUIC',\n};\nexports.MessagingDestinationKindValues = {\n /** A message sent to a queue. */\n QUEUE: 'queue',\n /** A message sent to a topic. */\n TOPIC: 'topic',\n};\nexports.MessagingOperationValues = {\n /** receive. */\n RECEIVE: 'receive',\n /** process. */\n PROCESS: 'process',\n};\nexports.RpcGrpcStatusCodeValues = {\n /** OK. */\n OK: 0,\n /** CANCELLED. */\n CANCELLED: 1,\n /** UNKNOWN. */\n UNKNOWN: 2,\n /** INVALID_ARGUMENT. */\n INVALID_ARGUMENT: 3,\n /** DEADLINE_EXCEEDED. */\n DEADLINE_EXCEEDED: 4,\n /** NOT_FOUND. */\n NOT_FOUND: 5,\n /** ALREADY_EXISTS. */\n ALREADY_EXISTS: 6,\n /** PERMISSION_DENIED. */\n PERMISSION_DENIED: 7,\n /** RESOURCE_EXHAUSTED. */\n RESOURCE_EXHAUSTED: 8,\n /** FAILED_PRECONDITION. */\n FAILED_PRECONDITION: 9,\n /** ABORTED. */\n ABORTED: 10,\n /** OUT_OF_RANGE. */\n OUT_OF_RANGE: 11,\n /** UNIMPLEMENTED. */\n UNIMPLEMENTED: 12,\n /** INTERNAL. */\n INTERNAL: 13,\n /** UNAVAILABLE. */\n UNAVAILABLE: 14,\n /** DATA_LOSS. */\n DATA_LOSS: 15,\n /** UNAUTHENTICATED. */\n UNAUTHENTICATED: 16,\n};\nexports.MessageTypeValues = {\n /** sent. */\n SENT: 'SENT',\n /** received. */\n RECEIVED: 'RECEIVED',\n};\n//# sourceMappingURL=SemanticAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPProtoExporterNodeBase = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst otlp_exporter_base_1 = require(\"@opentelemetry/otlp-exporter-base\");\n/**\n * Collector Exporter abstract base class\n */\nclass OTLPProtoExporterNodeBase extends otlp_exporter_base_1.OTLPExporterNodeBase {\n constructor(config = {}) {\n super(config);\n }\n _sendPromise(objects, onSuccess, onError) {\n const promise = new Promise((resolve, reject) => {\n this._send(this, objects, this.compression, resolve, reject);\n })\n .then(onSuccess, onError);\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n onInit(config) {\n // defer to next tick and lazy load to avoid loading protobufjs too early\n // and making this impossible to be instrumented\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { onInit } = require('./util');\n onInit(this, config);\n });\n }\n send(objects, onSuccess, onError) {\n if (this._shutdownOnce.isCalled) {\n api_1.diag.debug('Shutdown already started. Cannot send objects');\n return;\n }\n if (!this._send) {\n // defer to next tick and lazy load to avoid loading protobufjs too early\n // and making this impossible to be instrumented\n setImmediate(() => {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { send } = require('./util');\n this._send = send;\n this._sendPromise(objects, onSuccess, onError);\n });\n }\n else {\n this._sendPromise(objects, onSuccess, onError);\n }\n }\n}\nexports.OTLPProtoExporterNodeBase = OTLPProtoExporterNodeBase;\n//# sourceMappingURL=OTLPProtoExporterNodeBase.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPProtoExporterNodeBase = void 0;\nvar OTLPProtoExporterNodeBase_1 = require(\"./OTLPProtoExporterNodeBase\");\nObject.defineProperty(exports, \"OTLPProtoExporterNodeBase\", { enumerable: true, get: function () { return OTLPProtoExporterNodeBase_1.OTLPProtoExporterNodeBase; } });\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServiceClientType = void 0;\nvar ServiceClientType;\n(function (ServiceClientType) {\n ServiceClientType[ServiceClientType[\"SPANS\"] = 0] = \"SPANS\";\n ServiceClientType[ServiceClientType[\"METRICS\"] = 1] = \"METRICS\";\n})(ServiceClientType = exports.ServiceClientType || (exports.ServiceClientType = {}));\n//# sourceMappingURL=types.js.map",null,"\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Resource = void 0;\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst platform_1 = require(\"./platform\");\n/**\n * A Resource describes the entity for which a signals (metrics or trace) are\n * collected.\n */\nclass Resource {\n constructor(\n /**\n * A dictionary of attributes with string keys and values that provide\n * information about the entity as numbers, strings or booleans\n * TODO: Consider to add check/validation on attributes.\n */\n attributes) {\n this.attributes = attributes;\n }\n /**\n * Returns an empty Resource\n */\n static empty() {\n return Resource.EMPTY;\n }\n /**\n * Returns a Resource that indentifies the SDK in use.\n */\n static default() {\n return new Resource({\n [semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: (0, platform_1.defaultServiceName)(),\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]: core_1.SDK_INFO[semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME]: core_1.SDK_INFO[semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_NAME],\n [semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]: core_1.SDK_INFO[semantic_conventions_1.SemanticResourceAttributes.TELEMETRY_SDK_VERSION],\n });\n }\n /**\n * Returns a new, merged {@link Resource} by merging the current Resource\n * with the other Resource. In case of a collision, other Resource takes\n * precedence.\n *\n * @param other the Resource that will be merged with this.\n * @returns the newly merged Resource.\n */\n merge(other) {\n if (!other || !Object.keys(other.attributes).length)\n return this;\n // SpanAttributes from resource overwrite attributes from other resource.\n const mergedAttributes = Object.assign({}, this.attributes, other.attributes);\n return new Resource(mergedAttributes);\n }\n}\nexports.Resource = Resource;\nResource.EMPTY = new Resource({});\n//# sourceMappingURL=Resource.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=config.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.browserDetector = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst __1 = require(\"..\");\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector {\n async detect(config) {\n const isBrowser = typeof navigator !== 'undefined';\n if (!isBrowser) {\n return __1.Resource.empty();\n }\n const browserResource = {\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent\n };\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates process resource attribute map from process variables\n *\n * @param browserResource The un-sanitized resource attributes from process as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n _getResourceAttributes(browserResource, _config) {\n if (browserResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === '') {\n api_1.diag.debug('BrowserDetector failed: Unable to find required browser resources. ');\n return __1.Resource.empty();\n }\n else {\n return new __1.Resource(Object.assign({}, browserResource));\n }\n }\n}\nexports.browserDetector = new BrowserDetector();\n//# sourceMappingURL=BrowserDetector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.envDetector = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst Resource_1 = require(\"../Resource\");\n/**\n * EnvDetector can be used to detect the presence of and create a Resource\n * from the OTEL_RESOURCE_ATTRIBUTES environment variable.\n */\nclass EnvDetector {\n constructor() {\n // Type, attribute keys, and attribute values should not exceed 256 characters.\n this._MAX_LENGTH = 255;\n // OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of attributes.\n this._COMMA_SEPARATOR = ',';\n // OTEL_RESOURCE_ATTRIBUTES contains key value pair separated by '='.\n this._LABEL_KEY_VALUE_SPLITTER = '=';\n this._ERROR_MESSAGE_INVALID_CHARS = 'should be a ASCII string with a length greater than 0 and not exceed ' +\n this._MAX_LENGTH +\n ' characters.';\n this._ERROR_MESSAGE_INVALID_VALUE = 'should be a ASCII string with a length not exceed ' +\n this._MAX_LENGTH +\n ' characters.';\n }\n /**\n * Returns a {@link Resource} populated with attributes from the\n * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async\n * function to conform to the Detector interface.\n *\n * @param config The resource detection config\n */\n async detect(_config) {\n const attributes = {};\n const env = (0, core_1.getEnv)();\n const rawAttributes = env.OTEL_RESOURCE_ATTRIBUTES;\n const serviceName = env.OTEL_SERVICE_NAME;\n if (rawAttributes) {\n try {\n const parsedAttributes = this._parseResourceAttributes(rawAttributes);\n Object.assign(attributes, parsedAttributes);\n }\n catch (e) {\n api_1.diag.debug(`EnvDetector failed: ${e.message}`);\n }\n }\n if (serviceName) {\n attributes[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME] = serviceName;\n }\n return new Resource_1.Resource(attributes);\n }\n /**\n * Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment\n * variable.\n *\n * OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes describing\n * the source in more detail, e.g. “key1=val1,key2=val2”. Domain names and\n * paths are accepted as attribute keys. Values may be quoted or unquoted in\n * general. If a value contains whitespaces, =, or \" characters, it must\n * always be quoted.\n *\n * @param rawEnvAttributes The resource attributes as a comma-seperated list\n * of key/value pairs.\n * @returns The sanitized resource attributes.\n */\n _parseResourceAttributes(rawEnvAttributes) {\n if (!rawEnvAttributes)\n return {};\n const attributes = {};\n const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR, -1);\n for (const rawAttribute of rawAttributes) {\n const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER, -1);\n if (keyValuePair.length !== 2) {\n continue;\n }\n let [key, value] = keyValuePair;\n // Leading and trailing whitespaces are trimmed.\n key = key.trim();\n value = value.trim().split('^\"|\"$').join('');\n if (!this._isValidAndNotEmpty(key)) {\n throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);\n }\n if (!this._isValid(value)) {\n throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);\n }\n attributes[key] = value;\n }\n return attributes;\n }\n /**\n * Determines whether the given String is a valid printable ASCII string with\n * a length not exceed _MAX_LENGTH characters.\n *\n * @param str The String to be validated.\n * @returns Whether the String is valid.\n */\n _isValid(name) {\n return name.length <= this._MAX_LENGTH && this._isPrintableString(name);\n }\n _isPrintableString(str) {\n for (let i = 0; i < str.length; i++) {\n const ch = str.charAt(i);\n if (ch <= ' ' || ch >= '~') {\n return false;\n }\n }\n return true;\n }\n /**\n * Determines whether the given String is a valid printable ASCII string with\n * a length greater than 0 and not exceed _MAX_LENGTH characters.\n *\n * @param str The String to be validated.\n * @returns Whether the String is valid and not empty.\n */\n _isValidAndNotEmpty(str) {\n return str.length > 0 && this._isValid(str);\n }\n}\nexports.envDetector = new EnvDetector();\n//# sourceMappingURL=EnvDetector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.processDetector = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst Resource_1 = require(\"../Resource\");\n/**\n * ProcessDetector will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetector {\n async detect(config) {\n // Skip if not in Node.js environment.\n if (typeof process !== 'object') {\n return Resource_1.Resource.empty();\n }\n const processResource = {\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_PID]: process.pid,\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title || '',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND]: process.argv[1] || '',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND_LINE]: process.argv.join(' ') || '',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: process.versions.node,\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',\n [semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',\n };\n return this._getResourceAttributes(processResource, config);\n }\n /**\n * Validates process resource attribute map from process varaibls\n *\n * @param processResource The unsantized resource attributes from process as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n _getResourceAttributes(processResource, _config) {\n if (processResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME] ===\n '' ||\n processResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH] ===\n '' ||\n processResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND] === '' ||\n processResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND_LINE] === '' ||\n processResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === '') {\n api_1.diag.debug('ProcessDetector failed: Unable to find required process resources. ');\n return Resource_1.Resource.empty();\n }\n else {\n return new Resource_1.Resource(Object.assign({}, processResource));\n }\n }\n}\nexports.processDetector = new ProcessDetector();\n//# sourceMappingURL=ProcessDetector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./BrowserDetector\"), exports);\n__exportStar(require(\"./EnvDetector\"), exports);\n__exportStar(require(\"./ProcessDetector\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./Resource\"), exports);\n__exportStar(require(\"./platform\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./config\"), exports);\n__exportStar(require(\"./detectors\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hostDetector = void 0;\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst Resource_1 = require(\"../../Resource\");\nconst os_1 = require(\"os\");\n/**\n * HostDetector detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetector {\n async detect(_config) {\n const attributes = {\n [semantic_conventions_1.SemanticResourceAttributes.HOST_NAME]: (0, os_1.hostname)(),\n [semantic_conventions_1.SemanticResourceAttributes.HOST_ARCH]: this._normalizeArch((0, os_1.arch)()),\n };\n return new Resource_1.Resource(attributes);\n }\n _normalizeArch(nodeArchString) {\n // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md\n switch (nodeArchString) {\n case 'arm':\n return 'arm32';\n case 'ppc':\n return 'ppc32';\n case 'x64':\n return 'amd64';\n default:\n return nodeArchString;\n }\n }\n}\nexports.hostDetector = new HostDetector();\n//# sourceMappingURL=HostDetector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.osDetector = void 0;\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst Resource_1 = require(\"../../Resource\");\nconst os_1 = require(\"os\");\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector {\n async detect(_config) {\n const attributes = {\n [semantic_conventions_1.SemanticResourceAttributes.OS_TYPE]: this._normalizeType((0, os_1.platform)()),\n [semantic_conventions_1.SemanticResourceAttributes.OS_VERSION]: (0, os_1.release)(),\n };\n return new Resource_1.Resource(attributes);\n }\n _normalizeType(nodePlatform) {\n // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md\n switch (nodePlatform) {\n case 'sunos':\n return 'solaris';\n case 'win32':\n return 'windows';\n default:\n return nodePlatform;\n }\n }\n}\nexports.osDetector = new OSDetector();\n//# sourceMappingURL=OSDetector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultServiceName = void 0;\nfunction defaultServiceName() {\n return `unknown_service:${process.argv0}`;\n}\nexports.defaultServiceName = defaultServiceName;\n//# sourceMappingURL=default-service-name.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectResources = void 0;\nconst Resource_1 = require(\"../../Resource\");\nconst api_1 = require(\"@opentelemetry/api\");\nconst util = require(\"util\");\n/**\n * Runs all resource detectors and returns the results merged into a single\n * Resource.\n *\n * @param config Configuration for resource detection\n */\nconst detectResources = async (config = {}) => {\n const internalConfig = Object.assign(config);\n const resources = await Promise.all((internalConfig.detectors || []).map(async (d) => {\n try {\n const resource = await d.detect(internalConfig);\n api_1.diag.debug(`${d.constructor.name} found resource.`, resource);\n return resource;\n }\n catch (e) {\n api_1.diag.debug(`${d.constructor.name} failed: ${e.message}`);\n return Resource_1.Resource.empty();\n }\n }));\n // Future check if verbose logging is enabled issue #1903\n logResources(resources);\n return resources.reduce((acc, resource) => acc.merge(resource), Resource_1.Resource.empty());\n};\nexports.detectResources = detectResources;\n/**\n * Writes debug information about the detected resources to the logger defined in the resource detection config, if one is provided.\n *\n * @param resources The array of {@link Resource} that should be logged. Empty entries will be ignored.\n */\nconst logResources = (resources) => {\n resources.forEach(resource => {\n // Print only populated resources\n if (Object.keys(resource.attributes).length > 0) {\n const resourceDebugString = util.inspect(resource.attributes, {\n depth: 2,\n breakLength: Infinity,\n sorted: true,\n compact: false,\n });\n api_1.diag.verbose(resourceDebugString);\n }\n });\n};\n//# sourceMappingURL=detect-resources.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./default-service-name\"), exports);\n__exportStar(require(\"./detect-resources\"), exports);\n__exportStar(require(\"./HostDetector\"), exports);\n__exportStar(require(\"./OSDetector\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BasicTracerProvider = exports.ForceFlushState = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst resources_1 = require(\"@opentelemetry/resources\");\nconst _1 = require(\".\");\nconst config_1 = require(\"./config\");\nconst MultiSpanProcessor_1 = require(\"./MultiSpanProcessor\");\nconst NoopSpanProcessor_1 = require(\"./export/NoopSpanProcessor\");\nconst platform_1 = require(\"./platform\");\nconst utility_1 = require(\"./utility\");\nvar ForceFlushState;\n(function (ForceFlushState) {\n ForceFlushState[ForceFlushState[\"resolved\"] = 0] = \"resolved\";\n ForceFlushState[ForceFlushState[\"timeout\"] = 1] = \"timeout\";\n ForceFlushState[ForceFlushState[\"error\"] = 2] = \"error\";\n ForceFlushState[ForceFlushState[\"unresolved\"] = 3] = \"unresolved\";\n})(ForceFlushState = exports.ForceFlushState || (exports.ForceFlushState = {}));\n/**\n * This class represents a basic tracer provider which platform libraries can extend\n */\nclass BasicTracerProvider {\n constructor(config = {}) {\n var _a;\n this._registeredSpanProcessors = [];\n this._tracers = new Map();\n const mergedConfig = (0, core_1.merge)({}, config_1.DEFAULT_CONFIG, (0, utility_1.reconfigureLimits)(config));\n this.resource = (_a = mergedConfig.resource) !== null && _a !== void 0 ? _a : resources_1.Resource.empty();\n this.resource = resources_1.Resource.default().merge(this.resource);\n this._config = Object.assign({}, mergedConfig, {\n resource: this.resource,\n });\n const defaultExporter = this._buildExporterFromEnv();\n if (defaultExporter !== undefined) {\n const batchProcessor = new platform_1.BatchSpanProcessor(defaultExporter);\n this.activeSpanProcessor = batchProcessor;\n }\n else {\n this.activeSpanProcessor = new NoopSpanProcessor_1.NoopSpanProcessor();\n }\n }\n getTracer(name, version, options) {\n const key = `${name}@${version || ''}:${(options === null || options === void 0 ? void 0 : options.schemaUrl) || ''}`;\n if (!this._tracers.has(key)) {\n this._tracers.set(key, new _1.Tracer({ name, version, schemaUrl: options === null || options === void 0 ? void 0 : options.schemaUrl }, this._config, this));\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this._tracers.get(key);\n }\n /**\n * Adds a new {@link SpanProcessor} to this tracer.\n * @param spanProcessor the new SpanProcessor to be added.\n */\n addSpanProcessor(spanProcessor) {\n if (this._registeredSpanProcessors.length === 0) {\n // since we might have enabled by default a batchProcessor, we disable it\n // before adding the new one\n this.activeSpanProcessor\n .shutdown()\n .catch(err => api_1.diag.error('Error while trying to shutdown current span processor', err));\n }\n this._registeredSpanProcessors.push(spanProcessor);\n this.activeSpanProcessor = new MultiSpanProcessor_1.MultiSpanProcessor(this._registeredSpanProcessors);\n }\n getActiveSpanProcessor() {\n return this.activeSpanProcessor;\n }\n /**\n * Register this TracerProvider for use with the OpenTelemetry API.\n * Undefined values may be replaced with defaults, and\n * null values will be skipped.\n *\n * @param config Configuration object for SDK registration\n */\n register(config = {}) {\n api_1.trace.setGlobalTracerProvider(this);\n if (config.propagator === undefined) {\n config.propagator = this._buildPropagatorFromEnv();\n }\n if (config.contextManager) {\n api_1.context.setGlobalContextManager(config.contextManager);\n }\n if (config.propagator) {\n api_1.propagation.setGlobalPropagator(config.propagator);\n }\n }\n forceFlush() {\n const timeout = this._config.forceFlushTimeoutMillis;\n const promises = this._registeredSpanProcessors.map((spanProcessor) => {\n return new Promise(resolve => {\n let state;\n const timeoutInterval = setTimeout(() => {\n resolve(new Error(`Span processor did not completed within timeout period of ${timeout} ms`));\n state = ForceFlushState.timeout;\n }, timeout);\n spanProcessor\n .forceFlush()\n .then(() => {\n clearTimeout(timeoutInterval);\n if (state !== ForceFlushState.timeout) {\n state = ForceFlushState.resolved;\n resolve(state);\n }\n })\n .catch(error => {\n clearTimeout(timeoutInterval);\n state = ForceFlushState.error;\n resolve(error);\n });\n });\n });\n return new Promise((resolve, reject) => {\n Promise.all(promises)\n .then(results => {\n const errors = results.filter(result => result !== ForceFlushState.resolved);\n if (errors.length > 0) {\n reject(errors);\n }\n else {\n resolve();\n }\n })\n .catch(error => reject([error]));\n });\n }\n shutdown() {\n return this.activeSpanProcessor.shutdown();\n }\n _getPropagator(name) {\n var _a;\n return (_a = BasicTracerProvider._registeredPropagators.get(name)) === null || _a === void 0 ? void 0 : _a();\n }\n _getSpanExporter(name) {\n var _a;\n return (_a = BasicTracerProvider._registeredExporters.get(name)) === null || _a === void 0 ? void 0 : _a();\n }\n _buildPropagatorFromEnv() {\n // per spec, propagators from env must be deduplicated\n const uniquePropagatorNames = Array.from(new Set((0, core_1.getEnv)().OTEL_PROPAGATORS));\n const propagators = uniquePropagatorNames.map(name => {\n const propagator = this._getPropagator(name);\n if (!propagator) {\n api_1.diag.warn(`Propagator \"${name}\" requested through environment variable is unavailable.`);\n }\n return propagator;\n });\n const validPropagators = propagators.reduce((list, item) => {\n if (item) {\n list.push(item);\n }\n return list;\n }, []);\n if (validPropagators.length === 0) {\n return;\n }\n else if (uniquePropagatorNames.length === 1) {\n return validPropagators[0];\n }\n else {\n return new core_1.CompositePropagator({\n propagators: validPropagators,\n });\n }\n }\n _buildExporterFromEnv() {\n const exporterName = (0, core_1.getEnv)().OTEL_TRACES_EXPORTER;\n if (exporterName === 'none')\n return;\n const exporter = this._getSpanExporter(exporterName);\n if (!exporter) {\n api_1.diag.error(`Exporter \"${exporterName}\" requested through environment variable is unavailable.`);\n }\n return exporter;\n }\n}\nexports.BasicTracerProvider = BasicTracerProvider;\nBasicTracerProvider._registeredPropagators = new Map([\n ['tracecontext', () => new core_1.W3CTraceContextPropagator()],\n ['baggage', () => new core_1.W3CBaggagePropagator()],\n]);\nBasicTracerProvider._registeredExporters = new Map();\n//# sourceMappingURL=BasicTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MultiSpanProcessor = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * Implementation of the {@link SpanProcessor} that simply forwards all\n * received events to a list of {@link SpanProcessor}s.\n */\nclass MultiSpanProcessor {\n constructor(_spanProcessors) {\n this._spanProcessors = _spanProcessors;\n }\n forceFlush() {\n const promises = [];\n for (const spanProcessor of this._spanProcessors) {\n promises.push(spanProcessor.forceFlush());\n }\n return new Promise(resolve => {\n Promise.all(promises)\n .then(() => {\n resolve();\n })\n .catch(error => {\n (0, core_1.globalErrorHandler)(error || new Error('MultiSpanProcessor: forceFlush failed'));\n resolve();\n });\n });\n }\n onStart(span, context) {\n for (const spanProcessor of this._spanProcessors) {\n spanProcessor.onStart(span, context);\n }\n }\n onEnd(span) {\n for (const spanProcessor of this._spanProcessors) {\n spanProcessor.onEnd(span);\n }\n }\n shutdown() {\n const promises = [];\n for (const spanProcessor of this._spanProcessors) {\n promises.push(spanProcessor.shutdown());\n }\n return new Promise((resolve, reject) => {\n Promise.all(promises).then(() => {\n resolve();\n }, reject);\n });\n }\n}\nexports.MultiSpanProcessor = MultiSpanProcessor;\n//# sourceMappingURL=MultiSpanProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Span = void 0;\nconst api = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst enums_1 = require(\"./enums\");\n/**\n * This class represents a span.\n */\nclass Span {\n /** Constructs a new Span instance. */\n constructor(parentTracer, context, spanName, spanContext, kind, parentSpanId, links = [], startTime = (0, core_1.hrTime)()) {\n this.attributes = {};\n this.links = [];\n this.events = [];\n this.status = {\n code: api.SpanStatusCode.UNSET,\n };\n this.endTime = [0, 0];\n this._ended = false;\n this._duration = [-1, -1];\n this.name = spanName;\n this._spanContext = spanContext;\n this.parentSpanId = parentSpanId;\n this.kind = kind;\n this.links = links;\n this.startTime = (0, core_1.timeInputToHrTime)(startTime);\n this.resource = parentTracer.resource;\n this.instrumentationLibrary = parentTracer.instrumentationLibrary;\n this._spanLimits = parentTracer.getSpanLimits();\n this._spanProcessor = parentTracer.getActiveSpanProcessor();\n this._spanProcessor.onStart(this, context);\n this._attributeValueLengthLimit = this._spanLimits.attributeValueLengthLimit || 0;\n }\n spanContext() {\n return this._spanContext;\n }\n setAttribute(key, value) {\n if (value == null || this._isSpanEnded())\n return this;\n if (key.length === 0) {\n api.diag.warn(`Invalid attribute key: ${key}`);\n return this;\n }\n if (!(0, core_1.isAttributeValue)(value)) {\n api.diag.warn(`Invalid attribute value set for key: ${key}`);\n return this;\n }\n if (Object.keys(this.attributes).length >=\n this._spanLimits.attributeCountLimit &&\n !Object.prototype.hasOwnProperty.call(this.attributes, key)) {\n return this;\n }\n this.attributes[key] = this._truncateToSize(value);\n return this;\n }\n setAttributes(attributes) {\n for (const [k, v] of Object.entries(attributes)) {\n this.setAttribute(k, v);\n }\n return this;\n }\n /**\n *\n * @param name Span Name\n * @param [attributesOrStartTime] Span attributes or start time\n * if type is {@type TimeInput} and 3rd param is undefined\n * @param [startTime] Specified start time for the event\n */\n addEvent(name, attributesOrStartTime, startTime) {\n if (this._isSpanEnded())\n return this;\n if (this._spanLimits.eventCountLimit === 0) {\n api.diag.warn('No events allowed.');\n return this;\n }\n if (this.events.length >= this._spanLimits.eventCountLimit) {\n api.diag.warn('Dropping extra events.');\n this.events.shift();\n }\n if ((0, core_1.isTimeInput)(attributesOrStartTime)) {\n if (typeof startTime === 'undefined') {\n startTime = attributesOrStartTime;\n }\n attributesOrStartTime = undefined;\n }\n if (typeof startTime === 'undefined') {\n startTime = (0, core_1.hrTime)();\n }\n const attributes = (0, core_1.sanitizeAttributes)(attributesOrStartTime);\n this.events.push({\n name,\n attributes,\n time: (0, core_1.timeInputToHrTime)(startTime),\n });\n return this;\n }\n setStatus(status) {\n if (this._isSpanEnded())\n return this;\n this.status = status;\n return this;\n }\n updateName(name) {\n if (this._isSpanEnded())\n return this;\n this.name = name;\n return this;\n }\n end(endTime = (0, core_1.hrTime)()) {\n if (this._isSpanEnded()) {\n api.diag.error('You can only call end() on a span once.');\n return;\n }\n this._ended = true;\n this.endTime = (0, core_1.timeInputToHrTime)(endTime);\n this._duration = (0, core_1.hrTimeDuration)(this.startTime, this.endTime);\n if (this._duration[0] < 0) {\n api.diag.warn('Inconsistent start and end time, startTime > endTime', this.startTime, this.endTime);\n }\n this._spanProcessor.onEnd(this);\n }\n isRecording() {\n return this._ended === false;\n }\n recordException(exception, time = (0, core_1.hrTime)()) {\n const attributes = {};\n if (typeof exception === 'string') {\n attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_MESSAGE] = exception;\n }\n else if (exception) {\n if (exception.code) {\n attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_TYPE] = exception.code.toString();\n }\n else if (exception.name) {\n attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_TYPE] = exception.name;\n }\n if (exception.message) {\n attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_MESSAGE] = exception.message;\n }\n if (exception.stack) {\n attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_STACKTRACE] = exception.stack;\n }\n }\n // these are minimum requirements from spec\n if (attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_TYPE] ||\n attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_MESSAGE]) {\n this.addEvent(enums_1.ExceptionEventName, attributes, time);\n }\n else {\n api.diag.warn(`Failed to record an exception ${exception}`);\n }\n }\n get duration() {\n return this._duration;\n }\n get ended() {\n return this._ended;\n }\n _isSpanEnded() {\n if (this._ended) {\n api.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);\n }\n return this._ended;\n }\n // Utility function to truncate given value within size\n // for value type of string, will truncate to given limit\n // for type of non-string, will return same value\n _truncateToLimitUtil(value, limit) {\n if (value.length <= limit) {\n return value;\n }\n return value.substr(0, limit);\n }\n /**\n * If the given attribute value is of type string and has more characters than given {@code attributeValueLengthLimit} then\n * return string with trucated to {@code attributeValueLengthLimit} characters\n *\n * If the given attribute value is array of strings then\n * return new array of strings with each element truncated to {@code attributeValueLengthLimit} characters\n *\n * Otherwise return same Attribute {@code value}\n *\n * @param value Attribute value\n * @returns truncated attribute value if required, otherwise same value\n */\n _truncateToSize(value) {\n const limit = this._attributeValueLengthLimit;\n // Check limit\n if (limit <= 0) {\n // Negative values are invalid, so do not truncate\n api.diag.warn(`Attribute value limit must be positive, got ${limit}`);\n return value;\n }\n // String\n if (typeof value === 'string') {\n return this._truncateToLimitUtil(value, limit);\n }\n // Array of strings\n if (Array.isArray(value)) {\n return value.map(val => typeof val === 'string' ? this._truncateToLimitUtil(val, limit) : val);\n }\n // Other types, no need to apply value length limit\n return value;\n }\n}\nexports.Span = Span;\n//# sourceMappingURL=Span.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=SpanProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=TimedEvent.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Tracer = void 0;\nconst api = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst Span_1 = require(\"./Span\");\nconst utility_1 = require(\"./utility\");\n/**\n * This class represents a basic tracer.\n */\nclass Tracer {\n /**\n * Constructs a new Tracer instance.\n */\n constructor(instrumentationLibrary, config, _tracerProvider) {\n this._tracerProvider = _tracerProvider;\n const localConfig = (0, utility_1.mergeConfig)(config);\n this._sampler = localConfig.sampler;\n this._generalLimits = localConfig.generalLimits;\n this._spanLimits = localConfig.spanLimits;\n this._idGenerator = config.idGenerator || new core_1.RandomIdGenerator();\n this.resource = _tracerProvider.resource;\n this.instrumentationLibrary = instrumentationLibrary;\n }\n /**\n * Starts a new Span or returns the default NoopSpan based on the sampling\n * decision.\n */\n startSpan(name, options = {}, context = api.context.active()) {\n var _a, _b;\n if ((0, core_1.isTracingSuppressed)(context)) {\n api.diag.debug('Instrumentation suppressed, returning Noop Span');\n return api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);\n }\n // remove span from context in case a root span is requested via options\n if (options.root) {\n context = api.trace.deleteSpan(context);\n }\n const parentSpanContext = api.trace.getSpanContext(context);\n const spanId = this._idGenerator.generateSpanId();\n let traceId;\n let traceState;\n let parentSpanId;\n if (!parentSpanContext || !api.trace.isSpanContextValid(parentSpanContext)) {\n // New root span.\n traceId = this._idGenerator.generateTraceId();\n }\n else {\n // New child span.\n traceId = parentSpanContext.traceId;\n traceState = parentSpanContext.traceState;\n parentSpanId = parentSpanContext.spanId;\n }\n const spanKind = (_a = options.kind) !== null && _a !== void 0 ? _a : api.SpanKind.INTERNAL;\n const links = ((_b = options.links) !== null && _b !== void 0 ? _b : []).map(link => {\n return {\n context: link.context,\n attributes: (0, core_1.sanitizeAttributes)(link.attributes),\n };\n });\n const attributes = (0, core_1.sanitizeAttributes)(options.attributes);\n // make sampling decision\n const samplingResult = this._sampler.shouldSample(context, traceId, name, spanKind, attributes, links);\n const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED\n ? api.TraceFlags.SAMPLED\n : api.TraceFlags.NONE;\n const spanContext = { traceId, spanId, traceFlags, traceState };\n if (samplingResult.decision === api.SamplingDecision.NOT_RECORD) {\n api.diag.debug('Recording is off, propagating context in a non-recording span');\n return api.trace.wrapSpanContext(spanContext);\n }\n const span = new Span_1.Span(this, context, name, spanContext, spanKind, parentSpanId, links, options.startTime);\n // Set initial span attributes. The attributes object may have been mutated\n // by the sampler, so we sanitize the merged attributes before setting them.\n const initAttributes = (0, core_1.sanitizeAttributes)(Object.assign(attributes, samplingResult.attributes));\n span.setAttributes(initAttributes);\n return span;\n }\n startActiveSpan(name, arg2, arg3, arg4) {\n let opts;\n let ctx;\n let fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n const parentContext = ctx !== null && ctx !== void 0 ? ctx : api.context.active();\n const span = this.startSpan(name, opts, parentContext);\n const contextWithSpanSet = api.trace.setSpan(parentContext, span);\n return api.context.with(contextWithSpanSet, fn, undefined, span);\n }\n /** Returns the active {@link GeneralLimits}. */\n getGeneralLimits() {\n return this._generalLimits;\n }\n /** Returns the active {@link SpanLimits}. */\n getSpanLimits() {\n return this._spanLimits;\n }\n getActiveSpanProcessor() {\n return this._tracerProvider.getActiveSpanProcessor();\n }\n}\nexports.Tracer = Tracer;\n//# sourceMappingURL=Tracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildSamplerFromEnv = exports.DEFAULT_CONFIG = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst env = (0, core_1.getEnv)();\nconst FALLBACK_OTEL_TRACES_SAMPLER = core_1.TracesSamplerValues.AlwaysOn;\nconst DEFAULT_RATIO = 1;\n/**\n * Default configuration. For fields with primitive values, any user-provided\n * value will override the corresponding default value. For fields with\n * non-primitive values (like `spanLimits`), the user-provided value will be\n * used to extend the default value.\n */\nexports.DEFAULT_CONFIG = {\n sampler: buildSamplerFromEnv(env),\n forceFlushTimeoutMillis: 30000,\n generalLimits: {\n attributeValueLengthLimit: (0, core_1.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n attributeCountLimit: (0, core_1.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT,\n },\n spanLimits: {\n attributeValueLengthLimit: (0, core_1.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n attributeCountLimit: (0, core_1.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,\n linkCountLimit: (0, core_1.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,\n eventCountLimit: (0, core_1.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,\n },\n};\n/**\n * Based on environment, builds a sampler, complies with specification.\n * @param environment optional, by default uses getEnv(), but allows passing a value to reuse parsed environment\n */\nfunction buildSamplerFromEnv(environment = (0, core_1.getEnv)()) {\n switch (environment.OTEL_TRACES_SAMPLER) {\n case core_1.TracesSamplerValues.AlwaysOn:\n return new core_1.AlwaysOnSampler();\n case core_1.TracesSamplerValues.AlwaysOff:\n return new core_1.AlwaysOffSampler();\n case core_1.TracesSamplerValues.ParentBasedAlwaysOn:\n return new core_1.ParentBasedSampler({\n root: new core_1.AlwaysOnSampler(),\n });\n case core_1.TracesSamplerValues.ParentBasedAlwaysOff:\n return new core_1.ParentBasedSampler({\n root: new core_1.AlwaysOffSampler(),\n });\n case core_1.TracesSamplerValues.TraceIdRatio:\n return new core_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment));\n case core_1.TracesSamplerValues.ParentBasedTraceIdRatio:\n return new core_1.ParentBasedSampler({\n root: new core_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment)),\n });\n default:\n api_1.diag.error(`OTEL_TRACES_SAMPLER value \"${environment.OTEL_TRACES_SAMPLER} invalid, defaulting to ${FALLBACK_OTEL_TRACES_SAMPLER}\".`);\n return new core_1.AlwaysOnSampler();\n }\n}\nexports.buildSamplerFromEnv = buildSamplerFromEnv;\nfunction getSamplerProbabilityFromEnv(environment) {\n if (environment.OTEL_TRACES_SAMPLER_ARG === undefined ||\n environment.OTEL_TRACES_SAMPLER_ARG === '') {\n api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${DEFAULT_RATIO}.`);\n return DEFAULT_RATIO;\n }\n const probability = Number(environment.OTEL_TRACES_SAMPLER_ARG);\n if (isNaN(probability)) {\n api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG=${environment.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${DEFAULT_RATIO}.`);\n return DEFAULT_RATIO;\n }\n if (probability < 0 || probability > 1) {\n api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG=${environment.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${DEFAULT_RATIO}.`);\n return DEFAULT_RATIO;\n }\n return probability;\n}\n//# sourceMappingURL=config.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExceptionEventName = void 0;\n// Event name definitions\nexports.ExceptionEventName = 'exception';\n//# sourceMappingURL=enums.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BatchSpanProcessorBase = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * Implementation of the {@link SpanProcessor} that batches spans exported by\n * the SDK then pushes them to the exporter pipeline.\n */\nclass BatchSpanProcessorBase {\n constructor(_exporter, config) {\n this._exporter = _exporter;\n this._finishedSpans = [];\n const env = (0, core_1.getEnv)();\n this._maxExportBatchSize =\n typeof (config === null || config === void 0 ? void 0 : config.maxExportBatchSize) === 'number'\n ? config.maxExportBatchSize\n : env.OTEL_BSP_MAX_EXPORT_BATCH_SIZE;\n this._maxQueueSize =\n typeof (config === null || config === void 0 ? void 0 : config.maxQueueSize) === 'number'\n ? config.maxQueueSize\n : env.OTEL_BSP_MAX_QUEUE_SIZE;\n this._scheduledDelayMillis =\n typeof (config === null || config === void 0 ? void 0 : config.scheduledDelayMillis) === 'number'\n ? config.scheduledDelayMillis\n : env.OTEL_BSP_SCHEDULE_DELAY;\n this._exportTimeoutMillis =\n typeof (config === null || config === void 0 ? void 0 : config.exportTimeoutMillis) === 'number'\n ? config.exportTimeoutMillis\n : env.OTEL_BSP_EXPORT_TIMEOUT;\n this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);\n }\n forceFlush() {\n if (this._shutdownOnce.isCalled) {\n return this._shutdownOnce.promise;\n }\n return this._flushAll();\n }\n // does nothing.\n onStart(_span, _parentContext) { }\n onEnd(span) {\n if (this._shutdownOnce.isCalled) {\n return;\n }\n if ((span.spanContext().traceFlags & api_1.TraceFlags.SAMPLED) === 0) {\n return;\n }\n this._addToBuffer(span);\n }\n shutdown() {\n return this._shutdownOnce.call();\n }\n _shutdown() {\n return Promise.resolve()\n .then(() => {\n return this.onShutdown();\n })\n .then(() => {\n return this._flushAll();\n })\n .then(() => {\n return this._exporter.shutdown();\n });\n }\n /** Add a span in the buffer. */\n _addToBuffer(span) {\n if (this._finishedSpans.length >= this._maxQueueSize) {\n // limit reached, drop span\n return;\n }\n this._finishedSpans.push(span);\n this._maybeStartTimer();\n }\n /**\n * Send all spans to the exporter respecting the batch size limit\n * This function is used only on forceFlush or shutdown,\n * for all other cases _flush should be used\n * */\n _flushAll() {\n return new Promise((resolve, reject) => {\n const promises = [];\n // calculate number of batches\n const count = Math.ceil(this._finishedSpans.length / this._maxExportBatchSize);\n for (let i = 0, j = count; i < j; i++) {\n promises.push(this._flushOneBatch());\n }\n Promise.all(promises)\n .then(() => {\n resolve();\n })\n .catch(reject);\n });\n }\n _flushOneBatch() {\n this._clearTimer();\n if (this._finishedSpans.length === 0) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const timer = setTimeout(() => {\n // don't wait anymore for export, this way the next batch can start\n reject(new Error('Timeout'));\n }, this._exportTimeoutMillis);\n // prevent downstream exporter calls from generating spans\n api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => {\n // Reset the finished spans buffer here because the next invocations of the _flush method\n // could pass the same finished spans to the exporter if the buffer is cleared\n // outside of the execution of this callback.\n this._exporter.export(this._finishedSpans.splice(0, this._maxExportBatchSize), result => {\n var _a;\n clearTimeout(timer);\n if (result.code === core_1.ExportResultCode.SUCCESS) {\n resolve();\n }\n else {\n reject((_a = result.error) !== null && _a !== void 0 ? _a : new Error('BatchSpanProcessor: span export failed'));\n }\n });\n });\n });\n }\n _maybeStartTimer() {\n if (this._timer !== undefined)\n return;\n this._timer = setTimeout(() => {\n this._flushOneBatch()\n .then(() => {\n if (this._finishedSpans.length > 0) {\n this._clearTimer();\n this._maybeStartTimer();\n }\n })\n .catch(e => {\n (0, core_1.globalErrorHandler)(e);\n });\n }, this._scheduledDelayMillis);\n (0, core_1.unrefTimer)(this._timer);\n }\n _clearTimer() {\n if (this._timer !== undefined) {\n clearTimeout(this._timer);\n this._timer = undefined;\n }\n }\n}\nexports.BatchSpanProcessorBase = BatchSpanProcessorBase;\n//# sourceMappingURL=BatchSpanProcessorBase.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConsoleSpanExporter = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * This is implementation of {@link SpanExporter} that prints spans to the\n * console. This class can be used for diagnostic purposes.\n */\n/* eslint-disable no-console */\nclass ConsoleSpanExporter {\n /**\n * Export spans.\n * @param spans\n * @param resultCallback\n */\n export(spans, resultCallback) {\n return this._sendSpans(spans, resultCallback);\n }\n /**\n * Shutdown the exporter.\n */\n shutdown() {\n this._sendSpans([]);\n return Promise.resolve();\n }\n /**\n * converts span info into more readable format\n * @param span\n */\n _exportInfo(span) {\n return {\n traceId: span.spanContext().traceId,\n parentId: span.parentSpanId,\n name: span.name,\n id: span.spanContext().spanId,\n kind: span.kind,\n timestamp: (0, core_1.hrTimeToMicroseconds)(span.startTime),\n duration: (0, core_1.hrTimeToMicroseconds)(span.duration),\n attributes: span.attributes,\n status: span.status,\n events: span.events,\n links: span.links\n };\n }\n /**\n * Showing spans in console\n * @param spans\n * @param done\n */\n _sendSpans(spans, done) {\n for (const span of spans) {\n console.dir(this._exportInfo(span), { depth: 3 });\n }\n if (done) {\n return done({ code: core_1.ExportResultCode.SUCCESS });\n }\n }\n}\nexports.ConsoleSpanExporter = ConsoleSpanExporter;\n//# sourceMappingURL=ConsoleSpanExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InMemorySpanExporter = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * This class can be used for testing purposes. It stores the exported spans\n * in a list in memory that can be retrieved using the `getFinishedSpans()`\n * method.\n */\nclass InMemorySpanExporter {\n constructor() {\n this._finishedSpans = [];\n /**\n * Indicates if the exporter has been \"shutdown.\"\n * When false, exported spans will not be stored in-memory.\n */\n this._stopped = false;\n }\n export(spans, resultCallback) {\n if (this._stopped)\n return resultCallback({\n code: core_1.ExportResultCode.FAILED,\n error: new Error('Exporter has been stopped'),\n });\n this._finishedSpans.push(...spans);\n setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0);\n }\n shutdown() {\n this._stopped = true;\n this._finishedSpans = [];\n return Promise.resolve();\n }\n reset() {\n this._finishedSpans = [];\n }\n getFinishedSpans() {\n return this._finishedSpans;\n }\n}\nexports.InMemorySpanExporter = InMemorySpanExporter;\n//# sourceMappingURL=InMemorySpanExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopSpanProcessor = void 0;\n/** No-op implementation of SpanProcessor */\nclass NoopSpanProcessor {\n onStart(_span, _context) { }\n onEnd(_span) { }\n shutdown() {\n return Promise.resolve();\n }\n forceFlush() {\n return Promise.resolve();\n }\n}\nexports.NoopSpanProcessor = NoopSpanProcessor;\n//# sourceMappingURL=NoopSpanProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=ReadableSpan.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleSpanProcessor = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * An implementation of the {@link SpanProcessor} that converts the {@link Span}\n * to {@link ReadableSpan} and passes it to the configured exporter.\n *\n * Only spans that are sampled are converted.\n */\nclass SimpleSpanProcessor {\n constructor(_exporter) {\n this._exporter = _exporter;\n this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);\n }\n forceFlush() {\n // do nothing as all spans are being exported without waiting\n return Promise.resolve();\n }\n // does nothing.\n onStart(_span, _parentContext) { }\n onEnd(span) {\n if (this._shutdownOnce.isCalled) {\n return;\n }\n if ((span.spanContext().traceFlags & api_1.TraceFlags.SAMPLED) === 0) {\n return;\n }\n // prevent downstream exporter calls from generating spans\n api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => {\n this._exporter.export([span], result => {\n var _a;\n if (result.code !== core_1.ExportResultCode.SUCCESS) {\n (0, core_1.globalErrorHandler)((_a = result.error) !== null && _a !== void 0 ? _a : new Error(`SimpleSpanProcessor: span export failed (status ${result})`));\n }\n });\n });\n }\n shutdown() {\n return this._shutdownOnce.call();\n }\n _shutdown() {\n return this._exporter.shutdown();\n }\n}\nexports.SimpleSpanProcessor = SimpleSpanProcessor;\n//# sourceMappingURL=SimpleSpanProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=SpanExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./Tracer\"), exports);\n__exportStar(require(\"./BasicTracerProvider\"), exports);\n__exportStar(require(\"./platform\"), exports);\n__exportStar(require(\"./export/ConsoleSpanExporter\"), exports);\n__exportStar(require(\"./export/InMemorySpanExporter\"), exports);\n__exportStar(require(\"./export/ReadableSpan\"), exports);\n__exportStar(require(\"./export/SimpleSpanProcessor\"), exports);\n__exportStar(require(\"./export/SpanExporter\"), exports);\n__exportStar(require(\"./export/NoopSpanProcessor\"), exports);\n__exportStar(require(\"./Span\"), exports);\n__exportStar(require(\"./SpanProcessor\"), exports);\n__exportStar(require(\"./TimedEvent\"), exports);\n__exportStar(require(\"./types\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BatchSpanProcessor = void 0;\nconst BatchSpanProcessorBase_1 = require(\"../../../export/BatchSpanProcessorBase\");\nclass BatchSpanProcessor extends BatchSpanProcessorBase_1.BatchSpanProcessorBase {\n onShutdown() { }\n}\nexports.BatchSpanProcessor = BatchSpanProcessor;\n//# sourceMappingURL=BatchSpanProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./export/BatchSpanProcessor\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reconfigureLimits = exports.mergeConfig = void 0;\nconst config_1 = require(\"./config\");\n/**\n * Function to merge Default configuration (as specified in './config') with\n * user provided configurations.\n */\nfunction mergeConfig(userConfig) {\n const perInstanceDefaults = {\n sampler: (0, config_1.buildSamplerFromEnv)(),\n };\n const target = Object.assign({}, config_1.DEFAULT_CONFIG, perInstanceDefaults, userConfig);\n target.generalLimits = Object.assign({}, config_1.DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {});\n target.spanLimits = Object.assign({}, config_1.DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {});\n return target;\n}\nexports.mergeConfig = mergeConfig;\n/**\n * When general limits are provided and model specific limits are not,\n * configures the model specific limits by using the values from the general ones.\n * @param userConfig User provided tracer configuration\n */\nfunction reconfigureLimits(userConfig) {\n var _a, _b;\n const spanLimits = Object.assign({}, userConfig.spanLimits);\n /**\n * When span attribute count limit is not defined, but general attribute count limit is defined\n * Then, span attribute count limit will be same as general one\n */\n if (spanLimits.attributeCountLimit == null && ((_a = userConfig.generalLimits) === null || _a === void 0 ? void 0 : _a.attributeCountLimit) != null) {\n spanLimits.attributeCountLimit = userConfig.generalLimits.attributeCountLimit;\n }\n /**\n * When span attribute value length limit is not defined, but general attribute value length limit is defined\n * Then, span attribute value length limit will be same as general one\n */\n if (spanLimits.attributeValueLengthLimit == null && ((_b = userConfig.generalLimits) === null || _b === void 0 ? void 0 : _b.attributeValueLengthLimit) != null) {\n spanLimits.attributeValueLengthLimit = userConfig.generalLimits.attributeValueLengthLimit;\n }\n return Object.assign({}, userConfig, { spanLimits });\n}\nexports.reconfigureLimits = reconfigureLimits;\n//# sourceMappingURL=utility.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./trace\"), exports);\n__exportStar(require(\"./resource\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TelemetrySdkLanguageValues = exports.OsTypeValues = exports.HostArchValues = exports.AwsEcsLaunchtypeValues = exports.CloudPlatformValues = exports.CloudProviderValues = exports.SemanticResourceAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticResourceAttributes = {\n /**\n * Name of the cloud provider.\n */\n CLOUD_PROVIDER: 'cloud.provider',\n /**\n * The cloud account ID the resource is assigned to.\n */\n CLOUD_ACCOUNT_ID: 'cloud.account.id',\n /**\n * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations).\n */\n CLOUD_REGION: 'cloud.region',\n /**\n * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\n *\n * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud.\n */\n CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone',\n /**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\n CLOUD_PLATFORM: 'cloud.platform',\n /**\n * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).\n */\n AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn',\n /**\n * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).\n */\n AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn',\n /**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n */\n AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype',\n /**\n * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).\n */\n AWS_ECS_TASK_ARN: 'aws.ecs.task.arn',\n /**\n * The task definition family this task definition is a member of.\n */\n AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family',\n /**\n * The revision for this task definition.\n */\n AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision',\n /**\n * The ARN of an EKS cluster.\n */\n AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn',\n /**\n * The name(s) of the AWS log group(s) an application is writing to.\n *\n * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.\n */\n AWS_LOG_GROUP_NAMES: 'aws.log.group.names',\n /**\n * The Amazon Resource Name(s) (ARN) of the AWS log group(s).\n *\n * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).\n */\n AWS_LOG_GROUP_ARNS: 'aws.log.group.arns',\n /**\n * The name(s) of the AWS log stream(s) an application is writing to.\n */\n AWS_LOG_STREAM_NAMES: 'aws.log.stream.names',\n /**\n * The ARN(s) of the AWS log stream(s).\n *\n * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.\n */\n AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns',\n /**\n * Container name.\n */\n CONTAINER_NAME: 'container.name',\n /**\n * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated.\n */\n CONTAINER_ID: 'container.id',\n /**\n * The container runtime managing this container.\n */\n CONTAINER_RUNTIME: 'container.runtime',\n /**\n * Name of the image the container was built on.\n */\n CONTAINER_IMAGE_NAME: 'container.image.name',\n /**\n * Container image tag.\n */\n CONTAINER_IMAGE_TAG: 'container.image.tag',\n /**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n */\n DEPLOYMENT_ENVIRONMENT: 'deployment.environment',\n /**\n * A unique identifier representing the device.\n *\n * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.\n */\n DEVICE_ID: 'device.id',\n /**\n * The model identifier for the device.\n *\n * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.\n */\n DEVICE_MODEL_IDENTIFIER: 'device.model.identifier',\n /**\n * The marketing name for the device model.\n *\n * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.\n */\n DEVICE_MODEL_NAME: 'device.model.name',\n /**\n * The name of the single function that this runtime instance executes.\n *\n * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes).\n */\n FAAS_NAME: 'faas.name',\n /**\n * The unique ID of the single function that this runtime instance executes.\n *\n * Note: Depending on the cloud provider, use:\n \n * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\n Take care not to use the "invoked ARN" directly but replace any\n [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple\n different aliases.\n * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\n * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).\n \n On some providers, it may not be possible to determine the full ID at startup,\n which is why this field cannot be made required. For example, on AWS the account ID\n part of the ARN is not available without calling another AWS API\n which may be deemed too slow for a short-running lambda function.\n As an alternative, consider setting `faas.id` as a span attribute instead.\n */\n FAAS_ID: 'faas.id',\n /**\n * The immutable version of the function being executed.\n *\n * Note: Depending on the cloud provider and platform, use:\n \n * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\n (an integer represented as a decimal string).\n * **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions)\n (i.e., the function name plus the revision suffix).\n * **Google Cloud Functions:** The value of the\n [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\n * **Azure Functions:** Not applicable. Do not set this attribute.\n */\n FAAS_VERSION: 'faas.version',\n /**\n * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\n *\n * Note: * **AWS Lambda:** Use the (full) log stream name.\n */\n FAAS_INSTANCE: 'faas.instance',\n /**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.\n */\n FAAS_MAX_MEMORY: 'faas.max_memory',\n /**\n * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.\n */\n HOST_ID: 'host.id',\n /**\n * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\n */\n HOST_NAME: 'host.name',\n /**\n * Type of host. For Cloud, this must be the machine type.\n */\n HOST_TYPE: 'host.type',\n /**\n * The CPU architecture the host system is running on.\n */\n HOST_ARCH: 'host.arch',\n /**\n * Name of the VM image or OS install the host was instantiated from.\n */\n HOST_IMAGE_NAME: 'host.image.name',\n /**\n * VM image ID. For Cloud, this value is from the provider.\n */\n HOST_IMAGE_ID: 'host.image.id',\n /**\n * The version string of the VM image as defined in [Version SpanAttributes](README.md#version-attributes).\n */\n HOST_IMAGE_VERSION: 'host.image.version',\n /**\n * The name of the cluster.\n */\n K8S_CLUSTER_NAME: 'k8s.cluster.name',\n /**\n * The name of the Node.\n */\n K8S_NODE_NAME: 'k8s.node.name',\n /**\n * The UID of the Node.\n */\n K8S_NODE_UID: 'k8s.node.uid',\n /**\n * The name of the namespace that the pod is running in.\n */\n K8S_NAMESPACE_NAME: 'k8s.namespace.name',\n /**\n * The UID of the Pod.\n */\n K8S_POD_UID: 'k8s.pod.uid',\n /**\n * The name of the Pod.\n */\n K8S_POD_NAME: 'k8s.pod.name',\n /**\n * The name of the Container in a Pod template.\n */\n K8S_CONTAINER_NAME: 'k8s.container.name',\n /**\n * The UID of the ReplicaSet.\n */\n K8S_REPLICASET_UID: 'k8s.replicaset.uid',\n /**\n * The name of the ReplicaSet.\n */\n K8S_REPLICASET_NAME: 'k8s.replicaset.name',\n /**\n * The UID of the Deployment.\n */\n K8S_DEPLOYMENT_UID: 'k8s.deployment.uid',\n /**\n * The name of the Deployment.\n */\n K8S_DEPLOYMENT_NAME: 'k8s.deployment.name',\n /**\n * The UID of the StatefulSet.\n */\n K8S_STATEFULSET_UID: 'k8s.statefulset.uid',\n /**\n * The name of the StatefulSet.\n */\n K8S_STATEFULSET_NAME: 'k8s.statefulset.name',\n /**\n * The UID of the DaemonSet.\n */\n K8S_DAEMONSET_UID: 'k8s.daemonset.uid',\n /**\n * The name of the DaemonSet.\n */\n K8S_DAEMONSET_NAME: 'k8s.daemonset.name',\n /**\n * The UID of the Job.\n */\n K8S_JOB_UID: 'k8s.job.uid',\n /**\n * The name of the Job.\n */\n K8S_JOB_NAME: 'k8s.job.name',\n /**\n * The UID of the CronJob.\n */\n K8S_CRONJOB_UID: 'k8s.cronjob.uid',\n /**\n * The name of the CronJob.\n */\n K8S_CRONJOB_NAME: 'k8s.cronjob.name',\n /**\n * The operating system type.\n */\n OS_TYPE: 'os.type',\n /**\n * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\n */\n OS_DESCRIPTION: 'os.description',\n /**\n * Human readable operating system name.\n */\n OS_NAME: 'os.name',\n /**\n * The version string of the operating system as defined in [Version SpanAttributes](../../resource/semantic_conventions/README.md#version-attributes).\n */\n OS_VERSION: 'os.version',\n /**\n * Process identifier (PID).\n */\n PROCESS_PID: 'process.pid',\n /**\n * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_NAME: 'process.executable.name',\n /**\n * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\n */\n PROCESS_EXECUTABLE_PATH: 'process.executable.path',\n /**\n * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\n */\n PROCESS_COMMAND: 'process.command',\n /**\n * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead.\n */\n PROCESS_COMMAND_LINE: 'process.command_line',\n /**\n * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.\n */\n PROCESS_COMMAND_ARGS: 'process.command_args',\n /**\n * The username of the user that owns the process.\n */\n PROCESS_OWNER: 'process.owner',\n /**\n * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.\n */\n PROCESS_RUNTIME_NAME: 'process.runtime.name',\n /**\n * The version of the runtime of this process, as returned by the runtime without modification.\n */\n PROCESS_RUNTIME_VERSION: 'process.runtime.version',\n /**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n */\n PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description',\n /**\n * Logical name of the service.\n *\n * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\n */\n SERVICE_NAME: 'service.name',\n /**\n * A namespace for `service.name`.\n *\n * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\n */\n SERVICE_NAMESPACE: 'service.namespace',\n /**\n * The string ID of the service instance.\n *\n * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).\n */\n SERVICE_INSTANCE_ID: 'service.instance.id',\n /**\n * The version string of the service API or implementation.\n */\n SERVICE_VERSION: 'service.version',\n /**\n * The name of the telemetry SDK as defined above.\n */\n TELEMETRY_SDK_NAME: 'telemetry.sdk.name',\n /**\n * The language of the telemetry SDK.\n */\n TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language',\n /**\n * The version string of the telemetry SDK.\n */\n TELEMETRY_SDK_VERSION: 'telemetry.sdk.version',\n /**\n * The version string of the auto instrumentation agent, if used.\n */\n TELEMETRY_AUTO_VERSION: 'telemetry.auto.version',\n /**\n * The name of the web engine.\n */\n WEBENGINE_NAME: 'webengine.name',\n /**\n * The version of the web engine.\n */\n WEBENGINE_VERSION: 'webengine.version',\n /**\n * Additional description of the web engine (e.g. detailed version and edition information).\n */\n WEBENGINE_DESCRIPTION: 'webengine.description',\n};\nexports.CloudProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.CloudPlatformValues = {\n /** Alibaba Cloud Elastic Compute Service. */\n ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs',\n /** Alibaba Cloud Function Compute. */\n ALIBABA_CLOUD_FC: 'alibaba_cloud_fc',\n /** AWS Elastic Compute Cloud. */\n AWS_EC2: 'aws_ec2',\n /** AWS Elastic Container Service. */\n AWS_ECS: 'aws_ecs',\n /** AWS Elastic Kubernetes Service. */\n AWS_EKS: 'aws_eks',\n /** AWS Lambda. */\n AWS_LAMBDA: 'aws_lambda',\n /** AWS Elastic Beanstalk. */\n AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk',\n /** Azure Virtual Machines. */\n AZURE_VM: 'azure_vm',\n /** Azure Container Instances. */\n AZURE_CONTAINER_INSTANCES: 'azure_container_instances',\n /** Azure Kubernetes Service. */\n AZURE_AKS: 'azure_aks',\n /** Azure Functions. */\n AZURE_FUNCTIONS: 'azure_functions',\n /** Azure App Service. */\n AZURE_APP_SERVICE: 'azure_app_service',\n /** Google Cloud Compute Engine (GCE). */\n GCP_COMPUTE_ENGINE: 'gcp_compute_engine',\n /** Google Cloud Run. */\n GCP_CLOUD_RUN: 'gcp_cloud_run',\n /** Google Cloud Kubernetes Engine (GKE). */\n GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine',\n /** Google Cloud Functions (GCF). */\n GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions',\n /** Google Cloud App Engine (GAE). */\n GCP_APP_ENGINE: 'gcp_app_engine',\n};\nexports.AwsEcsLaunchtypeValues = {\n /** ec2. */\n EC2: 'ec2',\n /** fargate. */\n FARGATE: 'fargate',\n};\nexports.HostArchValues = {\n /** AMD64. */\n AMD64: 'amd64',\n /** ARM32. */\n ARM32: 'arm32',\n /** ARM64. */\n ARM64: 'arm64',\n /** Itanium. */\n IA64: 'ia64',\n /** 32-bit PowerPC. */\n PPC32: 'ppc32',\n /** 64-bit PowerPC. */\n PPC64: 'ppc64',\n /** 32-bit x86. */\n X86: 'x86',\n};\nexports.OsTypeValues = {\n /** Microsoft Windows. */\n WINDOWS: 'windows',\n /** Linux. */\n LINUX: 'linux',\n /** Apple Darwin. */\n DARWIN: 'darwin',\n /** FreeBSD. */\n FREEBSD: 'freebsd',\n /** NetBSD. */\n NETBSD: 'netbsd',\n /** OpenBSD. */\n OPENBSD: 'openbsd',\n /** DragonFly BSD. */\n DRAGONFLYBSD: 'dragonflybsd',\n /** HP-UX (Hewlett Packard Unix). */\n HPUX: 'hpux',\n /** AIX (Advanced Interactive eXecutive). */\n AIX: 'aix',\n /** Oracle Solaris. */\n SOLARIS: 'solaris',\n /** IBM z/OS. */\n Z_OS: 'z_os',\n};\nexports.TelemetrySdkLanguageValues = {\n /** cpp. */\n CPP: 'cpp',\n /** dotnet. */\n DOTNET: 'dotnet',\n /** erlang. */\n ERLANG: 'erlang',\n /** go. */\n GO: 'go',\n /** java. */\n JAVA: 'java',\n /** nodejs. */\n NODEJS: 'nodejs',\n /** php. */\n PHP: 'php',\n /** python. */\n PYTHON: 'python',\n /** ruby. */\n RUBY: 'ruby',\n /** webjs. */\n WEBJS: 'webjs',\n};\n//# sourceMappingURL=SemanticResourceAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticResourceAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MessageTypeValues = exports.RpcGrpcStatusCodeValues = exports.MessagingOperationValues = exports.MessagingDestinationKindValues = exports.HttpFlavorValues = exports.NetHostConnectionSubtypeValues = exports.NetHostConnectionTypeValues = exports.NetTransportValues = exports.FaasInvokedProviderValues = exports.FaasDocumentOperationValues = exports.FaasTriggerValues = exports.DbCassandraConsistencyLevelValues = exports.DbSystemValues = exports.SemanticAttributes = void 0;\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\nexports.SemanticAttributes = {\n /**\n * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).\n *\n * Note: This may be different from `faas.id` if an alias is involved.\n */\n AWS_LAMBDA_INVOKED_ARN: 'aws.lambda.invoked_arn',\n /**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\n DB_SYSTEM: 'db.system',\n /**\n * The connection string used to connect to the database. It is recommended to remove embedded credentials.\n */\n DB_CONNECTION_STRING: 'db.connection_string',\n /**\n * Username for accessing the database.\n */\n DB_USER: 'db.user',\n /**\n * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n */\n DB_JDBC_DRIVER_CLASSNAME: 'db.jdbc.driver_classname',\n /**\n * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n *\n * Note: In some SQL databases, the database name to be used is called "schema name".\n */\n DB_NAME: 'db.name',\n /**\n * The database statement being executed.\n *\n * Note: The value may be sanitized to exclude sensitive information.\n */\n DB_STATEMENT: 'db.statement',\n /**\n * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n *\n * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n */\n DB_OPERATION: 'db.operation',\n /**\n * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n *\n * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).\n */\n DB_MSSQL_INSTANCE_NAME: 'db.mssql.instance_name',\n /**\n * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_CASSANDRA_KEYSPACE: 'db.cassandra.keyspace',\n /**\n * The fetch size used for paging, i.e. how many rows will be returned at once.\n */\n DB_CASSANDRA_PAGE_SIZE: 'db.cassandra.page_size',\n /**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\n DB_CASSANDRA_CONSISTENCY_LEVEL: 'db.cassandra.consistency_level',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_CASSANDRA_TABLE: 'db.cassandra.table',\n /**\n * Whether or not the query is idempotent.\n */\n DB_CASSANDRA_IDEMPOTENCE: 'db.cassandra.idempotence',\n /**\n * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\n */\n DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: 'db.cassandra.speculative_execution_count',\n /**\n * The ID of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_ID: 'db.cassandra.coordinator.id',\n /**\n * The data center of the coordinating node for a query.\n */\n DB_CASSANDRA_COORDINATOR_DC: 'db.cassandra.coordinator.dc',\n /**\n * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.\n */\n DB_HBASE_NAMESPACE: 'db.hbase.namespace',\n /**\n * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n */\n DB_REDIS_DATABASE_INDEX: 'db.redis.database_index',\n /**\n * The collection being accessed within the database stated in `db.name`.\n */\n DB_MONGODB_COLLECTION: 'db.mongodb.collection',\n /**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\n DB_SQL_TABLE: 'db.sql.table',\n /**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n */\n EXCEPTION_TYPE: 'exception.type',\n /**\n * The exception message.\n */\n EXCEPTION_MESSAGE: 'exception.message',\n /**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n */\n EXCEPTION_STACKTRACE: 'exception.stacktrace',\n /**\n * SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n *\n * Note: An exception is considered to have escaped (or left) the scope of a span,\n if that span is ended while the exception is still logically "in flight".\n This may be actually "in flight" in some languages (e.g. if the exception\n is passed to a Context manager's `__exit__` method in Python) but will\n usually be caught at the point of recording the exception in most languages.\n \n It is usually not possible to determine at the point where an exception is thrown\n whether it will escape the scope of a span.\n However, it is trivial to know that an exception\n will escape, if one checks for an active exception just before ending the span,\n as done in the [example above](#exception-end-example).\n \n It follows that an exception may still escape the scope of the span\n even if the `exception.escaped` attribute was not set or set to false,\n since the event might have been recorded at a time where it was not\n clear whether the exception will escape.\n */\n EXCEPTION_ESCAPED: 'exception.escaped',\n /**\n * Type of the trigger on which the function is executed.\n */\n FAAS_TRIGGER: 'faas.trigger',\n /**\n * The execution ID of the current function execution.\n */\n FAAS_EXECUTION: 'faas.execution',\n /**\n * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\n */\n FAAS_DOCUMENT_COLLECTION: 'faas.document.collection',\n /**\n * Describes the type of the operation that was performed on the data.\n */\n FAAS_DOCUMENT_OPERATION: 'faas.document.operation',\n /**\n * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_DOCUMENT_TIME: 'faas.document.time',\n /**\n * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\n */\n FAAS_DOCUMENT_NAME: 'faas.document.name',\n /**\n * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\n FAAS_TIME: 'faas.time',\n /**\n * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\n */\n FAAS_CRON: 'faas.cron',\n /**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start).\n */\n FAAS_COLDSTART: 'faas.coldstart',\n /**\n * The name of the invoked function.\n *\n * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.\n */\n FAAS_INVOKED_NAME: 'faas.invoked_name',\n /**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\n FAAS_INVOKED_PROVIDER: 'faas.invoked_provider',\n /**\n * The cloud region of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\n */\n FAAS_INVOKED_REGION: 'faas.invoked_region',\n /**\n * Transport protocol used. See note below.\n */\n NET_TRANSPORT: 'net.transport',\n /**\n * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6).\n */\n NET_PEER_IP: 'net.peer.ip',\n /**\n * Remote port number.\n */\n NET_PEER_PORT: 'net.peer.port',\n /**\n * Remote hostname or similar, see note below.\n */\n NET_PEER_NAME: 'net.peer.name',\n /**\n * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.\n */\n NET_HOST_IP: 'net.host.ip',\n /**\n * Like `net.peer.port` but for the host port.\n */\n NET_HOST_PORT: 'net.host.port',\n /**\n * Local hostname or similar, see note below.\n */\n NET_HOST_NAME: 'net.host.name',\n /**\n * The internet connection type currently being used by the host.\n */\n NET_HOST_CONNECTION_TYPE: 'net.host.connection.type',\n /**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\n NET_HOST_CONNECTION_SUBTYPE: 'net.host.connection.subtype',\n /**\n * The name of the mobile carrier.\n */\n NET_HOST_CARRIER_NAME: 'net.host.carrier.name',\n /**\n * The mobile carrier country code.\n */\n NET_HOST_CARRIER_MCC: 'net.host.carrier.mcc',\n /**\n * The mobile carrier network code.\n */\n NET_HOST_CARRIER_MNC: 'net.host.carrier.mnc',\n /**\n * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\n */\n NET_HOST_CARRIER_ICC: 'net.host.carrier.icc',\n /**\n * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\n */\n PEER_SERVICE: 'peer.service',\n /**\n * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.\n */\n ENDUSER_ID: 'enduser.id',\n /**\n * Actual/assumed role the client is making the request under extracted from token or application security context.\n */\n ENDUSER_ROLE: 'enduser.role',\n /**\n * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).\n */\n ENDUSER_SCOPE: 'enduser.scope',\n /**\n * Current "managed" thread ID (as opposed to OS thread ID).\n */\n THREAD_ID: 'thread.id',\n /**\n * Current thread name.\n */\n THREAD_NAME: 'thread.name',\n /**\n * The method or function name, or equivalent (usually rightmost part of the code unit's name).\n */\n CODE_FUNCTION: 'code.function',\n /**\n * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.\n */\n CODE_NAMESPACE: 'code.namespace',\n /**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\n */\n CODE_FILEPATH: 'code.filepath',\n /**\n * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.\n */\n CODE_LINENO: 'code.lineno',\n /**\n * HTTP request method.\n */\n HTTP_METHOD: 'http.method',\n /**\n * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.\n *\n * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`.\n */\n HTTP_URL: 'http.url',\n /**\n * The full request target as passed in a HTTP request line or equivalent.\n */\n HTTP_TARGET: 'http.target',\n /**\n * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.\n *\n * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.\n */\n HTTP_HOST: 'http.host',\n /**\n * The URI scheme identifying the used protocol.\n */\n HTTP_SCHEME: 'http.scheme',\n /**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n */\n HTTP_STATUS_CODE: 'http.status_code',\n /**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\n HTTP_FLAVOR: 'http.flavor',\n /**\n * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client.\n */\n HTTP_USER_AGENT: 'http.user_agent',\n /**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_REQUEST_CONTENT_LENGTH: 'http.request_content_length',\n /**\n * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: 'http.request_content_length_uncompressed',\n /**\n * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\n HTTP_RESPONSE_CONTENT_LENGTH: 'http.response_content_length',\n /**\n * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.\n */\n HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: 'http.response_content_length_uncompressed',\n /**\n * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).\n *\n * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available.\n */\n HTTP_SERVER_NAME: 'http.server_name',\n /**\n * The matched route (path template).\n */\n HTTP_ROUTE: 'http.route',\n /**\n * The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).\n *\n * Note: This is not necessarily the same as `net.peer.ip`, which would\n identify the network-level peer, which may be a proxy.\n \n This attribute should be set when a source of information different\n from the one used for `net.peer.ip`, is available even if that other\n source just confirms the same value as `net.peer.ip`.\n Rationale: For `net.peer.ip`, one typically does not know if it\n comes from a proxy, reverse proxy, or the actual client. Setting\n `http.client_ip` when it's the same as `net.peer.ip` means that\n one is at least somewhat confident that the address is not that of\n the closest proxy.\n */\n HTTP_CLIENT_IP: 'http.client_ip',\n /**\n * The keys in the `RequestItems` object field.\n */\n AWS_DYNAMODB_TABLE_NAMES: 'aws.dynamodb.table_names',\n /**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field.\n */\n AWS_DYNAMODB_CONSUMED_CAPACITY: 'aws.dynamodb.consumed_capacity',\n /**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field.\n */\n AWS_DYNAMODB_ITEM_COLLECTION_METRICS: 'aws.dynamodb.item_collection_metrics',\n /**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: 'aws.dynamodb.provisioned_read_capacity',\n /**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\n */\n AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: 'aws.dynamodb.provisioned_write_capacity',\n /**\n * The value of the `ConsistentRead` request parameter.\n */\n AWS_DYNAMODB_CONSISTENT_READ: 'aws.dynamodb.consistent_read',\n /**\n * The value of the `ProjectionExpression` request parameter.\n */\n AWS_DYNAMODB_PROJECTION: 'aws.dynamodb.projection',\n /**\n * The value of the `Limit` request parameter.\n */\n AWS_DYNAMODB_LIMIT: 'aws.dynamodb.limit',\n /**\n * The value of the `AttributesToGet` request parameter.\n */\n AWS_DYNAMODB_ATTRIBUTES_TO_GET: 'aws.dynamodb.attributes_to_get',\n /**\n * The value of the `IndexName` request parameter.\n */\n AWS_DYNAMODB_INDEX_NAME: 'aws.dynamodb.index_name',\n /**\n * The value of the `Select` request parameter.\n */\n AWS_DYNAMODB_SELECT: 'aws.dynamodb.select',\n /**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: 'aws.dynamodb.global_secondary_indexes',\n /**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\n */\n AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: 'aws.dynamodb.local_secondary_indexes',\n /**\n * The value of the `ExclusiveStartTableName` request parameter.\n */\n AWS_DYNAMODB_EXCLUSIVE_START_TABLE: 'aws.dynamodb.exclusive_start_table',\n /**\n * The the number of items in the `TableNames` response parameter.\n */\n AWS_DYNAMODB_TABLE_COUNT: 'aws.dynamodb.table_count',\n /**\n * The value of the `ScanIndexForward` request parameter.\n */\n AWS_DYNAMODB_SCAN_FORWARD: 'aws.dynamodb.scan_forward',\n /**\n * The value of the `Segment` request parameter.\n */\n AWS_DYNAMODB_SEGMENT: 'aws.dynamodb.segment',\n /**\n * The value of the `TotalSegments` request parameter.\n */\n AWS_DYNAMODB_TOTAL_SEGMENTS: 'aws.dynamodb.total_segments',\n /**\n * The value of the `Count` response parameter.\n */\n AWS_DYNAMODB_COUNT: 'aws.dynamodb.count',\n /**\n * The value of the `ScannedCount` response parameter.\n */\n AWS_DYNAMODB_SCANNED_COUNT: 'aws.dynamodb.scanned_count',\n /**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field.\n */\n AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: 'aws.dynamodb.attribute_definitions',\n /**\n * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.\n */\n AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: 'aws.dynamodb.global_secondary_index_updates',\n /**\n * A string identifying the messaging system.\n */\n MESSAGING_SYSTEM: 'messaging.system',\n /**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n */\n MESSAGING_DESTINATION: 'messaging.destination',\n /**\n * The kind of message destination.\n */\n MESSAGING_DESTINATION_KIND: 'messaging.destination_kind',\n /**\n * A boolean that is true if the message destination is temporary.\n */\n MESSAGING_TEMP_DESTINATION: 'messaging.temp_destination',\n /**\n * The name of the transport protocol.\n */\n MESSAGING_PROTOCOL: 'messaging.protocol',\n /**\n * The version of the transport protocol.\n */\n MESSAGING_PROTOCOL_VERSION: 'messaging.protocol_version',\n /**\n * Connection string.\n */\n MESSAGING_URL: 'messaging.url',\n /**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n */\n MESSAGING_MESSAGE_ID: 'messaging.message_id',\n /**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".\n */\n MESSAGING_CONVERSATION_ID: 'messaging.conversation_id',\n /**\n * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.\n */\n MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES: 'messaging.message_payload_size_bytes',\n /**\n * The compressed size of the message payload in bytes.\n */\n MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES: 'messaging.message_payload_compressed_size_bytes',\n /**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n */\n MESSAGING_OPERATION: 'messaging.operation',\n /**\n * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.\n */\n MESSAGING_CONSUMER_ID: 'messaging.consumer_id',\n /**\n * RabbitMQ message routing key.\n */\n MESSAGING_RABBITMQ_ROUTING_KEY: 'messaging.rabbitmq.routing_key',\n /**\n * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n *\n * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.\n */\n MESSAGING_KAFKA_MESSAGE_KEY: 'messaging.kafka.message_key',\n /**\n * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.\n */\n MESSAGING_KAFKA_CONSUMER_GROUP: 'messaging.kafka.consumer_group',\n /**\n * Client Id for the Consumer or Producer that is handling the message.\n */\n MESSAGING_KAFKA_CLIENT_ID: 'messaging.kafka.client_id',\n /**\n * Partition the message is sent to.\n */\n MESSAGING_KAFKA_PARTITION: 'messaging.kafka.partition',\n /**\n * A boolean that is true if the message is a tombstone.\n */\n MESSAGING_KAFKA_TOMBSTONE: 'messaging.kafka.tombstone',\n /**\n * A string identifying the remoting system.\n */\n RPC_SYSTEM: 'rpc.system',\n /**\n * The full (logical) name of the service being called, including its package name, if applicable.\n *\n * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\n */\n RPC_SERVICE: 'rpc.service',\n /**\n * The name of the (logical) method being called, must be equal to the $method part in the span name.\n *\n * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\n */\n RPC_METHOD: 'rpc.method',\n /**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\n RPC_GRPC_STATUS_CODE: 'rpc.grpc.status_code',\n /**\n * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.\n */\n RPC_JSONRPC_VERSION: 'rpc.jsonrpc.version',\n /**\n * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\n */\n RPC_JSONRPC_REQUEST_ID: 'rpc.jsonrpc.request_id',\n /**\n * `error.code` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_CODE: 'rpc.jsonrpc.error_code',\n /**\n * `error.message` property of response if it is an error response.\n */\n RPC_JSONRPC_ERROR_MESSAGE: 'rpc.jsonrpc.error_message',\n /**\n * Whether this is a received or sent message.\n */\n MESSAGE_TYPE: 'message.type',\n /**\n * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\n *\n * Note: This way we guarantee that the values will be consistent between different implementations.\n */\n MESSAGE_ID: 'message.id',\n /**\n * Compressed size of the message in bytes.\n */\n MESSAGE_COMPRESSED_SIZE: 'message.compressed_size',\n /**\n * Uncompressed size of the message in bytes.\n */\n MESSAGE_UNCOMPRESSED_SIZE: 'message.uncompressed_size',\n};\nexports.DbSystemValues = {\n /** Some other SQL database. Fallback only. See notes. */\n OTHER_SQL: 'other_sql',\n /** Microsoft SQL Server. */\n MSSQL: 'mssql',\n /** MySQL. */\n MYSQL: 'mysql',\n /** Oracle Database. */\n ORACLE: 'oracle',\n /** IBM Db2. */\n DB2: 'db2',\n /** PostgreSQL. */\n POSTGRESQL: 'postgresql',\n /** Amazon Redshift. */\n REDSHIFT: 'redshift',\n /** Apache Hive. */\n HIVE: 'hive',\n /** Cloudscape. */\n CLOUDSCAPE: 'cloudscape',\n /** HyperSQL DataBase. */\n HSQLDB: 'hsqldb',\n /** Progress Database. */\n PROGRESS: 'progress',\n /** SAP MaxDB. */\n MAXDB: 'maxdb',\n /** SAP HANA. */\n HANADB: 'hanadb',\n /** Ingres. */\n INGRES: 'ingres',\n /** FirstSQL. */\n FIRSTSQL: 'firstsql',\n /** EnterpriseDB. */\n EDB: 'edb',\n /** InterSystems Caché. */\n CACHE: 'cache',\n /** Adabas (Adaptable Database System). */\n ADABAS: 'adabas',\n /** Firebird. */\n FIREBIRD: 'firebird',\n /** Apache Derby. */\n DERBY: 'derby',\n /** FileMaker. */\n FILEMAKER: 'filemaker',\n /** Informix. */\n INFORMIX: 'informix',\n /** InstantDB. */\n INSTANTDB: 'instantdb',\n /** InterBase. */\n INTERBASE: 'interbase',\n /** MariaDB. */\n MARIADB: 'mariadb',\n /** Netezza. */\n NETEZZA: 'netezza',\n /** Pervasive PSQL. */\n PERVASIVE: 'pervasive',\n /** PointBase. */\n POINTBASE: 'pointbase',\n /** SQLite. */\n SQLITE: 'sqlite',\n /** Sybase. */\n SYBASE: 'sybase',\n /** Teradata. */\n TERADATA: 'teradata',\n /** Vertica. */\n VERTICA: 'vertica',\n /** H2. */\n H2: 'h2',\n /** ColdFusion IMQ. */\n COLDFUSION: 'coldfusion',\n /** Apache Cassandra. */\n CASSANDRA: 'cassandra',\n /** Apache HBase. */\n HBASE: 'hbase',\n /** MongoDB. */\n MONGODB: 'mongodb',\n /** Redis. */\n REDIS: 'redis',\n /** Couchbase. */\n COUCHBASE: 'couchbase',\n /** CouchDB. */\n COUCHDB: 'couchdb',\n /** Microsoft Azure Cosmos DB. */\n COSMOSDB: 'cosmosdb',\n /** Amazon DynamoDB. */\n DYNAMODB: 'dynamodb',\n /** Neo4j. */\n NEO4J: 'neo4j',\n /** Apache Geode. */\n GEODE: 'geode',\n /** Elasticsearch. */\n ELASTICSEARCH: 'elasticsearch',\n /** Memcached. */\n MEMCACHED: 'memcached',\n /** CockroachDB. */\n COCKROACHDB: 'cockroachdb',\n};\nexports.DbCassandraConsistencyLevelValues = {\n /** all. */\n ALL: 'all',\n /** each_quorum. */\n EACH_QUORUM: 'each_quorum',\n /** quorum. */\n QUORUM: 'quorum',\n /** local_quorum. */\n LOCAL_QUORUM: 'local_quorum',\n /** one. */\n ONE: 'one',\n /** two. */\n TWO: 'two',\n /** three. */\n THREE: 'three',\n /** local_one. */\n LOCAL_ONE: 'local_one',\n /** any. */\n ANY: 'any',\n /** serial. */\n SERIAL: 'serial',\n /** local_serial. */\n LOCAL_SERIAL: 'local_serial',\n};\nexports.FaasTriggerValues = {\n /** A response to some data source operation such as a database or filesystem read/write. */\n DATASOURCE: 'datasource',\n /** To provide an answer to an inbound HTTP request. */\n HTTP: 'http',\n /** A function is set to be executed when messages are sent to a messaging system. */\n PUBSUB: 'pubsub',\n /** A function is scheduled to be executed regularly. */\n TIMER: 'timer',\n /** If none of the others apply. */\n OTHER: 'other',\n};\nexports.FaasDocumentOperationValues = {\n /** When a new object is created. */\n INSERT: 'insert',\n /** When an object is modified. */\n EDIT: 'edit',\n /** When an object is deleted. */\n DELETE: 'delete',\n};\nexports.FaasInvokedProviderValues = {\n /** Alibaba Cloud. */\n ALIBABA_CLOUD: 'alibaba_cloud',\n /** Amazon Web Services. */\n AWS: 'aws',\n /** Microsoft Azure. */\n AZURE: 'azure',\n /** Google Cloud Platform. */\n GCP: 'gcp',\n};\nexports.NetTransportValues = {\n /** ip_tcp. */\n IP_TCP: 'ip_tcp',\n /** ip_udp. */\n IP_UDP: 'ip_udp',\n /** Another IP-based protocol. */\n IP: 'ip',\n /** Unix Domain socket. See below. */\n UNIX: 'unix',\n /** Named or anonymous pipe. See note below. */\n PIPE: 'pipe',\n /** In-process communication. */\n INPROC: 'inproc',\n /** Something else (non IP-based). */\n OTHER: 'other',\n};\nexports.NetHostConnectionTypeValues = {\n /** wifi. */\n WIFI: 'wifi',\n /** wired. */\n WIRED: 'wired',\n /** cell. */\n CELL: 'cell',\n /** unavailable. */\n UNAVAILABLE: 'unavailable',\n /** unknown. */\n UNKNOWN: 'unknown',\n};\nexports.NetHostConnectionSubtypeValues = {\n /** GPRS. */\n GPRS: 'gprs',\n /** EDGE. */\n EDGE: 'edge',\n /** UMTS. */\n UMTS: 'umts',\n /** CDMA. */\n CDMA: 'cdma',\n /** EVDO Rel. 0. */\n EVDO_0: 'evdo_0',\n /** EVDO Rev. A. */\n EVDO_A: 'evdo_a',\n /** CDMA2000 1XRTT. */\n CDMA2000_1XRTT: 'cdma2000_1xrtt',\n /** HSDPA. */\n HSDPA: 'hsdpa',\n /** HSUPA. */\n HSUPA: 'hsupa',\n /** HSPA. */\n HSPA: 'hspa',\n /** IDEN. */\n IDEN: 'iden',\n /** EVDO Rev. B. */\n EVDO_B: 'evdo_b',\n /** LTE. */\n LTE: 'lte',\n /** EHRPD. */\n EHRPD: 'ehrpd',\n /** HSPAP. */\n HSPAP: 'hspap',\n /** GSM. */\n GSM: 'gsm',\n /** TD-SCDMA. */\n TD_SCDMA: 'td_scdma',\n /** IWLAN. */\n IWLAN: 'iwlan',\n /** 5G NR (New Radio). */\n NR: 'nr',\n /** 5G NRNSA (New Radio Non-Standalone). */\n NRNSA: 'nrnsa',\n /** LTE CA. */\n LTE_CA: 'lte_ca',\n};\nexports.HttpFlavorValues = {\n /** HTTP 1.0. */\n HTTP_1_0: '1.0',\n /** HTTP 1.1. */\n HTTP_1_1: '1.1',\n /** HTTP 2. */\n HTTP_2_0: '2.0',\n /** SPDY protocol. */\n SPDY: 'SPDY',\n /** QUIC protocol. */\n QUIC: 'QUIC',\n};\nexports.MessagingDestinationKindValues = {\n /** A message sent to a queue. */\n QUEUE: 'queue',\n /** A message sent to a topic. */\n TOPIC: 'topic',\n};\nexports.MessagingOperationValues = {\n /** receive. */\n RECEIVE: 'receive',\n /** process. */\n PROCESS: 'process',\n};\nexports.RpcGrpcStatusCodeValues = {\n /** OK. */\n OK: 0,\n /** CANCELLED. */\n CANCELLED: 1,\n /** UNKNOWN. */\n UNKNOWN: 2,\n /** INVALID_ARGUMENT. */\n INVALID_ARGUMENT: 3,\n /** DEADLINE_EXCEEDED. */\n DEADLINE_EXCEEDED: 4,\n /** NOT_FOUND. */\n NOT_FOUND: 5,\n /** ALREADY_EXISTS. */\n ALREADY_EXISTS: 6,\n /** PERMISSION_DENIED. */\n PERMISSION_DENIED: 7,\n /** RESOURCE_EXHAUSTED. */\n RESOURCE_EXHAUSTED: 8,\n /** FAILED_PRECONDITION. */\n FAILED_PRECONDITION: 9,\n /** ABORTED. */\n ABORTED: 10,\n /** OUT_OF_RANGE. */\n OUT_OF_RANGE: 11,\n /** UNIMPLEMENTED. */\n UNIMPLEMENTED: 12,\n /** INTERNAL. */\n INTERNAL: 13,\n /** UNAVAILABLE. */\n UNAVAILABLE: 14,\n /** DATA_LOSS. */\n DATA_LOSS: 15,\n /** UNAUTHENTICATED. */\n UNAUTHENTICATED: 16,\n};\nexports.MessageTypeValues = {\n /** sent. */\n SENT: 'SENT',\n /** received. */\n RECEIVED: 'RECEIVED',\n};\n//# sourceMappingURL=SemanticAttributes.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n__exportStar(require(\"./SemanticAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"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 = codegen;\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @param {string[]} functionParams Function parameter names\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n */\r\nfunction codegen(functionParams, functionName) {\r\n\r\n /* istanbul ignore if */\r\n if (typeof functionParams === \"string\") {\r\n functionName = functionParams;\r\n functionParams = undefined;\r\n }\r\n\r\n var body = [];\r\n\r\n /**\r\n * Appends code to the function's body or finishes generation.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r\n * @param {...*} [formatParams] Format parameters\r\n * @returns {Codegen|Function} Itself or the generated function if finished\r\n * @throws {Error} If format parameter counts do not match\r\n */\r\n\r\n function Codegen(formatStringOrScope) {\r\n // note that explicit array handling below makes this ~50% faster\r\n\r\n // finish the function\r\n if (typeof formatStringOrScope !== \"string\") {\r\n var source = toString();\r\n if (codegen.verbose)\r\n console.log(\"codegen: \" + source); // eslint-disable-line no-console\r\n source = \"return \" + source;\r\n if (formatStringOrScope) {\r\n var scopeKeys = Object.keys(formatStringOrScope),\r\n scopeParams = new Array(scopeKeys.length + 1),\r\n scopeValues = new Array(scopeKeys.length),\r\n scopeOffset = 0;\r\n while (scopeOffset < scopeKeys.length) {\r\n scopeParams[scopeOffset] = scopeKeys[scopeOffset];\r\n scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];\r\n }\r\n scopeParams[scopeOffset] = source;\r\n return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func\r\n }\r\n return Function(source)(); // eslint-disable-line no-new-func\r\n }\r\n\r\n // otherwise append to body\r\n var formatParams = new Array(arguments.length - 1),\r\n formatOffset = 0;\r\n while (formatOffset < formatParams.length)\r\n formatParams[formatOffset] = arguments[++formatOffset];\r\n formatOffset = 0;\r\n formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {\r\n var value = formatParams[formatOffset++];\r\n switch ($1) {\r\n case \"d\": case \"f\": return String(Number(value));\r\n case \"i\": return String(Math.floor(value));\r\n case \"j\": return JSON.stringify(value);\r\n case \"s\": return String(value);\r\n }\r\n return \"%\";\r\n });\r\n if (formatOffset !== formatParams.length)\r\n throw Error(\"parameter count mismatch\");\r\n body.push(formatStringOrScope);\r\n return Codegen;\r\n }\r\n\r\n function toString(functionNameOverride) {\r\n return \"function \" + (functionNameOverride || functionName || \"\") + \"(\" + (functionParams && functionParams.join(\",\") || \"\") + \"){\\n \" + body.join(\"\\n \") + \"\\n}\";\r\n }\r\n\r\n Codegen.toString = toString;\r\n return Codegen;\r\n}\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @function codegen\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * When set to `true`, codegen will log generated code to console. Useful for debugging.\r\n * @name util.codegen.verbose\r\n * @type {boolean}\r\n */\r\ncodegen.verbose = false;\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\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\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(\"@protobufjs/aspromise\"),\r\n inquire = require(\"@protobufjs/inquire\");\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Options as used by {@link util.fetch}.\r\n * @typedef FetchOptions\r\n * @type {Object}\r\n * @property {boolean} [binary=false] Whether expecting a binary response\r\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} filename File path or url\r\n * @param {FetchOptions} options Fetch options\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction fetch(filename, options, callback) {\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = {};\r\n } else if (!options)\r\n options = {};\r\n\r\n if (!callback)\r\n return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\r\n\r\n // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\r\n if (!options.xhr && fs && fs.readFile)\r\n return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch.xhr(filename, options, callback)\r\n : err\r\n ? callback(err)\r\n : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\r\n });\r\n\r\n // use the XHR version otherwise.\r\n return fetch.xhr(filename, options, callback);\r\n}\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchOptions} [options] Fetch options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n\r\n/**/\r\nfetch.xhr = function fetch_xhr(filename, options, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n\r\n if (xhr.readyState !== 4)\r\n return undefined;\r\n\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n\r\n // if binary data is expected, make sure that some sort of array is returned, even if\r\n // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\r\n if (options.binary) {\r\n var buffer = xhr.response;\r\n if (!buffer) {\r\n buffer = [];\r\n for (var i = 0; i < xhr.responseText.length; ++i)\r\n buffer.push(xhr.responseText.charCodeAt(i) & 255);\r\n }\r\n return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\r\n }\r\n return callback(null, xhr.responseText);\r\n };\r\n\r\n if (options.binary) {\r\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\r\n if (\"overrideMimeType\" in xhr)\r\n xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\r\n xhr.responseType = \"arraybuffer\";\r\n }\r\n\r\n xhr.open(\"GET\", filename);\r\n xhr.send();\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0 && parts[i - 1] !== \"..\")\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function 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","var register = require('./lib/register')\nvar addHook = require('./lib/add')\nvar removeHook = require('./lib/remove')\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind\nvar bindable = bind.bind(bind)\n\nfunction bindApi (hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state])\n hook.api = { remove: removeHookRef }\n hook.remove = removeHookRef\n\n ;['before', 'error', 'after', 'wrap'].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind]\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args)\n })\n}\n\nfunction HookSingular () {\n var singularHookName = 'h'\n var singularHookState = {\n registry: {}\n }\n var singularHook = register.bind(null, singularHookState, singularHookName)\n bindApi(singularHook, singularHookState, singularHookName)\n return singularHook\n}\n\nfunction HookCollection () {\n var state = {\n registry: {}\n }\n\n var hook = register.bind(null, state)\n bindApi(hook, state)\n\n return hook\n}\n\nvar collectionHookDeprecationMessageDisplayed = false\nfunction Hook () {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn('[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4')\n collectionHookDeprecationMessageDisplayed = true\n }\n return HookCollection()\n}\n\nHook.Singular = HookSingular.bind()\nHook.Collection = HookCollection.bind()\n\nmodule.exports = Hook\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook\nmodule.exports.Singular = Hook.Singular\nmodule.exports.Collection = Hook.Collection\n","module.exports = addHook;\n\nfunction addHook(state, kind, name, hook) {\n var orig = hook;\n if (!state.registry[name]) {\n state.registry[name] = [];\n }\n\n if (kind === \"before\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options));\n };\n }\n\n if (kind === \"after\") {\n hook = function (method, options) {\n var result;\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_;\n return orig(result, options);\n })\n .then(function () {\n return result;\n });\n };\n }\n\n if (kind === \"error\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options);\n });\n };\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig,\n });\n}\n","module.exports = register;\n\nfunction register(state, name, method, options) {\n if (typeof method !== \"function\") {\n throw new Error(\"method for before hook must be a function\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, callback, options);\n }, method)();\n }\n\n return Promise.resolve().then(function () {\n if (!state.registry[name]) {\n return method(options);\n }\n\n return state.registry[name].reduce(function (method, registered) {\n return registered.hook.bind(null, method, options);\n }, method)();\n });\n}\n","module.exports = removeHook;\n\nfunction removeHook(state, name, method) {\n if (!state.registry[name]) {\n return;\n }\n\n var index = state.registry[name]\n .map(function (registered) {\n return registered.orig;\n })\n .indexOf(method);\n\n if (index === -1) {\n return;\n }\n\n state.registry[name].splice(index, 1);\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('buffer').Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass Deprecation extends Error {\n constructor(message) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = 'Deprecation';\n }\n\n}\n\nexports.Deprecation = Deprecation;\n","'use strict';\nvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\nvar scheduleDrain;\n\nif (process.browser) {\n if (Mutation) {\n var called = 0;\n var observer = new Mutation(nextTick);\n var element = global.document.createTextNode('');\n observer.observe(element, {\n characterData: true\n });\n scheduleDrain = function () {\n element.data = (called = ++called % 2);\n };\n } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n var channel = new global.MessageChannel();\n channel.port1.onmessage = nextTick;\n scheduleDrain = function () {\n channel.port2.postMessage(0);\n };\n } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n scheduleDrain = function () {\n\n // Create a