@agent-team-foundation/first-tree-hub 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1551 @@
1
+ import { createRequire } from "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
10
+ var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
11
+ var __exportAll = (all, no_symbols) => {
12
+ let target = {};
13
+ for (var name in all) __defProp(target, name, {
14
+ get: all[name],
15
+ enumerable: true
16
+ });
17
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
18
+ return target;
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
22
+ key = keys[i];
23
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
24
+ get: ((k) => from[k]).bind(null, key),
25
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
26
+ });
27
+ }
28
+ return to;
29
+ };
30
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
31
+ value: mod,
32
+ enumerable: true
33
+ }) : target, mod));
34
+ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
36
+ //#endregion
37
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/version.js
38
+ var VERSION;
39
+ var init_version = __esmMin((() => {
40
+ VERSION = "1.9.1";
41
+ }));
42
+ //#endregion
43
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/internal/semver.js
44
+ /**
45
+ * Create a function to test an API version to see if it is compatible with the provided ownVersion.
46
+ *
47
+ * The returned function has the following semantics:
48
+ * - Exact match is always compatible
49
+ * - Major versions must match exactly
50
+ * - 1.x package cannot use global 2.x package
51
+ * - 2.x package cannot use global 1.x package
52
+ * - 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
53
+ * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
54
+ * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
55
+ * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
56
+ * - Patch and build tag differences are not considered at this time
57
+ *
58
+ * @param ownVersion version which should be checked against
59
+ */
60
+ function _makeCompatibilityCheck(ownVersion) {
61
+ const acceptedVersions = new Set([ownVersion]);
62
+ const rejectedVersions = /* @__PURE__ */ new Set();
63
+ const myVersionMatch = ownVersion.match(re);
64
+ if (!myVersionMatch) return () => false;
65
+ const ownVersionParsed = {
66
+ major: +myVersionMatch[1],
67
+ minor: +myVersionMatch[2],
68
+ patch: +myVersionMatch[3],
69
+ prerelease: myVersionMatch[4]
70
+ };
71
+ if (ownVersionParsed.prerelease != null) return function isExactmatch(globalVersion) {
72
+ return globalVersion === ownVersion;
73
+ };
74
+ function _reject(v) {
75
+ rejectedVersions.add(v);
76
+ return false;
77
+ }
78
+ function _accept(v) {
79
+ acceptedVersions.add(v);
80
+ return true;
81
+ }
82
+ return function isCompatible(globalVersion) {
83
+ if (acceptedVersions.has(globalVersion)) return true;
84
+ if (rejectedVersions.has(globalVersion)) return false;
85
+ const globalVersionMatch = globalVersion.match(re);
86
+ if (!globalVersionMatch) return _reject(globalVersion);
87
+ const globalVersionParsed = {
88
+ major: +globalVersionMatch[1],
89
+ minor: +globalVersionMatch[2],
90
+ patch: +globalVersionMatch[3],
91
+ prerelease: globalVersionMatch[4]
92
+ };
93
+ if (globalVersionParsed.prerelease != null) return _reject(globalVersion);
94
+ if (ownVersionParsed.major !== globalVersionParsed.major) return _reject(globalVersion);
95
+ if (ownVersionParsed.major === 0) {
96
+ if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) return _accept(globalVersion);
97
+ return _reject(globalVersion);
98
+ }
99
+ if (ownVersionParsed.minor <= globalVersionParsed.minor) return _accept(globalVersion);
100
+ return _reject(globalVersion);
101
+ };
102
+ }
103
+ var re, isCompatible;
104
+ var init_semver = __esmMin((() => {
105
+ init_version();
106
+ re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
107
+ isCompatible = _makeCompatibilityCheck(VERSION);
108
+ }));
109
+ //#endregion
110
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js
111
+ function registerGlobal(type, instance, diag, allowOverride = false) {
112
+ var _a;
113
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { version: VERSION };
114
+ if (!allowOverride && api[type]) {
115
+ const err = /* @__PURE__ */ new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
116
+ diag.error(err.stack || err.message);
117
+ return false;
118
+ }
119
+ if (api.version !== "1.9.1") {
120
+ const err = /* @__PURE__ */ new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);
121
+ diag.error(err.stack || err.message);
122
+ return false;
123
+ }
124
+ api[type] = instance;
125
+ diag.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);
126
+ return true;
127
+ }
128
+ function getGlobal(type) {
129
+ var _a, _b;
130
+ const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;
131
+ if (!globalVersion || !isCompatible(globalVersion)) return;
132
+ return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
133
+ }
134
+ function unregisterGlobal(type, diag) {
135
+ diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);
136
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
137
+ if (api) delete api[type];
138
+ }
139
+ var major, GLOBAL_OPENTELEMETRY_API_KEY, _global;
140
+ var init_global_utils = __esmMin((() => {
141
+ init_version();
142
+ init_semver();
143
+ major = VERSION.split(".")[0];
144
+ GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
145
+ _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
146
+ }));
147
+ //#endregion
148
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js
149
+ function logProxy(funcName, namespace, args) {
150
+ const logger = getGlobal("diag");
151
+ if (!logger) return;
152
+ return logger[funcName](namespace, ...args);
153
+ }
154
+ var DiagComponentLogger;
155
+ var init_ComponentLogger = __esmMin((() => {
156
+ init_global_utils();
157
+ DiagComponentLogger = class {
158
+ constructor(props) {
159
+ this._namespace = props.namespace || "DiagComponentLogger";
160
+ }
161
+ debug(...args) {
162
+ return logProxy("debug", this._namespace, args);
163
+ }
164
+ error(...args) {
165
+ return logProxy("error", this._namespace, args);
166
+ }
167
+ info(...args) {
168
+ return logProxy("info", this._namespace, args);
169
+ }
170
+ warn(...args) {
171
+ return logProxy("warn", this._namespace, args);
172
+ }
173
+ verbose(...args) {
174
+ return logProxy("verbose", this._namespace, args);
175
+ }
176
+ };
177
+ }));
178
+ //#endregion
179
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/types.js
180
+ var DiagLogLevel;
181
+ var init_types = __esmMin((() => {
182
+ (function(DiagLogLevel) {
183
+ /** Diagnostic Logging level setting to disable all logging (except and forced logs) */
184
+ DiagLogLevel[DiagLogLevel["NONE"] = 0] = "NONE";
185
+ /** Identifies an error scenario */
186
+ DiagLogLevel[DiagLogLevel["ERROR"] = 30] = "ERROR";
187
+ /** Identifies a warning scenario */
188
+ DiagLogLevel[DiagLogLevel["WARN"] = 50] = "WARN";
189
+ /** General informational log message */
190
+ DiagLogLevel[DiagLogLevel["INFO"] = 60] = "INFO";
191
+ /** General debug log message */
192
+ DiagLogLevel[DiagLogLevel["DEBUG"] = 70] = "DEBUG";
193
+ /**
194
+ * Detailed trace level logging should only be used for development, should only be set
195
+ * in a development environment.
196
+ */
197
+ DiagLogLevel[DiagLogLevel["VERBOSE"] = 80] = "VERBOSE";
198
+ /** Used to set the logging level to include all logging */
199
+ DiagLogLevel[DiagLogLevel["ALL"] = 9999] = "ALL";
200
+ })(DiagLogLevel || (DiagLogLevel = {}));
201
+ }));
202
+ //#endregion
203
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
204
+ function createLogLevelDiagLogger(maxLevel, logger) {
205
+ if (maxLevel < DiagLogLevel.NONE) maxLevel = DiagLogLevel.NONE;
206
+ else if (maxLevel > DiagLogLevel.ALL) maxLevel = DiagLogLevel.ALL;
207
+ logger = logger || {};
208
+ function _filterFunc(funcName, theLevel) {
209
+ const theFunc = logger[funcName];
210
+ if (typeof theFunc === "function" && maxLevel >= theLevel) return theFunc.bind(logger);
211
+ return function() {};
212
+ }
213
+ return {
214
+ error: _filterFunc("error", DiagLogLevel.ERROR),
215
+ warn: _filterFunc("warn", DiagLogLevel.WARN),
216
+ info: _filterFunc("info", DiagLogLevel.INFO),
217
+ debug: _filterFunc("debug", DiagLogLevel.DEBUG),
218
+ verbose: _filterFunc("verbose", DiagLogLevel.VERBOSE)
219
+ };
220
+ }
221
+ var init_logLevelLogger = __esmMin((() => {
222
+ init_types();
223
+ }));
224
+ //#endregion
225
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/diag.js
226
+ var API_NAME$4, DiagAPI;
227
+ var init_diag = __esmMin((() => {
228
+ init_ComponentLogger();
229
+ init_logLevelLogger();
230
+ init_types();
231
+ init_global_utils();
232
+ API_NAME$4 = "diag";
233
+ DiagAPI = class DiagAPI {
234
+ /** Get the singleton instance of the DiagAPI API */
235
+ static instance() {
236
+ if (!this._instance) this._instance = new DiagAPI();
237
+ return this._instance;
238
+ }
239
+ /**
240
+ * Private internal constructor
241
+ * @private
242
+ */
243
+ constructor() {
244
+ function _logProxy(funcName) {
245
+ return function(...args) {
246
+ const logger = getGlobal("diag");
247
+ if (!logger) return;
248
+ return logger[funcName](...args);
249
+ };
250
+ }
251
+ const self = this;
252
+ const setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {
253
+ var _a, _b, _c;
254
+ if (logger === self) {
255
+ const err = /* @__PURE__ */ new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
256
+ self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
257
+ return false;
258
+ }
259
+ if (typeof optionsOrLogLevel === "number") optionsOrLogLevel = { logLevel: optionsOrLogLevel };
260
+ const oldLogger = getGlobal("diag");
261
+ const newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);
262
+ if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
263
+ const stack = (_c = (/* @__PURE__ */ new Error()).stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
264
+ oldLogger.warn(`Current logger will be overwritten from ${stack}`);
265
+ newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
266
+ }
267
+ return registerGlobal("diag", newLogger, self, true);
268
+ };
269
+ self.setLogger = setLogger;
270
+ self.disable = () => {
271
+ unregisterGlobal(API_NAME$4, self);
272
+ };
273
+ self.createComponentLogger = (options) => {
274
+ return new DiagComponentLogger(options);
275
+ };
276
+ self.verbose = _logProxy("verbose");
277
+ self.debug = _logProxy("debug");
278
+ self.info = _logProxy("info");
279
+ self.warn = _logProxy("warn");
280
+ self.error = _logProxy("error");
281
+ }
282
+ };
283
+ }));
284
+ //#endregion
285
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js
286
+ var BaggageImpl;
287
+ var init_baggage_impl = __esmMin((() => {
288
+ BaggageImpl = class BaggageImpl {
289
+ constructor(entries) {
290
+ this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map();
291
+ }
292
+ getEntry(key) {
293
+ const entry = this._entries.get(key);
294
+ if (!entry) return;
295
+ return Object.assign({}, entry);
296
+ }
297
+ getAllEntries() {
298
+ return Array.from(this._entries.entries());
299
+ }
300
+ setEntry(key, entry) {
301
+ const newBaggage = new BaggageImpl(this._entries);
302
+ newBaggage._entries.set(key, entry);
303
+ return newBaggage;
304
+ }
305
+ removeEntry(key) {
306
+ const newBaggage = new BaggageImpl(this._entries);
307
+ newBaggage._entries.delete(key);
308
+ return newBaggage;
309
+ }
310
+ removeEntries(...keys) {
311
+ const newBaggage = new BaggageImpl(this._entries);
312
+ for (const key of keys) newBaggage._entries.delete(key);
313
+ return newBaggage;
314
+ }
315
+ clear() {
316
+ return new BaggageImpl();
317
+ }
318
+ };
319
+ }));
320
+ //#endregion
321
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js
322
+ var baggageEntryMetadataSymbol;
323
+ var init_symbol = __esmMin((() => {
324
+ baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
325
+ }));
326
+ //#endregion
327
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/utils.js
328
+ /**
329
+ * Create a new Baggage with optional entries
330
+ *
331
+ * @param entries An array of baggage entries the new baggage should contain
332
+ */
333
+ function createBaggage(entries = {}) {
334
+ return new BaggageImpl(new Map(Object.entries(entries)));
335
+ }
336
+ /**
337
+ * Create a serializable BaggageEntryMetadata object from a string.
338
+ *
339
+ * @param str string metadata. Format is currently not defined by the spec and has no special meaning.
340
+ *
341
+ * @since 1.0.0
342
+ */
343
+ function baggageEntryMetadataFromString(str) {
344
+ if (typeof str !== "string") {
345
+ diag$1.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
346
+ str = "";
347
+ }
348
+ return {
349
+ __TYPE__: baggageEntryMetadataSymbol,
350
+ toString() {
351
+ return str;
352
+ }
353
+ };
354
+ }
355
+ var diag$1;
356
+ var init_utils$1 = __esmMin((() => {
357
+ init_diag();
358
+ init_baggage_impl();
359
+ init_symbol();
360
+ diag$1 = DiagAPI.instance();
361
+ }));
362
+ //#endregion
363
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context/context.js
364
+ /**
365
+ * Get a key to uniquely identify a context value
366
+ *
367
+ * @since 1.0.0
368
+ */
369
+ function createContextKey(description) {
370
+ return Symbol.for(description);
371
+ }
372
+ var BaseContext, ROOT_CONTEXT;
373
+ var init_context$1 = __esmMin((() => {
374
+ BaseContext = class BaseContext {
375
+ /**
376
+ * Construct a new context which inherits values from an optional parent context.
377
+ *
378
+ * @param parentContext a context from which to inherit values
379
+ */
380
+ constructor(parentContext) {
381
+ const self = this;
382
+ self._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();
383
+ self.getValue = (key) => self._currentContext.get(key);
384
+ self.setValue = (key, value) => {
385
+ const context = new BaseContext(self._currentContext);
386
+ context._currentContext.set(key, value);
387
+ return context;
388
+ };
389
+ self.deleteValue = (key) => {
390
+ const context = new BaseContext(self._currentContext);
391
+ context._currentContext.delete(key);
392
+ return context;
393
+ };
394
+ }
395
+ };
396
+ ROOT_CONTEXT = new BaseContext();
397
+ }));
398
+ //#endregion
399
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js
400
+ var consoleMap, _originalConsoleMethods, DiagConsoleLogger;
401
+ var init_consoleLogger = __esmMin((() => {
402
+ consoleMap = [
403
+ {
404
+ n: "error",
405
+ c: "error"
406
+ },
407
+ {
408
+ n: "warn",
409
+ c: "warn"
410
+ },
411
+ {
412
+ n: "info",
413
+ c: "info"
414
+ },
415
+ {
416
+ n: "debug",
417
+ c: "debug"
418
+ },
419
+ {
420
+ n: "verbose",
421
+ c: "trace"
422
+ }
423
+ ];
424
+ _originalConsoleMethods = {};
425
+ if (typeof console !== "undefined") {
426
+ for (const key of [
427
+ "error",
428
+ "warn",
429
+ "info",
430
+ "debug",
431
+ "trace",
432
+ "log"
433
+ ]) if (typeof console[key] === "function") _originalConsoleMethods[key] = console[key];
434
+ }
435
+ DiagConsoleLogger = class {
436
+ constructor() {
437
+ function _consoleFunc(funcName) {
438
+ return function(...args) {
439
+ let theFunc = _originalConsoleMethods[funcName];
440
+ if (typeof theFunc !== "function") theFunc = _originalConsoleMethods["log"];
441
+ if (typeof theFunc !== "function" && console) {
442
+ theFunc = console[funcName];
443
+ if (typeof theFunc !== "function") theFunc = console.log;
444
+ }
445
+ if (typeof theFunc === "function") return theFunc.apply(console, args);
446
+ };
447
+ }
448
+ for (let i = 0; i < consoleMap.length; i++) this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
449
+ }
450
+ };
451
+ }));
452
+ //#endregion
453
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js
454
+ /**
455
+ * Create a no-op Meter
456
+ *
457
+ * @since 1.3.0
458
+ */
459
+ function createNoopMeter() {
460
+ return NOOP_METER;
461
+ }
462
+ var NoopMeter, NoopMetric, NoopCounterMetric, NoopUpDownCounterMetric, NoopGaugeMetric, NoopHistogramMetric, NoopObservableMetric, NoopObservableCounterMetric, NoopObservableGaugeMetric, NoopObservableUpDownCounterMetric, NOOP_METER, NOOP_COUNTER_METRIC, NOOP_GAUGE_METRIC, NOOP_HISTOGRAM_METRIC, NOOP_UP_DOWN_COUNTER_METRIC, NOOP_OBSERVABLE_COUNTER_METRIC, NOOP_OBSERVABLE_GAUGE_METRIC, NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
463
+ var init_NoopMeter = __esmMin((() => {
464
+ NoopMeter = class {
465
+ constructor() {}
466
+ /**
467
+ * @see {@link Meter.createGauge}
468
+ */
469
+ createGauge(_name, _options) {
470
+ return NOOP_GAUGE_METRIC;
471
+ }
472
+ /**
473
+ * @see {@link Meter.createHistogram}
474
+ */
475
+ createHistogram(_name, _options) {
476
+ return NOOP_HISTOGRAM_METRIC;
477
+ }
478
+ /**
479
+ * @see {@link Meter.createCounter}
480
+ */
481
+ createCounter(_name, _options) {
482
+ return NOOP_COUNTER_METRIC;
483
+ }
484
+ /**
485
+ * @see {@link Meter.createUpDownCounter}
486
+ */
487
+ createUpDownCounter(_name, _options) {
488
+ return NOOP_UP_DOWN_COUNTER_METRIC;
489
+ }
490
+ /**
491
+ * @see {@link Meter.createObservableGauge}
492
+ */
493
+ createObservableGauge(_name, _options) {
494
+ return NOOP_OBSERVABLE_GAUGE_METRIC;
495
+ }
496
+ /**
497
+ * @see {@link Meter.createObservableCounter}
498
+ */
499
+ createObservableCounter(_name, _options) {
500
+ return NOOP_OBSERVABLE_COUNTER_METRIC;
501
+ }
502
+ /**
503
+ * @see {@link Meter.createObservableUpDownCounter}
504
+ */
505
+ createObservableUpDownCounter(_name, _options) {
506
+ return NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
507
+ }
508
+ /**
509
+ * @see {@link Meter.addBatchObservableCallback}
510
+ */
511
+ addBatchObservableCallback(_callback, _observables) {}
512
+ /**
513
+ * @see {@link Meter.removeBatchObservableCallback}
514
+ */
515
+ removeBatchObservableCallback(_callback) {}
516
+ };
517
+ NoopMetric = class {};
518
+ NoopCounterMetric = class extends NoopMetric {
519
+ add(_value, _attributes) {}
520
+ };
521
+ NoopUpDownCounterMetric = class extends NoopMetric {
522
+ add(_value, _attributes) {}
523
+ };
524
+ NoopGaugeMetric = class extends NoopMetric {
525
+ record(_value, _attributes) {}
526
+ };
527
+ NoopHistogramMetric = class extends NoopMetric {
528
+ record(_value, _attributes) {}
529
+ };
530
+ NoopObservableMetric = class {
531
+ addCallback(_callback) {}
532
+ removeCallback(_callback) {}
533
+ };
534
+ NoopObservableCounterMetric = class extends NoopObservableMetric {};
535
+ NoopObservableGaugeMetric = class extends NoopObservableMetric {};
536
+ NoopObservableUpDownCounterMetric = class extends NoopObservableMetric {};
537
+ NOOP_METER = new NoopMeter();
538
+ NOOP_COUNTER_METRIC = new NoopCounterMetric();
539
+ NOOP_GAUGE_METRIC = new NoopGaugeMetric();
540
+ NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();
541
+ NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();
542
+ NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();
543
+ NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();
544
+ NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();
545
+ }));
546
+ //#endregion
547
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/Metric.js
548
+ var ValueType;
549
+ var init_Metric = __esmMin((() => {
550
+ (function(ValueType) {
551
+ ValueType[ValueType["INT"] = 0] = "INT";
552
+ ValueType[ValueType["DOUBLE"] = 1] = "DOUBLE";
553
+ })(ValueType || (ValueType = {}));
554
+ }));
555
+ //#endregion
556
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js
557
+ var defaultTextMapGetter, defaultTextMapSetter;
558
+ var init_TextMapPropagator = __esmMin((() => {
559
+ defaultTextMapGetter = {
560
+ get(carrier, key) {
561
+ if (carrier == null) return;
562
+ return carrier[key];
563
+ },
564
+ keys(carrier) {
565
+ if (carrier == null) return [];
566
+ return Object.keys(carrier);
567
+ }
568
+ };
569
+ defaultTextMapSetter = { set(carrier, key, value) {
570
+ if (carrier == null) return;
571
+ carrier[key] = value;
572
+ } };
573
+ }));
574
+ //#endregion
575
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js
576
+ var NoopContextManager;
577
+ var init_NoopContextManager = __esmMin((() => {
578
+ init_context$1();
579
+ NoopContextManager = class {
580
+ active() {
581
+ return ROOT_CONTEXT;
582
+ }
583
+ with(_context, fn, thisArg, ...args) {
584
+ return fn.call(thisArg, ...args);
585
+ }
586
+ bind(_context, target) {
587
+ return target;
588
+ }
589
+ enable() {
590
+ return this;
591
+ }
592
+ disable() {
593
+ return this;
594
+ }
595
+ };
596
+ }));
597
+ //#endregion
598
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/context.js
599
+ var API_NAME$3, NOOP_CONTEXT_MANAGER, ContextAPI;
600
+ var init_context = __esmMin((() => {
601
+ init_NoopContextManager();
602
+ init_global_utils();
603
+ init_diag();
604
+ API_NAME$3 = "context";
605
+ NOOP_CONTEXT_MANAGER = new NoopContextManager();
606
+ ContextAPI = class ContextAPI {
607
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
608
+ constructor() {}
609
+ /** Get the singleton instance of the Context API */
610
+ static getInstance() {
611
+ if (!this._instance) this._instance = new ContextAPI();
612
+ return this._instance;
613
+ }
614
+ /**
615
+ * Set the current context manager.
616
+ *
617
+ * @returns true if the context manager was successfully registered, else false
618
+ */
619
+ setGlobalContextManager(contextManager) {
620
+ return registerGlobal(API_NAME$3, contextManager, DiagAPI.instance());
621
+ }
622
+ /**
623
+ * Get the currently active context
624
+ */
625
+ active() {
626
+ return this._getContextManager().active();
627
+ }
628
+ /**
629
+ * Execute a function with an active context
630
+ *
631
+ * @param context context to be active during function execution
632
+ * @param fn function to execute in a context
633
+ * @param thisArg optional receiver to be used for calling fn
634
+ * @param args optional arguments forwarded to fn
635
+ */
636
+ with(context, fn, thisArg, ...args) {
637
+ return this._getContextManager().with(context, fn, thisArg, ...args);
638
+ }
639
+ /**
640
+ * Bind a context to a target function or event emitter
641
+ *
642
+ * @param context context to bind to the event emitter or function. Defaults to the currently active context
643
+ * @param target function or event emitter to bind
644
+ */
645
+ bind(context, target) {
646
+ return this._getContextManager().bind(context, target);
647
+ }
648
+ _getContextManager() {
649
+ return getGlobal(API_NAME$3) || NOOP_CONTEXT_MANAGER;
650
+ }
651
+ /** Disable and remove the global context manager */
652
+ disable() {
653
+ this._getContextManager().disable();
654
+ unregisterGlobal(API_NAME$3, DiagAPI.instance());
655
+ }
656
+ };
657
+ }));
658
+ //#endregion
659
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js
660
+ var TraceFlags;
661
+ var init_trace_flags = __esmMin((() => {
662
+ (function(TraceFlags) {
663
+ /** Represents no flag set. */
664
+ TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
665
+ /** Bit to represent whether trace is sampled in trace flags. */
666
+ TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
667
+ })(TraceFlags || (TraceFlags = {}));
668
+ }));
669
+ //#endregion
670
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js
671
+ var INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT;
672
+ var init_invalid_span_constants = __esmMin((() => {
673
+ init_trace_flags();
674
+ INVALID_SPANID = "0000000000000000";
675
+ INVALID_TRACEID = "00000000000000000000000000000000";
676
+ INVALID_SPAN_CONTEXT = {
677
+ traceId: INVALID_TRACEID,
678
+ spanId: INVALID_SPANID,
679
+ traceFlags: TraceFlags.NONE
680
+ };
681
+ }));
682
+ //#endregion
683
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js
684
+ var NonRecordingSpan;
685
+ var init_NonRecordingSpan = __esmMin((() => {
686
+ init_invalid_span_constants();
687
+ NonRecordingSpan = class {
688
+ constructor(spanContext = INVALID_SPAN_CONTEXT) {
689
+ this._spanContext = spanContext;
690
+ }
691
+ spanContext() {
692
+ return this._spanContext;
693
+ }
694
+ setAttribute(_key, _value) {
695
+ return this;
696
+ }
697
+ setAttributes(_attributes) {
698
+ return this;
699
+ }
700
+ addEvent(_name, _attributes) {
701
+ return this;
702
+ }
703
+ addLink(_link) {
704
+ return this;
705
+ }
706
+ addLinks(_links) {
707
+ return this;
708
+ }
709
+ setStatus(_status) {
710
+ return this;
711
+ }
712
+ updateName(_name) {
713
+ return this;
714
+ }
715
+ end(_endTime) {}
716
+ isRecording() {
717
+ return false;
718
+ }
719
+ recordException(_exception, _time) {}
720
+ };
721
+ }));
722
+ //#endregion
723
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js
724
+ /**
725
+ * Return the span if one exists
726
+ *
727
+ * @param context context to get span from
728
+ */
729
+ function getSpan(context) {
730
+ return context.getValue(SPAN_KEY) || void 0;
731
+ }
732
+ /**
733
+ * Gets the span from the current context, if one exists.
734
+ */
735
+ function getActiveSpan() {
736
+ return getSpan(ContextAPI.getInstance().active());
737
+ }
738
+ /**
739
+ * Set the span on a context
740
+ *
741
+ * @param context context to use as parent
742
+ * @param span span to set active
743
+ */
744
+ function setSpan(context, span) {
745
+ return context.setValue(SPAN_KEY, span);
746
+ }
747
+ /**
748
+ * Remove current span stored in the context
749
+ *
750
+ * @param context context to delete span from
751
+ */
752
+ function deleteSpan(context) {
753
+ return context.deleteValue(SPAN_KEY);
754
+ }
755
+ /**
756
+ * Wrap span context in a NoopSpan and set as span in a new
757
+ * context
758
+ *
759
+ * @param context context to set active span on
760
+ * @param spanContext span context to be wrapped
761
+ */
762
+ function setSpanContext(context, spanContext) {
763
+ return setSpan(context, new NonRecordingSpan(spanContext));
764
+ }
765
+ /**
766
+ * Get the span context of the span if it exists.
767
+ *
768
+ * @param context context to get values from
769
+ */
770
+ function getSpanContext(context) {
771
+ var _a;
772
+ return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();
773
+ }
774
+ var SPAN_KEY;
775
+ var init_context_utils = __esmMin((() => {
776
+ init_context$1();
777
+ init_NonRecordingSpan();
778
+ init_context();
779
+ SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN");
780
+ }));
781
+ //#endregion
782
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js
783
+ function isValidHex(id, length) {
784
+ if (typeof id !== "string" || id.length !== length) return false;
785
+ let r = 0;
786
+ for (let i = 0; i < id.length; i += 4) r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
787
+ return r === length;
788
+ }
789
+ /**
790
+ * @since 1.0.0
791
+ */
792
+ function isValidTraceId(traceId) {
793
+ return isValidHex(traceId, 32) && traceId !== "00000000000000000000000000000000";
794
+ }
795
+ /**
796
+ * @since 1.0.0
797
+ */
798
+ function isValidSpanId(spanId) {
799
+ return isValidHex(spanId, 16) && spanId !== "0000000000000000";
800
+ }
801
+ /**
802
+ * Returns true if this {@link SpanContext} is valid.
803
+ * @return true if this {@link SpanContext} is valid.
804
+ *
805
+ * @since 1.0.0
806
+ */
807
+ function isSpanContextValid(spanContext) {
808
+ return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
809
+ }
810
+ /**
811
+ * Wrap the given {@link SpanContext} in a new non-recording {@link Span}
812
+ *
813
+ * @param spanContext span context to be wrapped
814
+ * @returns a new non-recording {@link Span} with the provided context
815
+ */
816
+ function wrapSpanContext(spanContext) {
817
+ return new NonRecordingSpan(spanContext);
818
+ }
819
+ var isHex;
820
+ var init_spancontext_utils = __esmMin((() => {
821
+ init_invalid_span_constants();
822
+ init_NonRecordingSpan();
823
+ isHex = new Uint8Array([
824
+ 0,
825
+ 0,
826
+ 0,
827
+ 0,
828
+ 0,
829
+ 0,
830
+ 0,
831
+ 0,
832
+ 0,
833
+ 0,
834
+ 0,
835
+ 0,
836
+ 0,
837
+ 0,
838
+ 0,
839
+ 0,
840
+ 0,
841
+ 0,
842
+ 0,
843
+ 0,
844
+ 0,
845
+ 0,
846
+ 0,
847
+ 0,
848
+ 0,
849
+ 0,
850
+ 0,
851
+ 0,
852
+ 0,
853
+ 0,
854
+ 0,
855
+ 0,
856
+ 0,
857
+ 0,
858
+ 0,
859
+ 0,
860
+ 0,
861
+ 0,
862
+ 0,
863
+ 0,
864
+ 0,
865
+ 0,
866
+ 0,
867
+ 0,
868
+ 0,
869
+ 0,
870
+ 0,
871
+ 0,
872
+ 1,
873
+ 1,
874
+ 1,
875
+ 1,
876
+ 1,
877
+ 1,
878
+ 1,
879
+ 1,
880
+ 1,
881
+ 1,
882
+ 0,
883
+ 0,
884
+ 0,
885
+ 0,
886
+ 0,
887
+ 0,
888
+ 0,
889
+ 1,
890
+ 1,
891
+ 1,
892
+ 1,
893
+ 1,
894
+ 1,
895
+ 0,
896
+ 0,
897
+ 0,
898
+ 0,
899
+ 0,
900
+ 0,
901
+ 0,
902
+ 0,
903
+ 0,
904
+ 0,
905
+ 0,
906
+ 0,
907
+ 0,
908
+ 0,
909
+ 0,
910
+ 0,
911
+ 0,
912
+ 0,
913
+ 0,
914
+ 0,
915
+ 0,
916
+ 0,
917
+ 0,
918
+ 0,
919
+ 0,
920
+ 0,
921
+ 1,
922
+ 1,
923
+ 1,
924
+ 1,
925
+ 1,
926
+ 1
927
+ ]);
928
+ }));
929
+ //#endregion
930
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js
931
+ function isSpanContext(spanContext) {
932
+ return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
933
+ }
934
+ var contextApi, NoopTracer;
935
+ var init_NoopTracer = __esmMin((() => {
936
+ init_context();
937
+ init_context_utils();
938
+ init_NonRecordingSpan();
939
+ init_spancontext_utils();
940
+ contextApi = ContextAPI.getInstance();
941
+ NoopTracer = class {
942
+ startSpan(name, options, context = contextApi.active()) {
943
+ if (Boolean(options === null || options === void 0 ? void 0 : options.root)) return new NonRecordingSpan();
944
+ const parentFromContext = context && getSpanContext(context);
945
+ if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) return new NonRecordingSpan(parentFromContext);
946
+ else return new NonRecordingSpan();
947
+ }
948
+ startActiveSpan(name, arg2, arg3, arg4) {
949
+ let opts;
950
+ let ctx;
951
+ let fn;
952
+ if (arguments.length < 2) return;
953
+ else if (arguments.length === 2) fn = arg2;
954
+ else if (arguments.length === 3) {
955
+ opts = arg2;
956
+ fn = arg3;
957
+ } else {
958
+ opts = arg2;
959
+ ctx = arg3;
960
+ fn = arg4;
961
+ }
962
+ const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
963
+ const span = this.startSpan(name, opts, parentContext);
964
+ const contextWithSpanSet = setSpan(parentContext, span);
965
+ return contextApi.with(contextWithSpanSet, fn, void 0, span);
966
+ }
967
+ };
968
+ }));
969
+ //#endregion
970
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js
971
+ var NOOP_TRACER, ProxyTracer;
972
+ var init_ProxyTracer = __esmMin((() => {
973
+ init_NoopTracer();
974
+ NOOP_TRACER = new NoopTracer();
975
+ ProxyTracer = class {
976
+ constructor(provider, name, version, options) {
977
+ this._provider = provider;
978
+ this.name = name;
979
+ this.version = version;
980
+ this.options = options;
981
+ }
982
+ startSpan(name, options, context) {
983
+ return this._getTracer().startSpan(name, options, context);
984
+ }
985
+ startActiveSpan(_name, _options, _context, _fn) {
986
+ const tracer = this._getTracer();
987
+ return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
988
+ }
989
+ /**
990
+ * Try to get a tracer from the proxy tracer provider.
991
+ * If the proxy tracer provider has no delegate, return a noop tracer.
992
+ */
993
+ _getTracer() {
994
+ if (this._delegate) return this._delegate;
995
+ const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
996
+ if (!tracer) return NOOP_TRACER;
997
+ this._delegate = tracer;
998
+ return this._delegate;
999
+ }
1000
+ };
1001
+ }));
1002
+ //#endregion
1003
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js
1004
+ var NoopTracerProvider;
1005
+ var init_NoopTracerProvider = __esmMin((() => {
1006
+ init_NoopTracer();
1007
+ NoopTracerProvider = class {
1008
+ getTracer(_name, _version, _options) {
1009
+ return new NoopTracer();
1010
+ }
1011
+ };
1012
+ }));
1013
+ //#endregion
1014
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js
1015
+ var NOOP_TRACER_PROVIDER, ProxyTracerProvider;
1016
+ var init_ProxyTracerProvider = __esmMin((() => {
1017
+ init_ProxyTracer();
1018
+ init_NoopTracerProvider();
1019
+ NOOP_TRACER_PROVIDER = new NoopTracerProvider();
1020
+ ProxyTracerProvider = class {
1021
+ /**
1022
+ * Get a {@link ProxyTracer}
1023
+ */
1024
+ getTracer(name, version, options) {
1025
+ var _a;
1026
+ return (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options);
1027
+ }
1028
+ getDelegate() {
1029
+ var _a;
1030
+ return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
1031
+ }
1032
+ /**
1033
+ * Set the delegate tracer provider
1034
+ */
1035
+ setDelegate(delegate) {
1036
+ this._delegate = delegate;
1037
+ }
1038
+ getDelegateTracer(name, version, options) {
1039
+ var _a;
1040
+ return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
1041
+ }
1042
+ };
1043
+ }));
1044
+ //#endregion
1045
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js
1046
+ var SamplingDecision;
1047
+ var init_SamplingResult = __esmMin((() => {
1048
+ (function(SamplingDecision) {
1049
+ /**
1050
+ * `Span.isRecording() === false`, span will not be recorded and all events
1051
+ * and attributes will be dropped.
1052
+ */
1053
+ SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD";
1054
+ /**
1055
+ * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
1056
+ * MUST NOT be set.
1057
+ */
1058
+ SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD";
1059
+ /**
1060
+ * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
1061
+ * MUST be set.
1062
+ */
1063
+ SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
1064
+ })(SamplingDecision || (SamplingDecision = {}));
1065
+ }));
1066
+ //#endregion
1067
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js
1068
+ var SpanKind;
1069
+ var init_span_kind = __esmMin((() => {
1070
+ (function(SpanKind) {
1071
+ /** Default value. Indicates that the span is used internally. */
1072
+ SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
1073
+ /**
1074
+ * Indicates that the span covers server-side handling of an RPC or other
1075
+ * remote request.
1076
+ */
1077
+ SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
1078
+ /**
1079
+ * Indicates that the span covers the client-side wrapper around an RPC or
1080
+ * other remote request.
1081
+ */
1082
+ SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
1083
+ /**
1084
+ * Indicates that the span describes producer sending a message to a
1085
+ * broker. Unlike client and server, there is no direct critical path latency
1086
+ * relationship between producer and consumer spans.
1087
+ */
1088
+ SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
1089
+ /**
1090
+ * Indicates that the span describes consumer receiving a message from a
1091
+ * broker. Unlike client and server, there is no direct critical path latency
1092
+ * relationship between producer and consumer spans.
1093
+ */
1094
+ SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
1095
+ })(SpanKind || (SpanKind = {}));
1096
+ }));
1097
+ //#endregion
1098
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/status.js
1099
+ var SpanStatusCode;
1100
+ var init_status = __esmMin((() => {
1101
+ (function(SpanStatusCode) {
1102
+ /**
1103
+ * The default status.
1104
+ */
1105
+ SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
1106
+ /**
1107
+ * The operation has been validated by an Application developer or
1108
+ * Operator to have completed successfully.
1109
+ */
1110
+ SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
1111
+ /**
1112
+ * The operation contains an error.
1113
+ */
1114
+ SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
1115
+ })(SpanStatusCode || (SpanStatusCode = {}));
1116
+ }));
1117
+ //#endregion
1118
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js
1119
+ /**
1120
+ * Key is opaque string up to 256 characters printable. It MUST begin with a
1121
+ * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
1122
+ * underscores _, dashes -, asterisks *, and forward slashes /.
1123
+ * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
1124
+ * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
1125
+ * see https://www.w3.org/TR/trace-context/#key
1126
+ */
1127
+ function validateKey(key) {
1128
+ return VALID_KEY_REGEX.test(key);
1129
+ }
1130
+ /**
1131
+ * Value is opaque string up to 256 characters printable ASCII RFC0020
1132
+ * characters (i.e., the range 0x20 to 0x7E) except comma , and =.
1133
+ */
1134
+ function validateValue(value) {
1135
+ return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
1136
+ }
1137
+ var VALID_KEY_CHAR_RANGE, VALID_KEY, VALID_VENDOR_KEY, VALID_KEY_REGEX, VALID_VALUE_BASE_REGEX, INVALID_VALUE_COMMA_EQUAL_REGEX;
1138
+ var init_tracestate_validators = __esmMin((() => {
1139
+ VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
1140
+ VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
1141
+ VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
1142
+ VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
1143
+ VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
1144
+ INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
1145
+ }));
1146
+ //#endregion
1147
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js
1148
+ var MAX_TRACE_STATE_ITEMS, MAX_TRACE_STATE_LEN, LIST_MEMBERS_SEPARATOR, LIST_MEMBER_KEY_VALUE_SPLITTER, TraceStateImpl;
1149
+ var init_tracestate_impl = __esmMin((() => {
1150
+ init_tracestate_validators();
1151
+ MAX_TRACE_STATE_ITEMS = 32;
1152
+ MAX_TRACE_STATE_LEN = 512;
1153
+ LIST_MEMBERS_SEPARATOR = ",";
1154
+ LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
1155
+ TraceStateImpl = class TraceStateImpl {
1156
+ constructor(rawTraceState) {
1157
+ this._internalState = /* @__PURE__ */ new Map();
1158
+ if (rawTraceState) this._parse(rawTraceState);
1159
+ }
1160
+ set(key, value) {
1161
+ const traceState = this._clone();
1162
+ if (traceState._internalState.has(key)) traceState._internalState.delete(key);
1163
+ traceState._internalState.set(key, value);
1164
+ return traceState;
1165
+ }
1166
+ unset(key) {
1167
+ const traceState = this._clone();
1168
+ traceState._internalState.delete(key);
1169
+ return traceState;
1170
+ }
1171
+ get(key) {
1172
+ return this._internalState.get(key);
1173
+ }
1174
+ serialize() {
1175
+ return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
1176
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
1177
+ return agg;
1178
+ }, []).join(LIST_MEMBERS_SEPARATOR);
1179
+ }
1180
+ _parse(rawTraceState) {
1181
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN) return;
1182
+ this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
1183
+ const listMember = part.trim();
1184
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
1185
+ if (i !== -1) {
1186
+ const key = listMember.slice(0, i);
1187
+ const value = listMember.slice(i + 1, part.length);
1188
+ if (validateKey(key) && validateValue(value)) agg.set(key, value);
1189
+ }
1190
+ return agg;
1191
+ }, /* @__PURE__ */ new Map());
1192
+ if (this._internalState.size > MAX_TRACE_STATE_ITEMS) this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
1193
+ }
1194
+ _keys() {
1195
+ return Array.from(this._internalState.keys()).reverse();
1196
+ }
1197
+ _clone() {
1198
+ const traceState = new TraceStateImpl();
1199
+ traceState._internalState = new Map(this._internalState);
1200
+ return traceState;
1201
+ }
1202
+ };
1203
+ }));
1204
+ //#endregion
1205
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js
1206
+ /**
1207
+ * @since 1.1.0
1208
+ */
1209
+ function createTraceState(rawTraceState) {
1210
+ return new TraceStateImpl(rawTraceState);
1211
+ }
1212
+ var init_utils = __esmMin((() => {
1213
+ init_tracestate_impl();
1214
+ }));
1215
+ //#endregion
1216
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context-api.js
1217
+ var context;
1218
+ var init_context_api = __esmMin((() => {
1219
+ init_context();
1220
+ context = ContextAPI.getInstance();
1221
+ }));
1222
+ //#endregion
1223
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag-api.js
1224
+ var diag;
1225
+ var init_diag_api = __esmMin((() => {
1226
+ init_diag();
1227
+ diag = DiagAPI.instance();
1228
+ }));
1229
+ //#endregion
1230
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js
1231
+ var NoopMeterProvider, NOOP_METER_PROVIDER;
1232
+ var init_NoopMeterProvider = __esmMin((() => {
1233
+ init_NoopMeter();
1234
+ NoopMeterProvider = class {
1235
+ getMeter(_name, _version, _options) {
1236
+ return NOOP_METER;
1237
+ }
1238
+ };
1239
+ NOOP_METER_PROVIDER = new NoopMeterProvider();
1240
+ }));
1241
+ //#endregion
1242
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/metrics.js
1243
+ var API_NAME$2, MetricsAPI;
1244
+ var init_metrics = __esmMin((() => {
1245
+ init_NoopMeterProvider();
1246
+ init_global_utils();
1247
+ init_diag();
1248
+ API_NAME$2 = "metrics";
1249
+ MetricsAPI = class MetricsAPI {
1250
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
1251
+ constructor() {}
1252
+ /** Get the singleton instance of the Metrics API */
1253
+ static getInstance() {
1254
+ if (!this._instance) this._instance = new MetricsAPI();
1255
+ return this._instance;
1256
+ }
1257
+ /**
1258
+ * Set the current global meter provider.
1259
+ * Returns true if the meter provider was successfully registered, else false.
1260
+ */
1261
+ setGlobalMeterProvider(provider) {
1262
+ return registerGlobal(API_NAME$2, provider, DiagAPI.instance());
1263
+ }
1264
+ /**
1265
+ * Returns the global meter provider.
1266
+ */
1267
+ getMeterProvider() {
1268
+ return getGlobal(API_NAME$2) || NOOP_METER_PROVIDER;
1269
+ }
1270
+ /**
1271
+ * Returns a meter from the global meter provider.
1272
+ */
1273
+ getMeter(name, version, options) {
1274
+ return this.getMeterProvider().getMeter(name, version, options);
1275
+ }
1276
+ /** Remove the global meter provider */
1277
+ disable() {
1278
+ unregisterGlobal(API_NAME$2, DiagAPI.instance());
1279
+ }
1280
+ };
1281
+ }));
1282
+ //#endregion
1283
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics-api.js
1284
+ var metrics;
1285
+ var init_metrics_api = __esmMin((() => {
1286
+ init_metrics();
1287
+ metrics = MetricsAPI.getInstance();
1288
+ }));
1289
+ //#endregion
1290
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js
1291
+ var NoopTextMapPropagator;
1292
+ var init_NoopTextMapPropagator = __esmMin((() => {
1293
+ NoopTextMapPropagator = class {
1294
+ /** Noop inject function does nothing */
1295
+ inject(_context, _carrier) {}
1296
+ /** Noop extract function does nothing and returns the input context */
1297
+ extract(context, _carrier) {
1298
+ return context;
1299
+ }
1300
+ fields() {
1301
+ return [];
1302
+ }
1303
+ };
1304
+ }));
1305
+ //#endregion
1306
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js
1307
+ /**
1308
+ * Retrieve the current baggage from the given context
1309
+ *
1310
+ * @param {Context} Context that manage all context values
1311
+ * @returns {Baggage} Extracted baggage from the context
1312
+ */
1313
+ function getBaggage(context) {
1314
+ return context.getValue(BAGGAGE_KEY) || void 0;
1315
+ }
1316
+ /**
1317
+ * Retrieve the current baggage from the active/current context
1318
+ *
1319
+ * @returns {Baggage} Extracted baggage from the context
1320
+ */
1321
+ function getActiveBaggage() {
1322
+ return getBaggage(ContextAPI.getInstance().active());
1323
+ }
1324
+ /**
1325
+ * Store a baggage in the given context
1326
+ *
1327
+ * @param {Context} Context that manage all context values
1328
+ * @param {Baggage} baggage that will be set in the actual context
1329
+ */
1330
+ function setBaggage(context, baggage) {
1331
+ return context.setValue(BAGGAGE_KEY, baggage);
1332
+ }
1333
+ /**
1334
+ * Delete the baggage stored in the given context
1335
+ *
1336
+ * @param {Context} Context that manage all context values
1337
+ */
1338
+ function deleteBaggage(context) {
1339
+ return context.deleteValue(BAGGAGE_KEY);
1340
+ }
1341
+ var BAGGAGE_KEY;
1342
+ var init_context_helpers = __esmMin((() => {
1343
+ init_context();
1344
+ init_context$1();
1345
+ BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key");
1346
+ }));
1347
+ //#endregion
1348
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/propagation.js
1349
+ var API_NAME$1, NOOP_TEXT_MAP_PROPAGATOR, PropagationAPI;
1350
+ var init_propagation = __esmMin((() => {
1351
+ init_global_utils();
1352
+ init_NoopTextMapPropagator();
1353
+ init_TextMapPropagator();
1354
+ init_context_helpers();
1355
+ init_utils$1();
1356
+ init_diag();
1357
+ API_NAME$1 = "propagation";
1358
+ NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();
1359
+ PropagationAPI = class PropagationAPI {
1360
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
1361
+ constructor() {
1362
+ this.createBaggage = createBaggage;
1363
+ this.getBaggage = getBaggage;
1364
+ this.getActiveBaggage = getActiveBaggage;
1365
+ this.setBaggage = setBaggage;
1366
+ this.deleteBaggage = deleteBaggage;
1367
+ }
1368
+ /** Get the singleton instance of the Propagator API */
1369
+ static getInstance() {
1370
+ if (!this._instance) this._instance = new PropagationAPI();
1371
+ return this._instance;
1372
+ }
1373
+ /**
1374
+ * Set the current propagator.
1375
+ *
1376
+ * @returns true if the propagator was successfully registered, else false
1377
+ */
1378
+ setGlobalPropagator(propagator) {
1379
+ return registerGlobal(API_NAME$1, propagator, DiagAPI.instance());
1380
+ }
1381
+ /**
1382
+ * Inject context into a carrier to be propagated inter-process
1383
+ *
1384
+ * @param context Context carrying tracing data to inject
1385
+ * @param carrier carrier to inject context into
1386
+ * @param setter Function used to set values on the carrier
1387
+ */
1388
+ inject(context, carrier, setter = defaultTextMapSetter) {
1389
+ return this._getGlobalPropagator().inject(context, carrier, setter);
1390
+ }
1391
+ /**
1392
+ * Extract context from a carrier
1393
+ *
1394
+ * @param context Context which the newly created context will inherit from
1395
+ * @param carrier Carrier to extract context from
1396
+ * @param getter Function used to extract keys from a carrier
1397
+ */
1398
+ extract(context, carrier, getter = defaultTextMapGetter) {
1399
+ return this._getGlobalPropagator().extract(context, carrier, getter);
1400
+ }
1401
+ /**
1402
+ * Return a list of all fields which may be used by the propagator.
1403
+ */
1404
+ fields() {
1405
+ return this._getGlobalPropagator().fields();
1406
+ }
1407
+ /** Remove the global propagator */
1408
+ disable() {
1409
+ unregisterGlobal(API_NAME$1, DiagAPI.instance());
1410
+ }
1411
+ _getGlobalPropagator() {
1412
+ return getGlobal(API_NAME$1) || NOOP_TEXT_MAP_PROPAGATOR;
1413
+ }
1414
+ };
1415
+ }));
1416
+ //#endregion
1417
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation-api.js
1418
+ var propagation;
1419
+ var init_propagation_api = __esmMin((() => {
1420
+ init_propagation();
1421
+ propagation = PropagationAPI.getInstance();
1422
+ }));
1423
+ //#endregion
1424
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/trace.js
1425
+ var API_NAME, TraceAPI;
1426
+ var init_trace = __esmMin((() => {
1427
+ init_global_utils();
1428
+ init_ProxyTracerProvider();
1429
+ init_spancontext_utils();
1430
+ init_context_utils();
1431
+ init_diag();
1432
+ API_NAME = "trace";
1433
+ TraceAPI = class TraceAPI {
1434
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
1435
+ constructor() {
1436
+ this._proxyTracerProvider = new ProxyTracerProvider();
1437
+ this.wrapSpanContext = wrapSpanContext;
1438
+ this.isSpanContextValid = isSpanContextValid;
1439
+ this.deleteSpan = deleteSpan;
1440
+ this.getSpan = getSpan;
1441
+ this.getActiveSpan = getActiveSpan;
1442
+ this.getSpanContext = getSpanContext;
1443
+ this.setSpan = setSpan;
1444
+ this.setSpanContext = setSpanContext;
1445
+ }
1446
+ /** Get the singleton instance of the Trace API */
1447
+ static getInstance() {
1448
+ if (!this._instance) this._instance = new TraceAPI();
1449
+ return this._instance;
1450
+ }
1451
+ /**
1452
+ * Set the current global tracer.
1453
+ *
1454
+ * @returns true if the tracer provider was successfully registered, else false
1455
+ */
1456
+ setGlobalTracerProvider(provider) {
1457
+ const success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
1458
+ if (success) this._proxyTracerProvider.setDelegate(provider);
1459
+ return success;
1460
+ }
1461
+ /**
1462
+ * Returns the global tracer provider.
1463
+ */
1464
+ getTracerProvider() {
1465
+ return getGlobal(API_NAME) || this._proxyTracerProvider;
1466
+ }
1467
+ /**
1468
+ * Returns a tracer from the global tracer provider.
1469
+ */
1470
+ getTracer(name, version) {
1471
+ return this.getTracerProvider().getTracer(name, version);
1472
+ }
1473
+ /** Remove the global tracer provider */
1474
+ disable() {
1475
+ unregisterGlobal(API_NAME, DiagAPI.instance());
1476
+ this._proxyTracerProvider = new ProxyTracerProvider();
1477
+ }
1478
+ };
1479
+ }));
1480
+ //#endregion
1481
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace-api.js
1482
+ var trace;
1483
+ var init_trace_api = __esmMin((() => {
1484
+ init_trace();
1485
+ trace = TraceAPI.getInstance();
1486
+ }));
1487
+ //#endregion
1488
+ //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/index.js
1489
+ var esm_exports = /* @__PURE__ */ __exportAll({
1490
+ DiagConsoleLogger: () => DiagConsoleLogger,
1491
+ DiagLogLevel: () => DiagLogLevel,
1492
+ INVALID_SPANID: () => INVALID_SPANID,
1493
+ INVALID_SPAN_CONTEXT: () => INVALID_SPAN_CONTEXT,
1494
+ INVALID_TRACEID: () => INVALID_TRACEID,
1495
+ ProxyTracer: () => ProxyTracer,
1496
+ ProxyTracerProvider: () => ProxyTracerProvider,
1497
+ ROOT_CONTEXT: () => ROOT_CONTEXT,
1498
+ SamplingDecision: () => SamplingDecision,
1499
+ SpanKind: () => SpanKind,
1500
+ SpanStatusCode: () => SpanStatusCode,
1501
+ TraceFlags: () => TraceFlags,
1502
+ ValueType: () => ValueType,
1503
+ baggageEntryMetadataFromString: () => baggageEntryMetadataFromString,
1504
+ context: () => context,
1505
+ createContextKey: () => createContextKey,
1506
+ createNoopMeter: () => createNoopMeter,
1507
+ createTraceState: () => createTraceState,
1508
+ default: () => esm_default,
1509
+ defaultTextMapGetter: () => defaultTextMapGetter,
1510
+ defaultTextMapSetter: () => defaultTextMapSetter,
1511
+ diag: () => diag,
1512
+ isSpanContextValid: () => isSpanContextValid,
1513
+ isValidSpanId: () => isValidSpanId,
1514
+ isValidTraceId: () => isValidTraceId,
1515
+ metrics: () => metrics,
1516
+ propagation: () => propagation,
1517
+ trace: () => trace
1518
+ });
1519
+ var esm_default;
1520
+ var init_esm = __esmMin((() => {
1521
+ init_utils$1();
1522
+ init_context$1();
1523
+ init_consoleLogger();
1524
+ init_types();
1525
+ init_NoopMeter();
1526
+ init_Metric();
1527
+ init_TextMapPropagator();
1528
+ init_ProxyTracer();
1529
+ init_ProxyTracerProvider();
1530
+ init_SamplingResult();
1531
+ init_span_kind();
1532
+ init_status();
1533
+ init_trace_flags();
1534
+ init_utils();
1535
+ init_spancontext_utils();
1536
+ init_invalid_span_constants();
1537
+ init_context_api();
1538
+ init_diag_api();
1539
+ init_metrics_api();
1540
+ init_propagation_api();
1541
+ init_trace_api();
1542
+ esm_default = {
1543
+ context,
1544
+ diag,
1545
+ metrics,
1546
+ propagation,
1547
+ trace
1548
+ };
1549
+ }));
1550
+ //#endregion
1551
+ export { diag as a, SpanKind as c, __exportAll as d, __require as f, propagation as i, __commonJSMin as l, __toESM as m, init_esm as n, context as o, __toCommonJS as p, trace as r, SpanStatusCode as s, esm_exports as t, __esmMin as u };