dd-trace 5.80.0 → 5.81.0
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.
- package/LICENSE-3rdparty.csv +79 -88
- package/ext/tags.d.ts +1 -0
- package/ext/tags.js +1 -0
- package/index.d.ts +35 -35
- package/loader-hook.mjs +10 -3
- package/package.json +22 -40
- package/packages/datadog-esbuild/index.js +36 -19
- package/packages/datadog-instrumentations/index.js +1 -0
- package/packages/datadog-instrumentations/src/anthropic.js +12 -0
- package/packages/datadog-instrumentations/src/aws-sdk.js +5 -1
- package/packages/datadog-instrumentations/src/cucumber.js +2 -2
- package/packages/datadog-instrumentations/src/find-my-way.js +6 -5
- package/packages/datadog-instrumentations/src/google-genai.js +120 -0
- package/packages/datadog-instrumentations/src/graphql.js +20 -0
- package/packages/datadog-instrumentations/src/helpers/hooks.js +1 -0
- package/packages/datadog-instrumentations/src/helpers/instrument.js +10 -0
- package/packages/datadog-instrumentations/src/helpers/register.js +6 -1
- package/packages/datadog-instrumentations/src/helpers/rewriter/compiler.js +27 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +152 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/index.js +5 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/langchain.js +237 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/loader.js +9 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/loader.mjs +11 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/transforms.js +139 -0
- package/packages/datadog-instrumentations/src/langchain.js +3 -109
- package/packages/datadog-instrumentations/src/mocha/main.js +1 -1
- package/packages/datadog-instrumentations/src/mysql2.js +1 -1
- package/packages/datadog-instrumentations/src/playwright.js +45 -16
- package/packages/datadog-instrumentations/src/router.js +1 -1
- package/packages/datadog-instrumentations/src/selenium.js +3 -1
- package/packages/datadog-instrumentations/src/ws.js +35 -17
- package/packages/datadog-plugin-child_process/src/scrub-cmd-params.js +1 -1
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +23 -2
- package/packages/datadog-plugin-cypress/src/plugin.js +1 -1
- package/packages/datadog-plugin-cypress/src/support.js +73 -31
- package/packages/datadog-plugin-google-genai/src/index.js +17 -0
- package/packages/datadog-plugin-google-genai/src/tracing.js +41 -0
- package/packages/datadog-plugin-graphql/src/tools/transforms.js +5 -4
- package/packages/datadog-plugin-jest/src/util.js +1 -1
- package/packages/datadog-plugin-langchain/src/tracing.js +7 -3
- package/packages/datadog-plugin-next/src/index.js +11 -3
- package/packages/dd-trace/src/aiguard/sdk.js +18 -10
- package/packages/dd-trace/src/appsec/api_security_sampler.js +1 -1
- package/packages/dd-trace/src/appsec/iast/overhead-controller.js +1 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-esm.mjs +1 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +1 -2
- package/packages/dd-trace/src/appsec/iast/vulnerability-reporter.js +1 -1
- package/packages/dd-trace/src/appsec/reporter.js +0 -4
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/worker/index.js +4 -8
- package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +4 -2
- package/packages/dd-trace/src/config.js +81 -7
- package/packages/dd-trace/src/config_defaults.js +14 -2
- package/packages/dd-trace/src/datastreams/encoding.js +23 -6
- package/packages/dd-trace/src/datastreams/pathway.js +40 -1
- package/packages/dd-trace/src/datastreams/processor.js +1 -1
- package/packages/dd-trace/src/datastreams/schemas/schema_builder.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/breakpoints.js +15 -5
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/config.js +2 -0
- package/packages/dd-trace/src/debugger/devtools_client/index.js +30 -15
- package/packages/dd-trace/src/debugger/devtools_client/inspector_promises_polyfill.js +2 -0
- package/packages/dd-trace/src/debugger/devtools_client/json-buffer.js +24 -18
- package/packages/dd-trace/src/debugger/devtools_client/send.js +18 -8
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/collector.js +103 -15
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/constants.js +25 -0
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/index.js +56 -25
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/processor.js +64 -23
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/symbols.js +3 -1
- package/packages/dd-trace/src/debugger/devtools_client/snapshot-pruner.js +404 -0
- package/packages/dd-trace/src/debugger/devtools_client/source-maps.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/state.js +7 -2
- package/packages/dd-trace/src/debugger/devtools_client/status.js +1 -1
- package/packages/dd-trace/src/debugger/index.js +1 -1
- package/packages/dd-trace/src/encode/span-stats.js +7 -1
- package/packages/dd-trace/src/histogram.js +1 -1
- package/packages/dd-trace/src/id.js +60 -0
- package/packages/dd-trace/src/lambda/runtime/ritm.js +1 -1
- package/packages/dd-trace/src/llmobs/constants/tags.js +1 -0
- package/packages/dd-trace/src/llmobs/plugins/genai/index.js +104 -0
- package/packages/dd-trace/src/llmobs/plugins/genai/util.js +486 -0
- package/packages/dd-trace/src/llmobs/plugins/langchain/index.js +2 -2
- package/packages/dd-trace/src/llmobs/plugins/{openai.js → openai/index.js} +48 -6
- package/packages/dd-trace/src/llmobs/plugins/openai/utils.js +114 -0
- package/packages/dd-trace/src/llmobs/sdk.js +5 -0
- package/packages/dd-trace/src/llmobs/span_processor.js +6 -1
- package/packages/dd-trace/src/llmobs/tagger.js +4 -0
- package/packages/dd-trace/src/opentelemetry/logs/index.js +2 -2
- package/packages/dd-trace/src/opentelemetry/logs/logger.js +3 -2
- package/packages/dd-trace/src/opentelemetry/logs/otlp_http_log_exporter.js +5 -3
- package/packages/dd-trace/src/opentelemetry/logs/otlp_transformer.js +8 -8
- package/packages/dd-trace/src/opentelemetry/metrics/constants.js +34 -0
- package/packages/dd-trace/src/opentelemetry/metrics/index.js +81 -0
- package/packages/dd-trace/src/opentelemetry/metrics/instruments.js +225 -0
- package/packages/dd-trace/src/opentelemetry/metrics/meter.js +171 -0
- package/packages/dd-trace/src/opentelemetry/metrics/meter_provider.js +54 -0
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_http_metric_exporter.js +62 -0
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_transformer.js +251 -0
- package/packages/dd-trace/src/opentelemetry/metrics/periodic_metric_reader.js +532 -0
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_http_exporter_base.js +10 -18
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_transformer_base.js +36 -22
- package/packages/dd-trace/src/opentelemetry/otlp/protobuf_loader.js +1 -1
- package/packages/dd-trace/src/opentelemetry/span.js +1 -1
- package/packages/dd-trace/src/opentelemetry/tracer.js +1 -1
- package/packages/dd-trace/src/opentelemetry/tracer_provider.js +1 -1
- package/packages/dd-trace/src/payload-tagging/index.js +2 -2
- package/packages/dd-trace/src/plugin_manager.js +4 -2
- package/packages/dd-trace/src/plugins/index.js +1 -0
- package/packages/dd-trace/src/plugins/util/test.js +3 -3
- package/packages/dd-trace/src/plugins/util/url.js +119 -1
- package/packages/dd-trace/src/plugins/util/web.js +10 -41
- package/packages/dd-trace/src/process-tags/index.js +81 -0
- package/packages/dd-trace/src/profiling/config.js +1 -1
- package/packages/dd-trace/src/profiling/exporters/agent.js +1 -1
- package/packages/dd-trace/src/profiling/profilers/events.js +10 -1
- package/packages/dd-trace/src/proxy.js +5 -0
- package/packages/dd-trace/src/rate_limiter.js +1 -1
- package/packages/dd-trace/src/remote_config/manager.js +1 -1
- package/packages/dd-trace/src/ritm.js +1 -1
- package/packages/dd-trace/src/service-naming/schemas/v0/web.js +4 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/web.js +4 -0
- package/packages/dd-trace/src/span_format.js +9 -4
- package/packages/dd-trace/src/span_processor.js +8 -3
- package/packages/dd-trace/src/span_stats.js +15 -4
- package/packages/dd-trace/src/spanleak.js +1 -1
- package/packages/dd-trace/src/supported-configurations.json +13 -0
- package/packages/dd-trace/src/telemetry/dependencies.js +1 -1
- package/packages/dd-trace/src/telemetry/telemetry.js +11 -2
- package/vendor/dist/@datadog/sketches-js/LICENSE +39 -0
- package/vendor/dist/@datadog/sketches-js/index.js +1 -0
- package/vendor/dist/@datadog/source-map/LICENSE +28 -0
- package/vendor/dist/@datadog/source-map/index.js +1 -0
- package/vendor/dist/@isaacs/ttlcache/LICENSE +55 -0
- package/vendor/dist/@isaacs/ttlcache/index.js +1 -0
- package/vendor/dist/@opentelemetry/core/LICENSE +201 -0
- package/vendor/dist/@opentelemetry/core/index.js +1 -0
- package/vendor/dist/@opentelemetry/resources/LICENSE +201 -0
- package/vendor/dist/@opentelemetry/resources/index.js +1 -0
- package/vendor/dist/astring/LICENSE +19 -0
- package/vendor/dist/astring/index.js +1 -0
- package/vendor/dist/crypto-randomuuid/index.js +1 -0
- package/vendor/dist/escape-string-regexp/LICENSE +9 -0
- package/vendor/dist/escape-string-regexp/index.js +1 -0
- package/vendor/dist/esquery/LICENSE +24 -0
- package/vendor/dist/esquery/index.js +1 -0
- package/vendor/dist/ignore/LICENSE +21 -0
- package/vendor/dist/ignore/index.js +1 -0
- package/vendor/dist/istanbul-lib-coverage/LICENSE +24 -0
- package/vendor/dist/istanbul-lib-coverage/index.js +1 -0
- package/vendor/dist/jest-docblock/LICENSE +21 -0
- package/vendor/dist/jest-docblock/index.js +1 -0
- package/vendor/dist/jsonpath-plus/LICENSE +22 -0
- package/vendor/dist/jsonpath-plus/index.js +1 -0
- package/vendor/dist/limiter/LICENSE +19 -0
- package/vendor/dist/limiter/index.js +1 -0
- package/vendor/dist/lodash.sortby/LICENSE +47 -0
- package/vendor/dist/lodash.sortby/index.js +1 -0
- package/vendor/dist/lru-cache/LICENSE +15 -0
- package/vendor/dist/lru-cache/index.js +1 -0
- package/vendor/dist/meriyah/LICENSE +7 -0
- package/vendor/dist/meriyah/index.js +1 -0
- package/vendor/dist/module-details-from-path/LICENSE +21 -0
- package/vendor/dist/module-details-from-path/index.js +1 -0
- package/vendor/dist/mutexify/promise/LICENSE +21 -0
- package/vendor/dist/mutexify/promise/index.js +1 -0
- package/vendor/dist/opentracing/LICENSE +201 -0
- package/vendor/dist/opentracing/binary_carrier.d.ts +11 -0
- package/vendor/dist/opentracing/constants.d.ts +61 -0
- package/vendor/dist/opentracing/examples/demo/demo.d.ts +2 -0
- package/vendor/dist/opentracing/ext/tags.d.ts +90 -0
- package/vendor/dist/opentracing/functions.d.ts +20 -0
- package/vendor/dist/opentracing/global_tracer.d.ts +14 -0
- package/vendor/dist/opentracing/index.d.ts +12 -0
- package/vendor/dist/opentracing/index.js +1 -0
- package/vendor/dist/opentracing/mock_tracer/index.d.ts +5 -0
- package/vendor/dist/opentracing/mock_tracer/mock_context.d.ts +13 -0
- package/vendor/dist/opentracing/mock_tracer/mock_report.d.ts +16 -0
- package/vendor/dist/opentracing/mock_tracer/mock_span.d.ts +50 -0
- package/vendor/dist/opentracing/mock_tracer/mock_tracer.d.ts +26 -0
- package/vendor/dist/opentracing/noop.d.ts +8 -0
- package/vendor/dist/opentracing/reference.d.ts +33 -0
- package/vendor/dist/opentracing/span.d.ts +147 -0
- package/vendor/dist/opentracing/span_context.d.ts +26 -0
- package/vendor/dist/opentracing/test/api_compatibility.d.ts +16 -0
- package/vendor/dist/opentracing/test/mocktracer_implemenation.d.ts +3 -0
- package/vendor/dist/opentracing/test/noop_implementation.d.ts +4 -0
- package/vendor/dist/opentracing/test/opentracing_api.d.ts +3 -0
- package/vendor/dist/opentracing/test/unittest.d.ts +2 -0
- package/vendor/dist/opentracing/tracer.d.ts +127 -0
- package/vendor/dist/path-to-regexp/LICENSE +21 -0
- package/vendor/dist/path-to-regexp/index.js +1 -0
- package/vendor/dist/pprof-format/LICENSE +8 -0
- package/vendor/dist/pprof-format/index.js +1 -0
- package/vendor/dist/protobufjs/LICENSE +39 -0
- package/vendor/dist/protobufjs/index.js +1 -0
- package/vendor/dist/protobufjs/minimal/LICENSE +39 -0
- package/vendor/dist/protobufjs/minimal/index.js +1 -0
- package/vendor/dist/retry/LICENSE +21 -0
- package/vendor/dist/retry/index.js +1 -0
- package/vendor/dist/rfdc/LICENSE +15 -0
- package/vendor/dist/rfdc/index.js +1 -0
- package/vendor/dist/semifies/LICENSE +201 -0
- package/vendor/dist/semifies/index.js +1 -0
- package/vendor/dist/shell-quote/LICENSE +24 -0
- package/vendor/dist/shell-quote/index.js +1 -0
- package/vendor/dist/source-map/LICENSE +28 -0
- package/vendor/dist/source-map/index.js +1 -0
- package/vendor/dist/source-map/lib/util/LICENSE +28 -0
- package/vendor/dist/source-map/lib/util/index.js +1 -0
- package/vendor/dist/source-map/mappings.wasm +0 -0
- package/vendor/dist/tlhunter-sorted-set/LICENSE +21 -0
- package/vendor/dist/tlhunter-sorted-set/index.js +1 -0
- package/vendor/dist/ttl-set/LICENSE +21 -0
- package/vendor/dist/ttl-set/index.js +1 -0
|
@@ -5,6 +5,7 @@ const tags = require('../../../ext/tags')
|
|
|
5
5
|
const id = require('./id')
|
|
6
6
|
const { isError } = require('./util')
|
|
7
7
|
const { registerExtraService } = require('./service-naming/extra-services')
|
|
8
|
+
const { TRACING_FIELD_NAME } = require('./process-tags')
|
|
8
9
|
|
|
9
10
|
const SAMPLING_PRIORITY_KEY = constants.SAMPLING_PRIORITY_KEY
|
|
10
11
|
const SAMPLING_RULE_DECISION = constants.SAMPLING_RULE_DECISION
|
|
@@ -32,13 +33,13 @@ const map = {
|
|
|
32
33
|
'resource.name': 'resource'
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
function format (span,
|
|
36
|
+
function format (span, isFirstSpanInChunk = false, tagForFirstSpanInChunk = false) {
|
|
36
37
|
const formatted = formatSpan(span)
|
|
37
38
|
|
|
38
39
|
extractSpanLinks(formatted, span)
|
|
39
40
|
extractSpanEvents(formatted, span)
|
|
40
41
|
extractRootTags(formatted, span)
|
|
41
|
-
extractChunkTags(formatted, span,
|
|
42
|
+
extractChunkTags(formatted, span, isFirstSpanInChunk, tagForFirstSpanInChunk)
|
|
42
43
|
extractTags(formatted, span)
|
|
43
44
|
|
|
44
45
|
return formatted
|
|
@@ -192,10 +193,14 @@ function extractRootTags (formattedSpan, span) {
|
|
|
192
193
|
addTag({}, formattedSpan.metrics, TOP_LEVEL_KEY, 1)
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
function extractChunkTags (formattedSpan, span,
|
|
196
|
+
function extractChunkTags (formattedSpan, span, isFirstSpanInChunk, tagForFirstSpanInChunk) {
|
|
196
197
|
const context = span.context()
|
|
197
198
|
|
|
198
|
-
if (!
|
|
199
|
+
if (!isFirstSpanInChunk) return
|
|
200
|
+
|
|
201
|
+
if (tagForFirstSpanInChunk) {
|
|
202
|
+
addTag(formattedSpan.meta, formattedSpan.metrics, TRACING_FIELD_NAME, tagForFirstSpanInChunk)
|
|
203
|
+
}
|
|
199
204
|
|
|
200
205
|
for (const [key, value] of Object.entries(context._trace.tags)) {
|
|
201
206
|
addTag(formattedSpan.meta, formattedSpan.metrics, key, value)
|
|
@@ -5,6 +5,7 @@ const spanFormat = require('./span_format')
|
|
|
5
5
|
const SpanSampler = require('./span_sampler')
|
|
6
6
|
const GitMetadataTagger = require('./git_metadata_tagger')
|
|
7
7
|
const { getEnvironmentVariable } = require('./config-helper')
|
|
8
|
+
const getProcessTags = require('./process-tags')
|
|
8
9
|
|
|
9
10
|
const startedSpans = new WeakSet()
|
|
10
11
|
const finishedSpans = new WeakSet()
|
|
@@ -24,6 +25,10 @@ class SpanProcessor {
|
|
|
24
25
|
|
|
25
26
|
this._spanSampler = new SpanSampler(config.sampler)
|
|
26
27
|
this._gitMetadataTagger = new GitMetadataTagger(config)
|
|
28
|
+
|
|
29
|
+
this._processTags = config.propagateProcessTags?.enabled
|
|
30
|
+
? getProcessTags().serialized
|
|
31
|
+
: false
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
sample (span) {
|
|
@@ -49,14 +54,14 @@ class SpanProcessor {
|
|
|
49
54
|
this.sample(span)
|
|
50
55
|
this._gitMetadataTagger.tagGitMetadata(spanContext)
|
|
51
56
|
|
|
52
|
-
let
|
|
57
|
+
let isFirstSpanInChunk = true
|
|
53
58
|
|
|
54
59
|
for (const span of started) {
|
|
55
60
|
if (span._duration === undefined) {
|
|
56
61
|
active.push(span)
|
|
57
62
|
} else {
|
|
58
|
-
const formattedSpan = spanFormat(span,
|
|
59
|
-
|
|
63
|
+
const formattedSpan = spanFormat(span, isFirstSpanInChunk, this._processTags)
|
|
64
|
+
isFirstSpanInChunk = false
|
|
60
65
|
this._stats?.onSpanFinished(formattedSpan)
|
|
61
66
|
formatted.push(formattedSpan)
|
|
62
67
|
}
|
|
@@ -4,11 +4,14 @@ const os = require('os')
|
|
|
4
4
|
const { version } = require('./pkg')
|
|
5
5
|
const pkg = require('../../../package.json')
|
|
6
6
|
|
|
7
|
-
const { LogCollapsingLowestDenseDDSketch } = require('
|
|
7
|
+
const { LogCollapsingLowestDenseDDSketch } = require('../../../vendor/dist/@datadog/sketches-js')
|
|
8
8
|
const { ORIGIN_KEY, TOP_LEVEL_KEY } = require('./constants')
|
|
9
9
|
const {
|
|
10
10
|
MEASURED,
|
|
11
|
-
HTTP_STATUS_CODE
|
|
11
|
+
HTTP_STATUS_CODE,
|
|
12
|
+
HTTP_ENDPOINT,
|
|
13
|
+
HTTP_ROUTE,
|
|
14
|
+
HTTP_METHOD
|
|
12
15
|
} = require('../../../ext/tags')
|
|
13
16
|
|
|
14
17
|
const { SpanStatsExporter } = require('./exporters/span-stats')
|
|
@@ -53,7 +56,9 @@ class SpanAggStats {
|
|
|
53
56
|
resource,
|
|
54
57
|
type,
|
|
55
58
|
statusCode,
|
|
56
|
-
synthetics
|
|
59
|
+
synthetics,
|
|
60
|
+
method,
|
|
61
|
+
endpoint
|
|
57
62
|
} = this.aggKey
|
|
58
63
|
|
|
59
64
|
return {
|
|
@@ -63,6 +68,8 @@ class SpanAggStats {
|
|
|
63
68
|
Type: type,
|
|
64
69
|
HTTPStatusCode: statusCode,
|
|
65
70
|
Synthetics: synthetics,
|
|
71
|
+
HTTPMethod: method,
|
|
72
|
+
HTTPEndpoint: endpoint,
|
|
66
73
|
Hits: this.hits,
|
|
67
74
|
TopLevelHits: this.topLevelHits,
|
|
68
75
|
Errors: this.errors,
|
|
@@ -81,6 +88,8 @@ class SpanAggKey {
|
|
|
81
88
|
this.type = span.type || ''
|
|
82
89
|
this.statusCode = span.meta[HTTP_STATUS_CODE] || 0
|
|
83
90
|
this.synthetics = span.meta[ORIGIN_KEY] === 'synthetics'
|
|
91
|
+
this.endpoint = span.meta[HTTP_ROUTE] || span.meta[HTTP_ENDPOINT] || ''
|
|
92
|
+
this.method = span.meta[HTTP_METHOD] || ''
|
|
84
93
|
}
|
|
85
94
|
|
|
86
95
|
toString () {
|
|
@@ -90,7 +99,9 @@ class SpanAggKey {
|
|
|
90
99
|
this.resource,
|
|
91
100
|
this.type,
|
|
92
101
|
this.statusCode,
|
|
93
|
-
this.synthetics
|
|
102
|
+
this.synthetics,
|
|
103
|
+
this.method,
|
|
104
|
+
this.endpoint
|
|
94
105
|
].join(',')
|
|
95
106
|
}
|
|
96
107
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-console */
|
|
4
4
|
|
|
5
|
-
const SortedSet = require('tlhunter-sorted-set')
|
|
5
|
+
const SortedSet = require('../../../vendor/dist/tlhunter-sorted-set')
|
|
6
6
|
|
|
7
7
|
const INTERVAL = 1000 // look for expired spans every 1s
|
|
8
8
|
const LIFETIME = 60 * 1000 // all spans have a max lifetime of 1m
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"DD_CIVISIBILITY_GIT_UPLOAD_ENABLED": ["A"],
|
|
51
51
|
"DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED": ["A"],
|
|
52
52
|
"DD_CIVISIBILITY_ITR_ENABLED": ["A"],
|
|
53
|
+
"DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS": ["A"],
|
|
53
54
|
"DD_CIVISIBILITY_MANUAL_API_ENABLED": ["A"],
|
|
54
55
|
"DD_CIVISIBILITY_TEST_COMMAND": ["A"],
|
|
55
56
|
"DD_CIVISIBILITY_TEST_MODULE_ID": ["A"],
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
"DD_DBM_PROPAGATION_MODE": ["A"],
|
|
63
64
|
"DD_DOGSTATSD_HOST": ["A"],
|
|
64
65
|
"DD_DOGSTATSD_PORT": ["A"],
|
|
66
|
+
"DD_DYNAMIC_INSTRUMENTATION_CAPTURE_TIMEOUT_MS": ["A"],
|
|
65
67
|
"DD_DYNAMIC_INSTRUMENTATION_ENABLED": ["A"],
|
|
66
68
|
"DD_DYNAMIC_INSTRUMENTATION_PROBE_FILE": ["A"],
|
|
67
69
|
"DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS": ["A"],
|
|
@@ -70,6 +72,7 @@
|
|
|
70
72
|
"DD_ENV": ["A"],
|
|
71
73
|
"DD_EXPERIMENTAL_APPSEC_STANDALONE_ENABLED": ["A"],
|
|
72
74
|
"DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED": ["A"],
|
|
75
|
+
"DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED": ["A"],
|
|
73
76
|
"DD_EXPERIMENTAL_TEST_OPT_GIT_CACHE_ENABLED": ["A"],
|
|
74
77
|
"DD_EXPERIMENTAL_TEST_OPT_GIT_CACHE_DIR": ["A"],
|
|
75
78
|
"DD_EXTERNAL_ENV": ["A"],
|
|
@@ -124,6 +127,7 @@
|
|
|
124
127
|
"DD_LOG_LEVEL": ["A"],
|
|
125
128
|
"DD_LOGS_INJECTION": ["A"],
|
|
126
129
|
"DD_LOGS_OTEL_ENABLED": ["A"],
|
|
130
|
+
"DD_METRICS_OTEL_ENABLED": ["A"],
|
|
127
131
|
"DD_MINI_AGENT_PATH": ["A"],
|
|
128
132
|
"DD_OPENAI_LOGS_ENABLED": ["A"],
|
|
129
133
|
"DD_OPENAI_SPAN_CHAR_LIMIT": ["A"],
|
|
@@ -290,6 +294,7 @@
|
|
|
290
294
|
"DD_TRACE_GOOGLE_CLOUD_PUBSUB_ENABLED": ["A"],
|
|
291
295
|
"DD_TRACE_GOOGLE_CLOUD_VERTEXAI_ENABLED": ["A"],
|
|
292
296
|
"DD_TRACE_GOOGLE_GAX_ENABLED": ["A"],
|
|
297
|
+
"DD_TRACE_GOOGLE_GENAI_ENABLED": ["A"],
|
|
293
298
|
"DD_TRACE_GRAPHQL_ENABLED": ["A"],
|
|
294
299
|
"DD_TRACE_GRAPHQL_ERROR_EXTENSIONS": ["A"],
|
|
295
300
|
"DD_TRACE_GRAPHQL_TAG_ENABLED": ["A"],
|
|
@@ -408,6 +413,7 @@
|
|
|
408
413
|
"DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED": ["A"],
|
|
409
414
|
"DD_TRACE_REPORT_HOSTNAME": ["A"],
|
|
410
415
|
"DD_TRACE_REQUEST_ENABLED": ["A"],
|
|
416
|
+
"DD_TRACE_RESOURCE_RENAMING_ENABLED": ["A"],
|
|
411
417
|
"DD_TRACE_RESTIFY_ENABLED": ["A"],
|
|
412
418
|
"DD_TRACE_RHEA_ENABLED": ["A"],
|
|
413
419
|
"DD_TRACE_ROUTER_ENABLED": ["A"],
|
|
@@ -458,6 +464,13 @@
|
|
|
458
464
|
"OTEL_BSP_SCHEDULE_DELAY": ["A"],
|
|
459
465
|
"OTEL_BSP_MAX_EXPORT_BATCH_SIZE": ["A"],
|
|
460
466
|
"OTEL_BSP_MAX_QUEUE_SIZE": ["A"],
|
|
467
|
+
"OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": ["A"],
|
|
468
|
+
"OTEL_EXPORTER_OTLP_METRICS_HEADERS": ["A"],
|
|
469
|
+
"OTEL_EXPORTER_OTLP_METRICS_PROTOCOL": ["A"],
|
|
470
|
+
"OTEL_EXPORTER_OTLP_METRICS_TIMEOUT": ["A"],
|
|
471
|
+
"OTEL_METRIC_EXPORT_INTERVAL": ["A"],
|
|
472
|
+
"OTEL_METRIC_EXPORT_TIMEOUT": ["A"],
|
|
473
|
+
"OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE": ["A"],
|
|
461
474
|
"OTEL_METRICS_EXPORTER": ["A"],
|
|
462
475
|
"OTEL_PROPAGATORS": ["A"],
|
|
463
476
|
"OTEL_RESOURCE_ATTRIBUTES": ["A"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const path = require('path')
|
|
4
|
-
const parse = require('module-details-from-path')
|
|
4
|
+
const parse = require('../../../../vendor/dist/module-details-from-path')
|
|
5
5
|
const requirePackageJson = require('../require-package-json')
|
|
6
6
|
const { sendData } = require('./send-data')
|
|
7
7
|
const dc = require('dc-polyfill')
|
|
@@ -339,8 +339,17 @@ const nameMapping = {
|
|
|
339
339
|
otelLogsProtocol: 'OTEL_EXPORTER_OTLP_LOGS_PROTOCOL',
|
|
340
340
|
otelLogsTimeout: 'OTEL_EXPORTER_OTLP_LOGS_TIMEOUT',
|
|
341
341
|
otelLogsUrl: 'OTEL_EXPORTER_OTLP_LOGS_ENDPOINT',
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
otelBatchTimeout: 'OTEL_BSP_SCHEDULE_DELAY',
|
|
343
|
+
otelMaxExportBatchSize: 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',
|
|
344
|
+
otelMaxQueueSize: 'OTEL_BSP_MAX_QUEUE_SIZE',
|
|
345
|
+
otelMetricsEnabled: 'DD_METRICS_OTEL_ENABLED',
|
|
346
|
+
otelMetricsHeaders: 'OTEL_EXPORTER_OTLP_METRICS_HEADERS',
|
|
347
|
+
otelMetricsProtocol: 'OTEL_EXPORTER_OTLP_METRICS_PROTOCOL',
|
|
348
|
+
otelMetricsTimeout: 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT',
|
|
349
|
+
otelMetricsExportTimeout: 'OTEL_METRIC_EXPORT_TIMEOUT',
|
|
350
|
+
otelMetricsUrl: 'OTEL_EXPORTER_OTLP_METRICS_ENDPOINT',
|
|
351
|
+
otelMetricsExportInterval: 'OTEL_METRIC_EXPORT_INTERVAL',
|
|
352
|
+
otelMetricsTemporalityPreference: 'OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE',
|
|
344
353
|
}
|
|
345
354
|
|
|
346
355
|
const namesNeedFormatting = new Set(['DD_TAGS', 'peerServiceMapping', 'serviceMapping'])
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
This license applies to all parts of protobuf.js except those files
|
|
2
|
+
either explicitly including or referencing a different license or
|
|
3
|
+
located in a directory containing a different LICENSE file.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2016, Daniel Wirtz All rights reserved.
|
|
8
|
+
|
|
9
|
+
Redistribution and use in source and binary forms, with or without
|
|
10
|
+
modification, are permitted provided that the following conditions are
|
|
11
|
+
met:
|
|
12
|
+
|
|
13
|
+
* Redistributions of source code must retain the above copyright
|
|
14
|
+
notice, this list of conditions and the following disclaimer.
|
|
15
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
16
|
+
notice, this list of conditions and the following disclaimer in the
|
|
17
|
+
documentation and/or other materials provided with the distribution.
|
|
18
|
+
* Neither the name of its author, nor the names of its contributors
|
|
19
|
+
may be used to endorse or promote products derived from this software
|
|
20
|
+
without specific prior written permission.
|
|
21
|
+
|
|
22
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
23
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
24
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
25
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
26
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
27
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
28
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
29
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
30
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
31
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
32
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
Code generated by the command line utilities is owned by the owner
|
|
37
|
+
of the input file used when generating it. This code is not
|
|
38
|
+
standalone and requires a support library to be linked with it. This
|
|
39
|
+
support library is itself covered by the above license.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var __webpack_modules__={"./@datadog/sketches-js/dist/ddsketch/DDSketch.js":function(t,e,n){var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.LogCollapsingHighestDenseDDSketch=e.LogCollapsingLowestDenseDDSketch=e.DDSketch=void 0;var o=n("./@datadog/sketches-js/dist/ddsketch/store/index.js"),r=n("./@datadog/sketches-js/dist/ddsketch/mapping/index.js"),s=.01,u=2048,a=function(){function t(t){var e=t.mapping,n=t.store,i=t.negativeStore,o=t.zeroCount;this.mapping=e,this.store=n,this.negativeStore=i,this.zeroCount=o,this.count=this.negativeStore.count+this.zeroCount+this.store.count,this.min=1/0,this.max=-1/0,this.sum=0}return t.prototype.accept=function(t,e){if(void 0===e&&(e=1),e<=0)throw Error("Weight must be a positive number");if(t>this.mapping.minPossible){var n=this.mapping.key(t);this.store.add(n,e)}else if(t<-this.mapping.minPossible){var n=this.mapping.key(-t);this.negativeStore.add(n,e)}else this.zeroCount+=e;this.count+=e,this.sum+=t*e,t<this.min&&(this.min=t),t>this.max&&(this.max=t)},t.prototype.getValueAtQuantile=function(t){if(t<0||t>1||0===this.count)return NaN;var e=t*(this.count-1),n=0;if(e<this.negativeStore.count){var i=this.negativeStore.count-e-1,o=this.negativeStore.keyAtRank(i,!1);n=-this.mapping.value(o)}else{if(e<this.zeroCount+this.negativeStore.count)return 0;var o=this.store.keyAtRank(e-this.zeroCount-this.negativeStore.count);n=this.mapping.value(o)}return n},t.prototype.merge=function(t){if(!this.mergeable(t))throw Error("Cannot merge two DDSketches with different `relativeAccuracy` parameters");if(0!==t.count){if(0===this.count)return void this._copy(t);this.store.merge(t.store),this.zeroCount+=t.zeroCount,this.count+=t.count,this.sum+=t.sum,t.min<this.min&&(this.min=t.min),t.max>this.max&&(this.max=t.max)}},t.prototype.mergeable=function(t){return this.mapping.gamma===t.mapping.gamma},t.prototype._copy=function(t){this.store.copy(t.store),this.negativeStore.copy(t.negativeStore),this.zeroCount=t.zeroCount,this.min=t.min,this.max=t.max,this.count=t.count,this.sum=t.sum},t.prototype.toProto=function(){var t=n("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").DDSketch,e=t.create({mapping:this.mapping.toProto(),positiveValues:this.store.toProto(),negativeValues:this.negativeStore.toProto(),zeroCount:this.zeroCount});return t.encode(e).finish()},t.fromProto=function(e){var i=n("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").DDSketch.decode(e);return new t({mapping:r.KeyMapping.fromProto(i.mapping),store:o.DenseStore.fromProto(i.positiveValues),negativeStore:o.DenseStore.fromProto(i.negativeValues),zeroCount:i.zeroCount})},t}(),f={relativeAccuracy:s};e.DDSketch=function(t){function e(e){var n=(void 0===e?f:e).relativeAccuracy,i=void 0===n?s:n,u=new r.LogarithmicMapping(i),a=new o.DenseStore,c=new o.DenseStore;return t.call(this,{mapping:u,store:a,negativeStore:c,zeroCount:0})||this}return i(e,t),e}(a),e.LogCollapsingLowestDenseDDSketch=function(t){function e(e){var n=void 0===e?f:e,i=n.relativeAccuracy,a=void 0===i?s:i,c=n.binLimit,p=void 0===c?u:c,l=new r.LogarithmicMapping(a),h=new o.CollapsingLowestDenseStore(p),d=new o.CollapsingLowestDenseStore(p);return t.call(this,{mapping:l,store:h,negativeStore:d,zeroCount:0})||this}return i(e,t),e}(a),e.LogCollapsingHighestDenseDDSketch=function(t){function e(e){var n=void 0===e?f:e,i=n.relativeAccuracy,a=void 0===i?s:i,c=n.binLimit,p=void 0===c?u:c,l=new r.LogarithmicMapping(a),h=new o.CollapsingHighestDenseStore(p),d=new o.CollapsingHighestDenseStore(p);return t.call(this,{mapping:l,store:h,negativeStore:d,zeroCount:0})||this}return i(e,t),e}(a)},"./@datadog/sketches-js/dist/ddsketch/index.js":function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n("./@datadog/sketches-js/dist/ddsketch/DDSketch.js"),e)},"./@datadog/sketches-js/dist/ddsketch/mapping/CubicallyInterpolatedMapping.js":function(t,e,n){var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.CubicallyInterpolatedMapping=void 0;var o=n("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js"),r=n("./@datadog/sketches-js/dist/ddsketch/math.js");e.CubicallyInterpolatedMapping=function(t){function e(e,n){void 0===n&&(n=0);var i=t.call(this,e,n)||this;return i.A=6/35,i.B=-.6,i.C=10/7,i._multiplier/=i.C,i}return i(e,t),e.prototype._cubicLog2Approx=function(t){var e=(0,r.frexp)(t),n=e[0],i=e[1],o=2*n-1;return((this.A*o+this.B)*o+this.C)*o+(i-1)},e.prototype._cubicExp2Approx=function(t){var e=Math.floor(t),n=this.B*this.B-3*this.A*this.C,i=2*this.B*this.B*this.B-9*this.A*this.B*this.C-27*this.A*this.A*(t-e),o=Math.cbrt((i-Math.sqrt(i*i-4*n*n*n))/2),s=(-(this.B+o+n/o)/(3*this.A)+1)/2;return(0,r.ldexp)(s,e+1)},e.prototype._logGamma=function(t){return this._cubicLog2Approx(t)*this._multiplier},e.prototype._powGamma=function(t){return this._cubicExp2Approx(t/this._multiplier)},e.prototype._protoInterpolation=function(){return n("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.CUBIC},e}(o.KeyMapping)},"./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.KeyMapping=void 0;var i=n("./@datadog/sketches-js/dist/ddsketch/mapping/index.js"),o=11125369292536007e-324,r=Number.MAX_VALUE;e.KeyMapping=function(){function t(t,e){if(void 0===e&&(e=0),t<=0||t>=1)throw Error("Relative accuracy must be between 0 and 1 when initializing a KeyMapping");this.relativeAccuracy=t,this._offset=e;var n=2*t/(1-t);this.gamma=1+n,this._multiplier=1/Math.log1p(n),this.minPossible=o*this.gamma,this.maxPossible=r/this.gamma}return t.fromGammaOffset=function(t,e){return new this((t-1)/(t+1),e)},t.prototype.key=function(t){return Math.ceil(this._logGamma(t))+this._offset},t.prototype.value=function(t){return this._powGamma(t-this._offset)*(2/(1+this.gamma))},t.prototype.toProto=function(){return n("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.create({gamma:this.gamma,indexOffset:this._offset,interpolation:this._protoInterpolation()})},t.fromProto=function(t){if(!t||null==t.gamma||null==t.indexOffset)throw Error("Failed to decode mapping from protobuf");var e=n("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation,o=t.interpolation,r=t.gamma,s=t.indexOffset;switch(o){case e.NONE:return i.LogarithmicMapping.fromGammaOffset(r,s);case e.LINEAR:return i.LinearlyInterpolatedMapping.fromGammaOffset(r,s);case e.CUBIC:return i.CubicallyInterpolatedMapping.fromGammaOffset(r,s);default:throw Error("Unrecognized mapping when decoding from protobuf")}},t.prototype._logGamma=function(t){return Math.log2(t)*this._multiplier},t.prototype._powGamma=function(t){return Math.pow(2,t/this._multiplier)},t.prototype._protoInterpolation=function(){return n("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.NONE},t}()},"./@datadog/sketches-js/dist/ddsketch/mapping/LinearlyInterpolatedMapping.js":function(t,e,n){var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.LinearlyInterpolatedMapping=void 0;var o=n("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js"),r=n("./@datadog/sketches-js/dist/ddsketch/math.js");e.LinearlyInterpolatedMapping=function(t){function e(e,n){return void 0===n&&(n=0),t.call(this,e,n)||this}return i(e,t),e.prototype._log2Approx=function(t){var e=(0,r.frexp)(t);return 2*e[0]-1+(e[1]-1)},e.prototype._exp2Approx=function(t){var e=Math.floor(t)+1,n=(t-e+2)/2;return(0,r.ldexp)(n,e)},e.prototype._logGamma=function(t){return Math.log2(t)*this._multiplier},e.prototype._powGamma=function(t){return Math.pow(2,t/this._multiplier)},e.prototype._protoInterpolation=function(){return n("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.LINEAR},e}(o.KeyMapping)},"./@datadog/sketches-js/dist/ddsketch/mapping/LogarithmicMapping.js":function(t,e,n){var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.LogarithmicMapping=void 0,e.LogarithmicMapping=function(t){function e(e,n){void 0===n&&(n=0);var i=t.call(this,e,n)||this;return i._multiplier*=Math.log(2),i}return i(e,t),e.prototype._logGamma=function(t){return Math.log2(t)*this._multiplier},e.prototype._powGamma=function(t){return Math.pow(2,t/this._multiplier)},e.prototype._protoInterpolation=function(){return n("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.NONE},e}(n("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js").KeyMapping)},"./@datadog/sketches-js/dist/ddsketch/mapping/index.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.CubicallyInterpolatedMapping=e.LinearlyInterpolatedMapping=e.LogarithmicMapping=e.KeyMapping=void 0;var i=n("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js");Object.defineProperty(e,"KeyMapping",{enumerable:!0,get:function(){return i.KeyMapping}});var o=n("./@datadog/sketches-js/dist/ddsketch/mapping/LogarithmicMapping.js");Object.defineProperty(e,"LogarithmicMapping",{enumerable:!0,get:function(){return o.LogarithmicMapping}});var r=n("./@datadog/sketches-js/dist/ddsketch/mapping/LinearlyInterpolatedMapping.js");Object.defineProperty(e,"LinearlyInterpolatedMapping",{enumerable:!0,get:function(){return r.LinearlyInterpolatedMapping}});var s=n("./@datadog/sketches-js/dist/ddsketch/mapping/CubicallyInterpolatedMapping.js");Object.defineProperty(e,"CubicallyInterpolatedMapping",{enumerable:!0,get:function(){return s.CubicallyInterpolatedMapping}})},"./@datadog/sketches-js/dist/ddsketch/math.js":function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ldexp=e.frexp=void 0,e.frexp=function(t){if(0===t||!Number.isFinite(t))return[t,0];for(var e=Math.abs(t),n=Math.max(-1023,Math.floor(Math.log2(e))+1),i=e*Math.pow(2,-n);i<.5;)i*=2,n--;for(;i>=1;)i*=.5,n++;return t<0&&(i=-i),[i,n]},e.ldexp=function(t,e){for(var n=Math.min(3,Math.ceil(Math.abs(e)/1023)),i=t,o=0;o<n;o++)i*=Math.pow(2,Math.floor((e+o)/n));return i}},"./@datadog/sketches-js/dist/ddsketch/proto/compiled.js":function(t,e,n){var i=n("./protobufjs/minimal.js"),o=i.Reader,r=i.Writer,s=i.util,u=i.roots.default||(i.roots.default={});u.DDSketch=function(){function t(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return t.prototype.mapping=null,t.prototype.positiveValues=null,t.prototype.negativeValues=null,t.prototype.zeroCount=0,t.create=function(e){return new t(e)},t.encode=function(t,e){return e||(e=r.create()),null!=t.mapping&&Object.hasOwnProperty.call(t,"mapping")&&u.IndexMapping.encode(t.mapping,e.uint32(10).fork()).ldelim(),null!=t.positiveValues&&Object.hasOwnProperty.call(t,"positiveValues")&&u.Store.encode(t.positiveValues,e.uint32(18).fork()).ldelim(),null!=t.negativeValues&&Object.hasOwnProperty.call(t,"negativeValues")&&u.Store.encode(t.negativeValues,e.uint32(26).fork()).ldelim(),null!=t.zeroCount&&Object.hasOwnProperty.call(t,"zeroCount")&&e.uint32(33).double(t.zeroCount),e},t.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},t.decode=function(t,e){t instanceof o||(t=o.create(t));for(var n=void 0===e?t.len:t.pos+e,i=new u.DDSketch;t.pos<n;){var r=t.uint32();switch(r>>>3){case 1:i.mapping=u.IndexMapping.decode(t,t.uint32());break;case 2:i.positiveValues=u.Store.decode(t,t.uint32());break;case 3:i.negativeValues=u.Store.decode(t,t.uint32());break;case 4:i.zeroCount=t.double();break;default:t.skipType(7&r)}}return i},t.decodeDelimited=function(t){return t instanceof o||(t=new o(t)),this.decode(t,t.uint32())},t.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.mapping&&t.hasOwnProperty("mapping")){var e=u.IndexMapping.verify(t.mapping);if(e)return"mapping."+e}if(null!=t.positiveValues&&t.hasOwnProperty("positiveValues")){var e=u.Store.verify(t.positiveValues);if(e)return"positiveValues."+e}if(null!=t.negativeValues&&t.hasOwnProperty("negativeValues")){var e=u.Store.verify(t.negativeValues);if(e)return"negativeValues."+e}return null!=t.zeroCount&&t.hasOwnProperty("zeroCount")&&"number"!=typeof t.zeroCount?"zeroCount: number expected":null},t.fromObject=function(t){if(t instanceof u.DDSketch)return t;var e=new u.DDSketch;if(null!=t.mapping){if("object"!=typeof t.mapping)throw TypeError(".DDSketch.mapping: object expected");e.mapping=u.IndexMapping.fromObject(t.mapping)}if(null!=t.positiveValues){if("object"!=typeof t.positiveValues)throw TypeError(".DDSketch.positiveValues: object expected");e.positiveValues=u.Store.fromObject(t.positiveValues)}if(null!=t.negativeValues){if("object"!=typeof t.negativeValues)throw TypeError(".DDSketch.negativeValues: object expected");e.negativeValues=u.Store.fromObject(t.negativeValues)}return null!=t.zeroCount&&(e.zeroCount=Number(t.zeroCount)),e},t.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.mapping=null,n.positiveValues=null,n.negativeValues=null,n.zeroCount=0),null!=t.mapping&&t.hasOwnProperty("mapping")&&(n.mapping=u.IndexMapping.toObject(t.mapping,e)),null!=t.positiveValues&&t.hasOwnProperty("positiveValues")&&(n.positiveValues=u.Store.toObject(t.positiveValues,e)),null!=t.negativeValues&&t.hasOwnProperty("negativeValues")&&(n.negativeValues=u.Store.toObject(t.negativeValues,e)),null!=t.zeroCount&&t.hasOwnProperty("zeroCount")&&(n.zeroCount=e.json&&!isFinite(t.zeroCount)?String(t.zeroCount):t.zeroCount),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},t}(),u.IndexMapping=function(){function t(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return t.prototype.gamma=0,t.prototype.indexOffset=0,t.prototype.interpolation=0,t.create=function(e){return new t(e)},t.encode=function(t,e){return e||(e=r.create()),null!=t.gamma&&Object.hasOwnProperty.call(t,"gamma")&&e.uint32(9).double(t.gamma),null!=t.indexOffset&&Object.hasOwnProperty.call(t,"indexOffset")&&e.uint32(17).double(t.indexOffset),null!=t.interpolation&&Object.hasOwnProperty.call(t,"interpolation")&&e.uint32(24).int32(t.interpolation),e},t.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},t.decode=function(t,e){t instanceof o||(t=o.create(t));for(var n=void 0===e?t.len:t.pos+e,i=new u.IndexMapping;t.pos<n;){var r=t.uint32();switch(r>>>3){case 1:i.gamma=t.double();break;case 2:i.indexOffset=t.double();break;case 3:i.interpolation=t.int32();break;default:t.skipType(7&r)}}return i},t.decodeDelimited=function(t){return t instanceof o||(t=new o(t)),this.decode(t,t.uint32())},t.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.gamma&&t.hasOwnProperty("gamma")&&"number"!=typeof t.gamma)return"gamma: number expected";if(null!=t.indexOffset&&t.hasOwnProperty("indexOffset")&&"number"!=typeof t.indexOffset)return"indexOffset: number expected";if(null!=t.interpolation&&t.hasOwnProperty("interpolation"))switch(t.interpolation){default:return"interpolation: enum value expected";case 0:case 1:case 2:case 3:}return null},t.fromObject=function(t){if(t instanceof u.IndexMapping)return t;var e=new u.IndexMapping;switch(null!=t.gamma&&(e.gamma=Number(t.gamma)),null!=t.indexOffset&&(e.indexOffset=Number(t.indexOffset)),t.interpolation){case"NONE":case 0:e.interpolation=0;break;case"LINEAR":case 1:e.interpolation=1;break;case"QUADRATIC":case 2:e.interpolation=2;break;case"CUBIC":case 3:e.interpolation=3}return e},t.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.gamma=0,n.indexOffset=0,n.interpolation=e.enums===String?"NONE":0),null!=t.gamma&&t.hasOwnProperty("gamma")&&(n.gamma=e.json&&!isFinite(t.gamma)?String(t.gamma):t.gamma),null!=t.indexOffset&&t.hasOwnProperty("indexOffset")&&(n.indexOffset=e.json&&!isFinite(t.indexOffset)?String(t.indexOffset):t.indexOffset),null!=t.interpolation&&t.hasOwnProperty("interpolation")&&(n.interpolation=e.enums===String?u.IndexMapping.Interpolation[t.interpolation]:t.interpolation),n},t.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},t.Interpolation=function(){var t={},e=Object.create(t);return e[t[0]="NONE"]=0,e[t[1]="LINEAR"]=1,e[t[2]="QUADRATIC"]=2,e[t[3]="CUBIC"]=3,e}(),t}(),u.Store=function(){function t(t){if(this.binCounts={},this.contiguousBinCounts=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)null!=t[e[n]]&&(this[e[n]]=t[e[n]])}return t.prototype.binCounts=s.emptyObject,t.prototype.contiguousBinCounts=s.emptyArray,t.prototype.contiguousBinIndexOffset=0,t.create=function(e){return new t(e)},t.encode=function(t,e){if(e||(e=r.create()),null!=t.binCounts&&Object.hasOwnProperty.call(t,"binCounts"))for(var n=Object.keys(t.binCounts),i=0;i<n.length;++i)e.uint32(10).fork().uint32(8).sint32(n[i]).uint32(17).double(t.binCounts[n[i]]).ldelim();if(null!=t.contiguousBinCounts&&t.contiguousBinCounts.length){e.uint32(18).fork();for(var i=0;i<t.contiguousBinCounts.length;++i)e.double(t.contiguousBinCounts[i]);e.ldelim()}return null!=t.contiguousBinIndexOffset&&Object.hasOwnProperty.call(t,"contiguousBinIndexOffset")&&e.uint32(24).sint32(t.contiguousBinIndexOffset),e},t.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},t.decode=function(t,e){t instanceof o||(t=o.create(t));for(var n,i,r=void 0===e?t.len:t.pos+e,a=new u.Store;t.pos<r;){var f=t.uint32();switch(f>>>3){case 1:a.binCounts===s.emptyObject&&(a.binCounts={});var c=t.uint32()+t.pos;for(n=0,i=0;t.pos<c;){var p=t.uint32();switch(p>>>3){case 1:n=t.sint32();break;case 2:i=t.double();break;default:t.skipType(7&p)}}a.binCounts[n]=i;break;case 2:if(a.contiguousBinCounts&&a.contiguousBinCounts.length||(a.contiguousBinCounts=[]),(7&f)==2)for(var c=t.uint32()+t.pos;t.pos<c;)a.contiguousBinCounts.push(t.double());else a.contiguousBinCounts.push(t.double());break;case 3:a.contiguousBinIndexOffset=t.sint32();break;default:t.skipType(7&f)}}return a},t.decodeDelimited=function(t){return t instanceof o||(t=new o(t)),this.decode(t,t.uint32())},t.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.binCounts&&t.hasOwnProperty("binCounts")){if(!s.isObject(t.binCounts))return"binCounts: object expected";for(var e=Object.keys(t.binCounts),n=0;n<e.length;++n){if(!s.key32Re.test(e[n]))return"binCounts: integer key{k:sint32} expected";if("number"!=typeof t.binCounts[e[n]])return"binCounts: number{k:sint32} expected"}}if(null!=t.contiguousBinCounts&&t.hasOwnProperty("contiguousBinCounts")){if(!Array.isArray(t.contiguousBinCounts))return"contiguousBinCounts: array expected";for(var n=0;n<t.contiguousBinCounts.length;++n)if("number"!=typeof t.contiguousBinCounts[n])return"contiguousBinCounts: number[] expected"}return null!=t.contiguousBinIndexOffset&&t.hasOwnProperty("contiguousBinIndexOffset")&&!s.isInteger(t.contiguousBinIndexOffset)?"contiguousBinIndexOffset: integer expected":null},t.fromObject=function(t){if(t instanceof u.Store)return t;var e=new u.Store;if(t.binCounts){if("object"!=typeof t.binCounts)throw TypeError(".Store.binCounts: object expected");e.binCounts={};for(var n=Object.keys(t.binCounts),i=0;i<n.length;++i)e.binCounts[n[i]]=Number(t.binCounts[n[i]])}if(t.contiguousBinCounts){if(!Array.isArray(t.contiguousBinCounts))throw TypeError(".Store.contiguousBinCounts: array expected");e.contiguousBinCounts=[];for(var i=0;i<t.contiguousBinCounts.length;++i)e.contiguousBinCounts[i]=Number(t.contiguousBinCounts[i])}return null!=t.contiguousBinIndexOffset&&(e.contiguousBinIndexOffset=0|t.contiguousBinIndexOffset),e},t.toObject=function(t,e){e||(e={});var n,i={};if((e.arrays||e.defaults)&&(i.contiguousBinCounts=[]),(e.objects||e.defaults)&&(i.binCounts={}),e.defaults&&(i.contiguousBinIndexOffset=0),t.binCounts&&(n=Object.keys(t.binCounts)).length){i.binCounts={};for(var o=0;o<n.length;++o)i.binCounts[n[o]]=e.json&&!isFinite(t.binCounts[n[o]])?String(t.binCounts[n[o]]):t.binCounts[n[o]]}if(t.contiguousBinCounts&&t.contiguousBinCounts.length){i.contiguousBinCounts=[];for(var o=0;o<t.contiguousBinCounts.length;++o)i.contiguousBinCounts[o]=e.json&&!isFinite(t.contiguousBinCounts[o])?String(t.contiguousBinCounts[o]):t.contiguousBinCounts[o]}return null!=t.contiguousBinIndexOffset&&t.hasOwnProperty("contiguousBinIndexOffset")&&(i.contiguousBinIndexOffset=t.contiguousBinIndexOffset),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},t}(),t.exports=u},"./@datadog/sketches-js/dist/ddsketch/store/CollapsingHighestDenseStore.js":function(t,e,n){var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsingHighestDenseStore=void 0;var o=n("./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js"),r=n("./@datadog/sketches-js/dist/ddsketch/store/util.js");e.CollapsingHighestDenseStore=function(t){function e(e,n){var i=t.call(this,n)||this;return i.binLimit=e,i.isCollapsed=!1,i}return i(e,t),e.prototype.merge=function(t){if(0!==t.count){if(0===this.count)return void this.copy(t);(t.minKey<this.minKey||t.maxKey>this.maxKey)&&this._extendRange(t.minKey,t.maxKey);var e=t.maxKey-t.offset+1,n=Math.max(this.maxKey+1,t.minKey)-t.offset;if(e>n){var i=(0,r.sumOfRange)(t.bins,n,e);this.bins[this.length()-1]+=i}else n=e;for(var o=t.minKey;o<n+t.offset;o++)this.bins[o-this.offset]+=t.bins[o-t.offset];this.count+=t.count}},e.prototype.copy=function(e){t.prototype.copy.call(this,e),this.isCollapsed=e.isCollapsed},e.prototype._getNewLength=function(t,e){var n=e-t+1;return Math.min(this.chunkSize*Math.ceil(n/this.chunkSize),this.binLimit)},e.prototype._adjust=function(t,e){if(e-t+1>this.length())if((e=t+this.length()+1)<=this.minKey)this.offset=t,this.maxKey=e,this.bins.fill(0),this.bins[this.length()-1]=this.count;else{var n=this.offset-t;if(n>0){var i=e-this.offset+1,o=this.maxKey-this.offset+1,s=(0,r.sumOfRange)(this.bins,i,o);this.bins.fill(0,i,o),this.bins[i-1]+=s,this.maxKey=e,this._shiftBins(n)}else this.maxKey=e,this._shiftBins(n);this.minKey=t,this.isCollapsed=!0}else this._centerBins(t,e),this.minKey=t,this.maxKey=e},e.prototype._getIndex=function(t){if(t<this.minKey){if(this.isCollapsed||(this._extendRange(t),this.isCollapsed))return this.length()-1}else t>this.maxKey&&this._extendRange(t);return t-this.offset},e}(o.DenseStore)},"./@datadog/sketches-js/dist/ddsketch/store/CollapsingLowestDenseStore.js":function(t,e,n){var i=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsingLowestDenseStore=void 0;var o=n("./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js"),r=n("./@datadog/sketches-js/dist/ddsketch/store/util.js");e.CollapsingLowestDenseStore=function(t){function e(e,n){var i=t.call(this,n)||this;return i.binLimit=e,i.isCollapsed=!1,i}return i(e,t),e.prototype.merge=function(t){if(0!==t.count){if(0===this.count)return void this.copy(t);(t.minKey<this.minKey||t.maxKey>this.maxKey)&&this._extendRange(t.minKey,t.maxKey);var e=t.minKey-t.offset,n=Math.min(this.minKey,t.maxKey+1)-t.offset;if(n>e){var i=(0,r.sumOfRange)(t.bins,e,n);this.bins[0]+=i}else n=e;for(var o=n+t.offset;o<t.maxKey+1;o++)this.bins[o-this.offset]+=t.bins[o-t.offset];this.count+=t.count}},e.prototype.copy=function(e){t.prototype.copy.call(this,e),this.isCollapsed=e.isCollapsed},e.prototype._getNewLength=function(t,e){var n=e-t+1;return Math.min(this.chunkSize*Math.ceil(n/this.chunkSize),this.binLimit)},e.prototype._adjust=function(t,e){if(e-t+1>this.length()){if((t=e-this.length()+1)>=this.maxKey)this.offset=t,this.minKey=t,this.bins.fill(0),this.bins[0]=this.count;else{var n=this.offset-t;if(n<0){var i=this.minKey-this.offset,o=t-this.offset,s=(0,r.sumOfRange)(this.bins,i,o);this.bins.fill(0,i,o),this.bins[o]+=s,this.minKey=t,this._shiftBins(n)}else this.minKey=t,this._shiftBins(n)}this.maxKey=e,this.isCollapsed=!0}else this._centerBins(t,e),this.minKey=t,this.maxKey=e},e.prototype._getIndex=function(t){if(t<this.minKey){if(this.isCollapsed||(this._extendRange(t),this.isCollapsed))return 0}else t>this.maxKey&&this._extendRange(t);return t-this.offset},e}(o.DenseStore)},"./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js":function(t,e,n){var i=this&&this.__spreadArray||function(t,e,n){if(n||2==arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.DenseStore=void 0;var o=n("./@datadog/sketches-js/dist/ddsketch/store/util.js"),r=128;e.DenseStore=function(){function t(t){void 0===t&&(t=r),this.chunkSize=t,this.bins=[],this.count=0,this.minKey=1/0,this.maxKey=-1/0,this.offset=0}return t.prototype.add=function(t,e){void 0===e&&(e=1);var n=this._getIndex(t);this.bins[n]+=e,this.count+=e},t.prototype.keyAtRank=function(t,e){void 0===e&&(e=!0);for(var n=0,i=0;i<this.length();i++)if(n+=this.bins[i],e&&n>t||!e&&n>=t+1)return i+this.offset;return this.maxKey},t.prototype.merge=function(t){if(0!==t.count){if(0===this.count)return void this.copy(t);(t.minKey<this.minKey||t.maxKey>this.maxKey)&&this._extendRange(t.minKey,t.maxKey);var e=t.minKey-t.offset,n=Math.min(this.minKey,t.maxKey+1)-t.offset;if(n>e){var i=(0,o.sumOfRange)(t.bins,e,n);this.bins[0]+=i}else n=e;for(var r=n+t.offset;r<t.maxKey+1;r++)this.bins[r-this.offset]+=t.bins[r-t.offset];this.count+=t.count}},t.prototype.copy=function(t){this.bins=i([],t.bins,!0),this.count=t.count,this.minKey=t.minKey,this.maxKey=t.maxKey,this.offset=t.offset},t.prototype.length=function(){return this.bins.length},t.prototype._getNewLength=function(t,e){var n=e-t+1;return this.chunkSize*Math.ceil(n/this.chunkSize)},t.prototype._adjust=function(t,e){this._centerBins(t,e),this.minKey=t,this.maxKey=e},t.prototype._shiftBins=function(t){var e,n;t>0?(this.bins=this.bins.slice(0,-t),(e=this.bins).unshift.apply(e,Array(t).fill(0))):(this.bins=this.bins.slice(Math.abs(t)),(n=this.bins).push.apply(n,Array(Math.abs(t)).fill(0))),this.offset-=t},t.prototype._centerBins=function(t,e){var n=t+Math.floor((e-t+1)/2);this._shiftBins(Math.floor(this.offset+this.length()/2)-n)},t.prototype._extendRange=function(t,e){e=e||t;var n,i=Math.min(t,e,this.minKey),o=Math.max(t,e,this.maxKey);if(0===this.length())this.bins=Array(this._getNewLength(i,o)).fill(0),this.offset=i,this._adjust(i,o);else if(i>=this.minKey&&o<this.offset+this.length())this.minKey=i,this.maxKey=o;else{var r=this._getNewLength(i,o);r>this.length()&&(n=this.bins).push.apply(n,Array(r-this.length()).fill(0)),this._adjust(i,o)}},t.prototype._getIndex=function(t){return t<this.minKey?this._extendRange(t):t>this.maxKey&&this._extendRange(t),t-this.offset},t.prototype.toProto=function(){return n("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").Store.create({contiguousBinCounts:this.bins,contiguousBinIndexOffset:this.offset})},t.fromProto=function(t){if(!t||null==t.contiguousBinCounts||null==t.contiguousBinIndexOffset)throw Error("Failed to decode store from protobuf");var e=new this,n=t.contiguousBinIndexOffset;e.offset=n;for(var i=0,o=t.contiguousBinCounts;i<o.length;i++){var r=o[i];e.add(n,r),n+=1}return e},t}()},"./@datadog/sketches-js/dist/ddsketch/store/index.js":function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsingHighestDenseStore=e.CollapsingLowestDenseStore=e.DenseStore=void 0;var i=n("./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js");Object.defineProperty(e,"DenseStore",{enumerable:!0,get:function(){return i.DenseStore}});var o=n("./@datadog/sketches-js/dist/ddsketch/store/CollapsingLowestDenseStore.js");Object.defineProperty(e,"CollapsingLowestDenseStore",{enumerable:!0,get:function(){return o.CollapsingLowestDenseStore}});var r=n("./@datadog/sketches-js/dist/ddsketch/store/CollapsingHighestDenseStore.js");Object.defineProperty(e,"CollapsingHighestDenseStore",{enumerable:!0,get:function(){return r.CollapsingHighestDenseStore}})},"./@datadog/sketches-js/dist/ddsketch/store/util.js":function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.sumOfRange=void 0,e.sumOfRange=function(t,e,n){for(var i=0,o=e;o<=n;o++)i+=t[o];return i}},"./@datadog/sketches-js/dist/index.js":function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,o)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n("./@datadog/sketches-js/dist/ddsketch/index.js"),e)},"./@protobufjs/aspromise/index.js":function(t){t.exports=e;function e(t,e){for(var n=Array(arguments.length-1),i=0,o=2,r=!0;o<arguments.length;)n[i++]=arguments[o++];return new Promise(function(o,s){n[i]=function(t){if(r)if(r=!1,t)s(t);else{for(var e=Array(arguments.length-1),n=0;n<e.length;)e[n++]=arguments[n];o.apply(null,e)}};try{t.apply(e||null,n)}catch(t){r&&(r=!1,s(t))}})}},"./@protobufjs/base64/index.js":function(t,e){var n=e;n.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&"="===t.charAt(e);)++n;return Math.ceil(3*t.length)/4-n};for(var i=Array(64),o=Array(123),r=0;r<64;)o[i[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;n.encode=function(t,e,n){for(var o,r=null,s=[],u=0,a=0;e<n;){var f=t[e++];switch(a){case 0:s[u++]=i[f>>2],o=(3&f)<<4,a=1;break;case 1:s[u++]=i[o|f>>4],o=(15&f)<<2,a=2;break;case 2:s[u++]=i[o|f>>6],s[u++]=i[63&f],a=0}u>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,s)),u=0)}return(a&&(s[u++]=i[o],s[u++]=61,1===a&&(s[u++]=61)),r)?(u&&r.push(String.fromCharCode.apply(String,s.slice(0,u))),r.join("")):String.fromCharCode.apply(String,s.slice(0,u))};var s="invalid encoding";n.decode=function(t,e,n){for(var i,r=n,u=0,a=0;a<t.length;){var f=t.charCodeAt(a++);if(61===f&&u>1)break;if(void 0===(f=o[f]))throw Error(s);switch(u){case 0:i=f,u=1;break;case 1:e[n++]=i<<2|(48&f)>>4,i=f,u=2;break;case 2:e[n++]=(15&i)<<4|(60&f)>>2,i=f,u=3;break;case 3:e[n++]=(3&i)<<6|f,u=0}}if(1===u)throw Error(s);return n-r},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},"./@protobufjs/eventemitter/index.js":function(t){function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var n=this._listeners[t],i=0;i<n.length;)n[i].fn===e?n.splice(i,1):++i;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var n=[],i=1;i<arguments.length;)n.push(arguments[i++]);for(i=0;i<e.length;)e[i].fn.apply(e[i++].ctx,n)}return this}},"./@protobufjs/float/index.js":function(t){function e(t){return"undefined"!=typeof Float32Array?!function(){var e=new Float32Array([-0]),n=new Uint8Array(e.buffer),i=128===n[3];function o(t,i,o){e[0]=t,i[o]=n[0],i[o+1]=n[1],i[o+2]=n[2],i[o+3]=n[3]}function r(t,i,o){e[0]=t,i[o]=n[3],i[o+1]=n[2],i[o+2]=n[1],i[o+3]=n[0]}function s(t,i){return n[0]=t[i],n[1]=t[i+1],n[2]=t[i+2],n[3]=t[i+3],e[0]}function u(t,i){return n[3]=t[i],n[2]=t[i+1],n[1]=t[i+2],n[0]=t[i+3],e[0]}t.writeFloatLE=i?o:r,t.writeFloatBE=i?r:o,t.readFloatLE=i?s:u,t.readFloatBE=i?u:s}():!function(){function e(t,e,n,i){var o=+(e<0);if(o&&(e=-e),0===e)t(1/e>0?0:0x80000000,n,i);else if(isNaN(e))t(0x7fc00000,n,i);else if(e>34028234663852886e22)t((o<<31|0x7f800000)>>>0,n,i);else if(e<11754943508222875e-54)t((o<<31|Math.round(e/1401298464324817e-60))>>>0,n,i);else{var r=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-r)*8388608);t((o<<31|r+127<<23|s)>>>0,n,i)}}function s(t,e,n){var i=t(e,n),o=(i>>31)*2+1,r=i>>>23&255,s=8388607&i;return 255===r?s?NaN:1/0*o:0===r?1401298464324817e-60*o*s:o*Math.pow(2,r-150)*(s+8388608)}t.writeFloatLE=e.bind(null,n),t.writeFloatBE=e.bind(null,i),t.readFloatLE=s.bind(null,o),t.readFloatBE=s.bind(null,r)}(),"undefined"!=typeof Float64Array?!function(){var e=new Float64Array([-0]),n=new Uint8Array(e.buffer),i=128===n[7];function o(t,i,o){e[0]=t,i[o]=n[0],i[o+1]=n[1],i[o+2]=n[2],i[o+3]=n[3],i[o+4]=n[4],i[o+5]=n[5],i[o+6]=n[6],i[o+7]=n[7]}function r(t,i,o){e[0]=t,i[o]=n[7],i[o+1]=n[6],i[o+2]=n[5],i[o+3]=n[4],i[o+4]=n[3],i[o+5]=n[2],i[o+6]=n[1],i[o+7]=n[0]}function s(t,i){return n[0]=t[i],n[1]=t[i+1],n[2]=t[i+2],n[3]=t[i+3],n[4]=t[i+4],n[5]=t[i+5],n[6]=t[i+6],n[7]=t[i+7],e[0]}function u(t,i){return n[7]=t[i],n[6]=t[i+1],n[5]=t[i+2],n[4]=t[i+3],n[3]=t[i+4],n[2]=t[i+5],n[1]=t[i+6],n[0]=t[i+7],e[0]}t.writeDoubleLE=i?o:r,t.writeDoubleBE=i?r:o,t.readDoubleLE=i?s:u,t.readDoubleBE=i?u:s}():!function(){function e(t,e,n,i,o,r){var s,u=+(i<0);if(u&&(i=-i),0===i)t(0,o,r+e),t(1/i>0?0:0x80000000,o,r+n);else if(isNaN(i))t(0,o,r+e),t(0x7ff80000,o,r+n);else if(i>17976931348623157e292)t(0,o,r+e),t((u<<31|0x7ff00000)>>>0,o,r+n);else if(i<22250738585072014e-324)t((s=i/5e-324)>>>0,o,r+e),t((u<<31|s/0x100000000)>>>0,o,r+n);else{var a=Math.floor(Math.log(i)/Math.LN2);1024===a&&(a=1023),t(0x10000000000000*(s=i*Math.pow(2,-a))>>>0,o,r+e),t((u<<31|a+1023<<20|1048576*s&1048575)>>>0,o,r+n)}}function s(t,e,n,i,o){var r=t(i,o+e),s=t(i,o+n),u=(s>>31)*2+1,a=s>>>20&2047,f=0x100000000*(1048575&s)+r;return 2047===a?f?NaN:1/0*u:0===a?5e-324*u*f:u*Math.pow(2,a-1075)*(f+0x10000000000000)}t.writeDoubleLE=e.bind(null,n,0,4),t.writeDoubleBE=e.bind(null,i,4,0),t.readDoubleLE=s.bind(null,o,0,4),t.readDoubleBE=s.bind(null,r,4,0)}(),t}function n(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}function i(t,e,n){e[n]=t>>>24,e[n+1]=t>>>16&255,e[n+2]=t>>>8&255,e[n+3]=255&t}function o(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function r(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},"./@protobufjs/inquire/index.js":function(module){module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}},"./@protobufjs/pool/index.js":function(t){t.exports=e;function e(t,e,n){var i=n||8192,o=i>>>1,r=null,s=i;return function(n){if(n<1||n>o)return t(n);s+n>i&&(r=t(i),s=0);var u=e.call(r,s,s+=n);return 7&s&&(s=(7|s)+1),u}}},"./@protobufjs/utf8/index.js":function(t,e){var n=e;n.length=function(t){for(var e=0,n=0,i=0;i<t.length;++i)(n=t.charCodeAt(i))<128?e+=1:n<2048?e+=2:(64512&n)==55296&&(64512&t.charCodeAt(i+1))==56320?(++i,e+=4):e+=3;return e},n.read=function(t,e,n){if(n-e<1)return"";for(var i,o=null,r=[],s=0;e<n;)(i=t[e++])<128?r[s++]=i:i>191&&i<224?r[s++]=(31&i)<<6|63&t[e++]:i>239&&i<365?(i=((7&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,r[s++]=55296+(i>>10),r[s++]=56320+(1023&i)):r[s++]=(15&i)<<12|(63&t[e++])<<6|63&t[e++],s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,r)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,r.slice(0,s))),o.join("")):String.fromCharCode.apply(String,r.slice(0,s))},n.write=function(t,e,n){for(var i,o,r=n,s=0;s<t.length;++s)(i=t.charCodeAt(s))<128?e[n++]=i:(i<2048?e[n++]=i>>6|192:((64512&i)==55296&&(64512&(o=t.charCodeAt(s+1)))==56320?(i=65536+((1023&i)<<10)+(1023&o),++s,e[n++]=i>>18|240,e[n++]=i>>12&63|128):e[n++]=i>>12|224,e[n++]=i>>6&63|128),e[n++]=63&i|128);return n-r}},"./protobufjs/minimal.js":function(t,e,n){t.exports=n("./protobufjs/src/index-minimal.js")},"./protobufjs/src/index-minimal.js":function(t,e,n){var i=e;function o(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}i.build="minimal",i.Writer=n("./protobufjs/src/writer.js"),i.BufferWriter=n("./protobufjs/src/writer_buffer.js"),i.Reader=n("./protobufjs/src/reader.js"),i.BufferReader=n("./protobufjs/src/reader_buffer.js"),i.util=n("./protobufjs/src/util/minimal.js"),i.rpc=n("./protobufjs/src/rpc.js"),i.roots=n("./protobufjs/src/roots.js"),i.configure=o,o()},"./protobufjs/src/reader.js":function(t,e,n){t.exports=a;var i,o=n("./protobufjs/src/util/minimal.js"),r=o.LongBits,s=o.utf8;function u(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function a(t){this.buf=t,this.pos=0,this.len=t.length}var f="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new a(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new a(t);throw Error("illegal buffer")},c=function(){return o.Buffer?function(t){return(a.create=function(t){return o.Buffer.isBuffer(t)?new i(t):f(t)})(t)}:f};function p(){var t=new r(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw u(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}if(this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw u(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function l(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw u(this,8);return new r(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}a.create=c(),a.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,a.prototype.uint32=function(){var t=0xffffffff;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,u(this,10);return t}}(),a.prototype.int32=function(){return 0|this.uint32()},a.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},a.prototype.bool=function(){return 0!==this.uint32()},a.prototype.fixed32=function(){if(this.pos+4>this.len)throw u(this,4);return l(this.buf,this.pos+=4)},a.prototype.sfixed32=function(){if(this.pos+4>this.len)throw u(this,4);return 0|l(this.buf,this.pos+=4)},a.prototype.float=function(){if(this.pos+4>this.len)throw u(this,4);var t=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},a.prototype.double=function(){if(this.pos+8>this.len)throw u(this,4);var t=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},a.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw u(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(e,n);if(e===n){var i=o.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,e,n)},a.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},a.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw u(this,t);this.pos+=t}else do if(this.pos>=this.len)throw u(this);while(128&this.buf[this.pos++]);return this},a.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},a._configure=function(t){i=t,a.create=c(),i._configure();var e=o.Long?"toLong":"toNumber";o.merge(a.prototype,{int64:function(){return p.call(this)[e](!1)},uint64:function(){return p.call(this)[e](!0)},sint64:function(){return p.call(this).zzDecode()[e](!1)},fixed64:function(){return h.call(this)[e](!0)},sfixed64:function(){return h.call(this)[e](!1)}})}},"./protobufjs/src/reader_buffer.js":function(t,e,n){t.exports=r;var i=n("./protobufjs/src/reader.js");(r.prototype=Object.create(i.prototype)).constructor=r;var o=n("./protobufjs/src/util/minimal.js");function r(t){i.call(this,t)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},r._configure()},"./protobufjs/src/roots.js":function(t){t.exports={}},"./protobufjs/src/rpc.js":function(t,e,n){e.Service=n("./protobufjs/src/rpc/service.js")},"./protobufjs/src/rpc/service.js":function(t,e,n){t.exports=o;var i=n("./protobufjs/src/util/minimal.js");function o(t,e,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!n}(o.prototype=Object.create(i.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function t(e,n,o,r,s){if(!r)throw TypeError("request must be specified");var u=this;if(!s)return i.asPromise(t,u,e,n,o,r);if(!u.rpcImpl)return void setTimeout(function(){s(Error("already ended"))},0);try{return u.rpcImpl(e,n[u.requestDelimited?"encodeDelimited":"encode"](r).finish(),function(t,n){if(t)return u.emit("error",t,e),s(t);if(null===n)return void u.end(!0);if(!(n instanceof o))try{n=o[u.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return u.emit("error",t,e),s(t)}return u.emit("data",n,e),s(null,n)})}catch(t){u.emit("error",t,e),setTimeout(function(){s(t)},0);return}},o.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},"./protobufjs/src/util/longbits.js":function(t,e,n){t.exports=o;var i=n("./protobufjs/src/util/minimal.js");function o(t,e){this.lo=t>>>0,this.hi=e>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(t){if(0===t)return r;var e=t<0;e&&(t=-t);var n=t>>>0,i=(t-n)/0x100000000>>>0;return e&&(i=~i>>>0,n=~n>>>0,++n>0xffffffff&&(n=0,++i>0xffffffff&&(i=0))),new o(n,i)},o.from=function(t){if("number"==typeof t)return o.fromNumber(t);if(i.isString(t))if(!i.Long)return o.fromNumber(parseInt(t,10));else t=i.Long.fromString(t);return t.low||t.high?new o(t.low>>>0,t.high>>>0):r},o.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+0x100000000*n)}return this.lo+0x100000000*this.hi},o.prototype.toLong=function(t){return i.Long?new i.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var u=String.prototype.charCodeAt;o.fromHash=function(t){return t===s?r:new o((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},o.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},o.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}},"./protobufjs/src/util/minimal.js":function(t,e,n){var i=e;function o(t,e,n){for(var i=Object.keys(e),o=0;o<i.length;++o)void 0!==t[i[o]]&&n||(t[i[o]]=e[i[o]]);return t}function r(t){function e(t,n){if(!(this instanceof e))return new e(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack||""}),n&&o(this,n)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}i.asPromise=n("./@protobufjs/aspromise/index.js"),i.base64=n("./@protobufjs/base64/index.js"),i.EventEmitter=n("./@protobufjs/eventemitter/index.js"),i.float=n("./@protobufjs/float/index.js"),i.inquire=n("./@protobufjs/inquire/index.js"),i.utf8=n("./@protobufjs/utf8/index.js"),i.pool=n("./@protobufjs/pool/index.js"),i.LongBits=n("./protobufjs/src/util/longbits.js"),i.isNode=!!("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),i.global=i.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},i.isString=function(t){return"string"==typeof t||t instanceof String},i.isObject=function(t){return t&&"object"==typeof t},i.isset=i.isSet=function(t,e){var n=t[e];return!!(null!=n&&t.hasOwnProperty(e))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},i.Buffer=function(){try{var t=i.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(t){return"number"==typeof t?i.Buffer?i._Buffer_allocUnsafe(t):new i.Array(t):i.Buffer?i._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},i.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(t){return t?i.LongBits.from(t).toHash():i.LongBits.zeroHash},i.longFromHash=function(t,e){var n=i.LongBits.fromHash(t);return i.Long?i.Long.fromBits(n.lo,n.hi,e):n.toNumber(!!e)},i.merge=o,i.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},i.newError=r,i.ProtocolError=r("ProtocolError"),i.oneOfGetter=function(t){for(var e={},n=0;n<t.length;++n)e[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(1===e[t[n]]&&void 0!==this[t[n]]&&null!==this[t[n]])return t[n]}},i.oneOfSetter=function(t){return function(e){for(var n=0;n<t.length;++n)t[n]!==e&&delete this[t[n]]}},i.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},i._configure=function(){var t=i.Buffer;if(!t){i._Buffer_from=i._Buffer_allocUnsafe=null;return}i._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,n){return new t(e,n)},i._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}}},"./protobufjs/src/writer.js":function(t,e,n){t.exports=p;var i,o=n("./protobufjs/src/util/minimal.js"),r=o.LongBits,s=o.base64,u=o.utf8;function a(t,e,n){this.fn=t,this.len=e,this.next=void 0,this.val=n}function f(){}function c(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function p(){this.len=0,this.head=new a(f,0,0),this.tail=this.head,this.states=null}var l=function(){return o.Buffer?function(){return(p.create=function(){return new i})()}:function(){return new p}};function h(t,e,n){e[n]=255&t}function d(t,e,n){for(;t>127;)e[n++]=127&t|128,t>>>=7;e[n]=t}function g(t,e){this.len=t,this.next=void 0,this.val=e}function y(t,e,n){for(;t.hi;)e[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[n++]=127&t.lo|128,t.lo=t.lo>>>7;e[n++]=t.lo}function m(t,e,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24}p.create=l(),p.alloc=function(t){return new o.Array(t)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(t,e,n){return this.tail=this.tail.next=new a(t,e,n),this.len+=e,this},g.prototype=Object.create(a.prototype),g.prototype.fn=d,p.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new g((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<0x10000000?4:5,t)).len,this},p.prototype.int32=function(t){return t<0?this._push(y,10,r.fromNumber(t)):this.uint32(t)},p.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},p.prototype.uint64=function(t){var e=r.from(t);return this._push(y,e.length(),e)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(t){var e=r.from(t).zzEncode();return this._push(y,e.length(),e)},p.prototype.bool=function(t){return this._push(h,1,+!!t)},p.prototype.fixed32=function(t){return this._push(m,4,t>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(t){var e=r.from(t);return this._push(m,4,e.lo)._push(m,4,e.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(t){return this._push(o.float.writeFloatLE,4,t)},p.prototype.double=function(t){return this._push(o.float.writeDoubleLE,8,t)};var b=o.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var i=0;i<t.length;++i)e[n+i]=t[i]};p.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(h,1,0);if(o.isString(t)){var n=p.alloc(e=s.length(t));s.decode(t,n,0),t=n}return this.uint32(e)._push(b,e,t)},p.prototype.string=function(t){var e=u.length(t);return e?this.uint32(e)._push(u.write,e,t):this._push(h,1,0)},p.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new a(f,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new a(f,0,0),this.len=0),this},p.prototype.ldelim=function(){var t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=e,this.len+=n),this},p.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,e,n),n+=t.len,t=t.next;return e},p._configure=function(t){i=t,p.create=l(),i._configure()}},"./protobufjs/src/writer_buffer.js":function(t,e,n){t.exports=r;var i=n("./protobufjs/src/writer.js");(r.prototype=Object.create(i.prototype)).constructor=r;var o=n("./protobufjs/src/util/minimal.js");function r(){i.call(this)}function s(t,e,n){t.length<40?o.utf8.write(t,e,n):e.utf8Write?e.utf8Write(t,n):e.write(t,n)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var i=0;i<t.length;)e[n++]=t[i++]}},r.prototype.bytes=function(t){o.isString(t)&&(t=o._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(r.writeBytesBuffer,e,t),this},r.prototype.string=function(t){var e=o.Buffer.byteLength(t);return this.uint32(e),e&&this._push(s,e,t),this},r._configure()}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.exports}var __webpack_exports__=__webpack_require__("./@datadog/sketches-js/dist/index.js");module.exports=__webpack_exports__})();
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
Copyright (c) 2009-2011, Mozilla Foundation and contributors
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
* Neither the names of the Mozilla Foundation nor the names of project
|
|
16
|
+
contributors may be used to endorse or promote products derived from this
|
|
17
|
+
software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
20
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
21
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var e={"./@datadog/source-map/lib/array-set.js":function(e,n,r){var t=r("./@datadog/source-map/lib/util.js"),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function s(){this._array=[],this._set=i?new Map:Object.create(null)}s.fromArray=function(e,n){for(var r=new s,t=0,o=e.length;t<o;t++)r.add(e[t],n);return r},s.prototype.size=function(){return i?this._set.size:Object.getOwnPropertyNames(this._set).length},s.prototype.add=function(e,n){var r=i?e:t.toSetString(e),s=i?this.has(e):o.call(this._set,r),a=this._array.length;(!s||n)&&this._array.push(e),s||(i?this._set.set(e,a):this._set[r]=a)},s.prototype.has=function(e){if(i)return this._set.has(e);var n=t.toSetString(e);return o.call(this._set,n)},s.prototype.indexOf=function(e){if(i){var n=this._set.get(e);if(n>=0)return n}else{var r=t.toSetString(e);if(o.call(this._set,r))return this._set[r]}throw Error('"'+e+'" is not in the set.')},s.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error("No element indexed by "+e)},s.prototype.toArray=function(){return this._array.slice()},n.ArraySet=s},"./@datadog/source-map/lib/base64-vlq.js":function(e,n,r){var t=r("./@datadog/source-map/lib/base64.js");n.encode=function(e){var n,r="",o=e<0?(-e<<1)+1:(e<<1)+0;do n=31&o,(o>>>=5)>0&&(n|=32),r+=t.encode(n);while(o>0);return r},n.decode=function(e,n,r){var o,i,s,a,u=e.length,l=0,c=0;do{if(n>=u)throw Error("Expected more digits in base 64 VLQ value.");if(-1===(a=t.decode(e.charCodeAt(n++))))throw Error("Invalid base64 digit: "+e.charAt(n-1));s=!!(32&a),a&=31,l+=a<<c,c+=5}while(s);i=(o=l)>>1,r.value=(1&o)==1?-i:i,r.rest=n}},"./@datadog/source-map/lib/base64.js":function(e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e<r.length)return r[e];throw TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},"./@datadog/source-map/lib/binary-search.js":function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return -1;var i=function e(r,t,o,i,s,a){var u=Math.floor((t-r)/2)+r,l=s(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t<i.length?t:-1:u:u-r>1?e(r,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return -1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},"./@datadog/source-map/lib/mapping-list.js":function(e,n,r){var t=r("./@datadog/source-map/lib/util.js");function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){var n,r,o,i,s;(n=this._last,r=n.generatedLine,o=e.generatedLine,i=n.generatedColumn,s=e.generatedColumn,o>r||o==r&&s>=i||0>=t.compareByGeneratedPositionsInflated(n,e))?this._last=e:this._sorted=!1,this._array.push(e)},o.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},"./@datadog/source-map/lib/quick-sort.js":function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}n.quickSort=function(e,n){!function e(n,t,o,i){if(o<i){var s=Math.round(o+Math.random()*(i-o)),a=o-1;r(n,s,i);for(var u=n[i],l=o;l<i;l++)0>=t(n[l],u)&&r(n,a+=1,l);r(n,a+1,l);var c=a+1;e(n,t,o,c-1),e(n,t,c+1,i)}}(e,n,0,e.length-1)}},"./@datadog/source-map/lib/source-map-consumer.js":function(e,n,r){var t=r("./@datadog/source-map/lib/util.js"),o=r("./@datadog/source-map/lib/binary-search.js"),i=r("./@datadog/source-map/lib/array-set.js").ArraySet,s=r("./@datadog/source-map/lib/base64-vlq.js"),a=r("./@datadog/source-map/lib/quick-sort.js").quickSort;function u(e,n){var r=e;return"string"==typeof e&&(r=t.parseSourceMapInput(e)),null!=r.sections?new g(r,n):new l(r,n)}function l(e,n){var r=e;"string"==typeof e&&(r=t.parseSourceMapInput(e));var o=t.getArg(r,"version"),s=t.getArg(r,"sources"),a=t.getArg(r,"names",[]),u=t.getArg(r,"sourceRoot",null),l=t.getArg(r,"sourcesContent",null),c=t.getArg(r,"mappings"),g=t.getArg(r,"file",null);if(o!=this._version)throw Error("Unsupported version: "+o);u&&(u=t.normalize(u)),s=s.map(String).map(t.normalize).map(function(e){return u&&t.isAbsolute(u)&&t.isAbsolute(e)?t.relative(u,e):e}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(e){return t.computeSourceURL(u,e,n)}),this.sourceRoot=u,this.sourcesContent=l,this._mappings=c,this._sourceMapURL=n,this.file=g}function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function g(e,n){var r=e;"string"==typeof e&&(r=t.parseSourceMapInput(e));var o=t.getArg(r,"version"),s=t.getArg(r,"sections");if(o!=this._version)throw Error("Unsupported version: "+o);this._sources=new i,this._names=new i;var a={line:-1,column:0};this._sections=s.map(function(e){if(e.url)throw Error("Support for url field in sections not implemented.");var r=t.getArg(e,"offset"),o=t.getArg(r,"line"),i=t.getArg(r,"column");if(o<a.line||o===a.line&&i<a.column)throw Error("Section offsets must be ordered and non-overlapping.");return a=r,{generatedOffset:{generatedLine:o+1,generatedColumn:i+1},consumer:new u(t.getArg(e,"map"),n)}})}u.fromSourceMap=function(e,n){return l.fromSourceMap(e,n)},u.prototype._version=3,u.prototype.__generatedMappings=null,Object.defineProperty(u.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),u.prototype.__originalMappings=null,Object.defineProperty(u.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),u.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return";"===r||","===r},u.prototype._parseMappings=function(e,n){throw Error("Subclasses must implement _parseMappings")},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.GREATEST_LOWER_BOUND=1,u.LEAST_UPPER_BOUND=2,u.prototype.eachMapping=function(e,n,r){switch(r||u.GENERATED_ORDER){case u.GENERATED_ORDER:o=this._generatedMappings;break;case u.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var o,i=this.sourceRoot;o.map(function(e){var n=null===e.source?null:this._sources.at(e.source);return{source:n=t.computeSourceURL(i,n,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,n||null)},u.prototype.allGeneratedPositionsFor=function(e){var n=t.getArg(e,"line"),r={source:t.getArg(e,"source"),originalLine:n,originalColumn:t.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var i=[],s=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,o.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(void 0===e.column)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:t.getArg(a,"generatedLine",null),column:t.getArg(a,"generatedColumn",null),lastColumn:t.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var l=a.originalColumn;a&&a.originalLine===n&&a.originalColumn==l;)i.push({line:t.getArg(a,"generatedLine",null),column:t.getArg(a,"generatedColumn",null),lastColumn:t.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.prototype._findSourceIndex=function(e){var n,r=e;if(null!=this.sourceRoot&&(r=t.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==e)return n;return -1},l.fromSourceMap=function(e,n){var r=Object.create(l.prototype),o=r._names=i.fromArray(e._names.toArray(),!0),s=r._sources=i.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(e){return t.computeSourceURL(r.sourceRoot,e,n)});for(var u=e._mappings.toArray().slice(),g=r.__generatedMappings=[],p=r.__originalMappings=[],h=0,d=u.length;h<d;h++){var f=u[h],m=new c;m.generatedLine=f.generatedLine,m.generatedColumn=f.generatedColumn,f.source&&(m.source=s.indexOf(f.source),m.originalLine=f.originalLine,m.originalColumn=f.originalColumn,f.name&&(m.name=o.indexOf(f.name)),p.push(m)),g.push(m)}return a(r.__originalMappings,t.compareByOriginalPositions),r},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),l.prototype._parseMappings=function(e,n){for(var r,o,i,u,l,g=1,p=0,h=0,d=0,f=0,m=0,_=e.length,v=0,y={},C={},S=[],A=[];v<_;)if(";"===e.charAt(v))g++,v++,p=0;else if(","===e.charAt(v))v++;else{for((r=new c).generatedLine=g,u=v;u<_&&!this._charIsMappingSeparator(e,u);u++);if(i=y[o=e.slice(v,u)])v+=o.length;else{for(i=[];v<u;)s.decode(e,v,C),l=C.value,v=C.rest,i.push(l);if(2===i.length)throw Error("Found a source, but no line and column");if(3===i.length)throw Error("Found a source and line, but no column");y[o]=i}r.generatedColumn=p+i[0],p=r.generatedColumn,i.length>1&&(r.source=f+i[1],f+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=m+i[4],m+=i[4])),A.push(r),"number"==typeof r.originalLine&&S.push(r)}a(A,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,a(S,t.compareByOriginalPositions),this.__originalMappings=S},l.prototype._findMapping=function(e,n,r,t,i,s){if(e[r]<=0)throw TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw TypeError("Column must be greater than or equal to 0, got "+e[t]);return o.search(e,n,i,s)},l.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(e){var n={generatedLine:t.getArg(e,"line"),generatedColumn:t.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",t.compareByGeneratedPositionsDeflated,t.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(r>=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=t.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=t.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:t.getArg(o,"originalLine",null),column:t.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e})},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r,o=this._findSourceIndex(e);if(o>=0)return this.sourcesContent[o];var i=e;if(null!=this.sourceRoot&&(i=t.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!r.path||"/"==r.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(n)return null;throw Error('"'+i+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,"source");if((n=this._findSourceIndex(n))<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:t.getArg(e,"line"),originalColumn:t.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,"generatedLine",null),column:t.getArg(i,"generatedColumn",null),lastColumn:t.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},g.prototype=Object.create(u.prototype),g.prototype.constructor=u,g.prototype._version=3,Object.defineProperty(g.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var r=0;r<this._sections[n].consumer.sources.length;r++)e.push(this._sections[n].consumer.sources[r]);return e}}),g.prototype.originalPositionFor=function(e){var n={generatedLine:t.getArg(e,"line"),generatedColumn:t.getArg(e,"column")},r=o.search(n,this._sections,function(e,n){var r=e.generatedLine-n.generatedOffset.generatedLine;return r||e.generatedColumn-n.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:n.generatedLine-(i.generatedOffset.generatedLine-1),column:n.generatedColumn-(i.generatedOffset.generatedLine===n.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},g.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},g.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r].consumer.sourceContentFor(e,!0);if(t)return t}if(n)return null;throw Error('"'+e+'" is not in the SourceMap.')},g.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(-1!==r.consumer._findSourceIndex(t.getArg(e,"source"))){var o=r.consumer.generatedPositionFor(e);if(o)return{line:o.line+(r.generatedOffset.generatedLine-1),column:o.column+(r.generatedOffset.generatedLine===o.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},g.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var o=this._sections[r],i=o.consumer._generatedMappings,s=0;s<i.length;s++){var u=i[s],l=o.consumer._sources.at(u.source);l=t.computeSourceURL(o.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var c=null;u.name&&(c=o.consumer._names.at(u.name),this._names.add(c),c=this._names.indexOf(c));var g={source:l,generatedLine:u.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(o.generatedOffset.generatedLine===u.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:c};this.__generatedMappings.push(g),"number"==typeof g.originalLine&&this.__originalMappings.push(g)}a(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),a(this.__originalMappings,t.compareByOriginalPositions)}},"./@datadog/source-map/lib/source-map-generator.js":function(e,n,r){var t=r("./@datadog/source-map/lib/base64-vlq.js"),o=r("./@datadog/source-map/lib/util.js"),i=r("./@datadog/source-map/lib/array-set.js").ArraySet,s=r("./@datadog/source-map/lib/mapping-list.js").MappingList;function a(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new s,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e){var n=e.sourceRoot,r=new a({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=o.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(t){var i=t;null!==n&&(i=o.relative(n,t)),r._sources.has(i)||r._sources.add(i);var s=e.sourceContentFor(t);null!=s&&r.setSourceContent(t,s)}),r},a.prototype.addMapping=function(e){var n=o.getArg(e,"generated"),r=o.getArg(e,"original",null),t=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,i),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:i})},a.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=o.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},a.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var s=this._sourceRoot;null!=s&&(t=o.relative(s,t));var a=new i,u=new i;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var i=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=i.source&&(n.source=i.source,null!=r&&(n.source=o.join(r,n.source)),null!=s&&(n.source=o.relative(s,n.source)),n.originalLine=i.line,n.originalColumn=i.column,null!=i.name&&(n.name=i.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=o.join(r,n)),null!=s&&(n=o.relative(s,n)),this.setSourceContent(n,t))},this)},a.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!e||!("line"in e)||!("column"in e)||!(e.line>0)||!(e.column>=0)||n||r||t){if(!e||!("line"in e)||!("column"in e)||!n||!("line"in n)||!("column"in n)||!(e.line>0)||!(e.column>=0)||!(n.line>0)||!(n.column>=0)||!r)throw Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))}},a.prototype._serializeMappings=function(){for(var e,n,r,i,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),d=0,f=h.length;d<f;d++){if(n=h[d],e="",n.generatedLine!==a)for(s=0;n.generatedLine!==a;)e+=";",a++;else if(d>0){if(!o.compareByGeneratedPositionsInflated(n,h[d-1]))continue;e+=","}e+=t.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(i=this._sources.indexOf(n.source),e+=t.encode(i-g),g=i,e+=t.encode(n.originalLine-1-l),l=n.originalLine-1,e+=t.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=t.encode(r-c),c=r)),p+=e}return p},a.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=o.relative(n,e));var r=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=a},"./@datadog/source-map/lib/source-node.js":function(e,n,r){var t=r("./@datadog/source-map/lib/source-map-generator.js").SourceMapGenerator,o=r("./@datadog/source-map/lib/util.js"),i=/(\r?\n)/,s="$$$isSourceNode$$$";function a(e,n,r,t,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==r?null:r,this.name=null==o?null:o,this[s]=!0,null!=t&&this.add(t)}a.fromStringWithSourceMap=function(e,n,r){var t=new a,s=e.split(i),u=0,l=function(){return e()+(e()||"");function e(){return u<s.length?s[u++]:void 0}},c=1,g=0,p=null;return n.eachMapping(function(e){if(null!==p)if(c<e.generatedLine)h(p,l()),c++,g=0;else{var n=s[u]||"",r=n.substr(0,e.generatedColumn-g);s[u]=n.substr(e.generatedColumn-g),g=e.generatedColumn,h(p,r),p=e;return}for(;c<e.generatedLine;)t.add(l()),c++;if(g<e.generatedColumn){var n=s[u]||"";t.add(n.substr(0,e.generatedColumn)),s[u]=n.substr(e.generatedColumn),g=e.generatedColumn}p=e},this),u<s.length&&(p&&h(p,l()),t.add(s.splice(u).join(""))),n.sources.forEach(function(e){var i=n.sourceContentFor(e);null!=i&&(null!=r&&(e=o.join(r,e)),t.setSourceContent(e,i))}),t;function h(e,n){if(null===e||void 0===e.source)t.add(n);else{var i=r?o.join(r,e.source):e.source;t.add(new a(e.originalLine,e.originalColumn,i,n,e.name))}}},a.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[s]||"string"==typeof e)e&&this.children.push(e);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this},a.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else if(e[s]||"string"==typeof e)this.children.unshift(e);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this},a.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r<t;r++)(n=this.children[r])[s]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},a.prototype.join=function(e){var n,r,t=this.children.length;if(t>0){for(r=0,n=[];r<t-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this},a.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[s]?r.replaceRight(e,n):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this},a.prototype.setSourceContent=function(e,n){this.sourceContents[o.toSetString(e)]=n},a.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][s]&&this.children[n].walkSourceContents(e);for(var t=Object.keys(this.sourceContents),n=0,r=t.length;n<r;n++)e(o.fromSetString(t[n]),this.sourceContents[t[n]])},a.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},a.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new t(e),o=!1,i=null,s=null,a=null,u=null;return this.walk(function(e,t){n.code+=e,null!==t.source&&null!==t.line&&null!==t.column?((i!==t.source||s!==t.line||a!==t.column||u!==t.name)&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),i=t.source,s=t.line,a=t.column,u=t.name,o=!0):o&&(r.addMapping({generated:{line:n.line,column:n.column}}),i=null,o=!1);for(var l=0,c=e.length;l<c;l++)10===e.charCodeAt(l)?(n.line++,n.column=0,l+1===c?(i=null,o=!1):o&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name})):n.column++}),this.walkSourceContents(function(e,n){r.setSourceContent(e,n)}),{code:n.code,map:r}},n.SourceNode=a},"./@datadog/source-map/lib/util.js":function(e,n){n.getArg=function(e,n,r){if(n in e)return e[n];if(3==arguments.length)return r;throw Error('"'+n+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,t=/^data:.+\,.+$/;function o(e){var n=e.match(r);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function i(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function s(e){var r=e,t=o(e);if(t){if(!t.path)return e;r=t.path}for(var s,a=n.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)"."===(s=u[c])?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return(""===(r=u.join("/"))&&(r=a?"/":"."),t)?(t.path=r,i(t)):r}function a(e,n){""===e&&(e="."),""===n&&(n=".");var r=o(n),a=o(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||n.match(t))return n;if(a&&!a.host&&!a.path)return a.host=n,i(a);var u="/"===n.charAt(0)?n:s(e.replace(/\/+$/,"")+"/"+n);return a?(a.path=u,i(a)):u}n.urlParse=o,n.urlGenerate=i,n.normalize=s,n.join=a,n.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},n.relative=function(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0||(e=e.slice(0,t)).match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)};var u=!("__proto__"in Object.create(null));function l(e){return e}function c(e){if(!e)return!1;var n=e.length;if(n<9||95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function g(e,n){return e===n?0:null===e?1:null===n?-1:e>n?1:-1}n.toSetString=u?l:function(e){return c(e)?"$"+e:e},n.fromSetString=u?l:function(e){return c(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=g(e.source,n.source);return 0!==t||0!=(t=e.originalLine-n.originalLine)||0!=(t=e.originalColumn-n.originalColumn)||r||0!=(t=e.generatedColumn-n.generatedColumn)||0!=(t=e.generatedLine-n.generatedLine)?t:g(e.name,n.name)},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t||0!=(t=e.generatedColumn-n.generatedColumn)||r||0!==(t=g(e.source,n.source))||0!=(t=e.originalLine-n.originalLine)||0!=(t=e.originalColumn-n.originalColumn)?t:g(e.name,n.name)},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r||0!=(r=e.generatedColumn-n.generatedColumn)||0!==(r=g(e.source,n.source))||0!=(r=e.originalLine-n.originalLine)||0!=(r=e.originalColumn-n.originalColumn)?r:g(e.name,n.name)},n.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},n.computeSourceURL=function(e,n,r){if(n=n||"",e&&("/"!==e[e.length-1]&&"/"!==n[0]&&(e+="/"),n=e+n),r){var t=o(r);if(!t)throw Error("sourceMapURL could not be parsed");if(t.path){var u=t.path.lastIndexOf("/");u>=0&&(t.path=t.path.substring(0,u+1))}n=a(i(t),n)}return s(n)}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}var t={};t.SourceMapGenerator=r("./@datadog/source-map/lib/source-map-generator.js").SourceMapGenerator,t.SourceMapConsumer=r("./@datadog/source-map/lib/source-map-consumer.js").SourceMapConsumer,t.SourceNode=r("./@datadog/source-map/lib/source-node.js").SourceNode,module.exports=t})();
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Blue Oak Model License
|
|
2
|
+
|
|
3
|
+
Version 1.0.0
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This license gives everyone as much permission to work with
|
|
8
|
+
this software as possible, while protecting contributors
|
|
9
|
+
from liability.
|
|
10
|
+
|
|
11
|
+
## Acceptance
|
|
12
|
+
|
|
13
|
+
In order to receive this license, you must agree to its
|
|
14
|
+
rules. The rules of this license are both obligations
|
|
15
|
+
under that agreement and conditions to your license.
|
|
16
|
+
You must not do anything with this software that triggers
|
|
17
|
+
a rule that you cannot or will not follow.
|
|
18
|
+
|
|
19
|
+
## Copyright
|
|
20
|
+
|
|
21
|
+
Each contributor licenses you to do everything with this
|
|
22
|
+
software that would otherwise infringe that contributor's
|
|
23
|
+
copyright in it.
|
|
24
|
+
|
|
25
|
+
## Notices
|
|
26
|
+
|
|
27
|
+
You must ensure that everyone who gets a copy of
|
|
28
|
+
any part of this software from you, with or without
|
|
29
|
+
changes, also gets the text of this license or a link to
|
|
30
|
+
<https://blueoakcouncil.org/license/1.0.0>.
|
|
31
|
+
|
|
32
|
+
## Excuse
|
|
33
|
+
|
|
34
|
+
If anyone notifies you in writing that you have not
|
|
35
|
+
complied with [Notices](#notices), you can keep your
|
|
36
|
+
license by taking all practical steps to comply within 30
|
|
37
|
+
days after the notice. If you do not do so, your license
|
|
38
|
+
ends immediately.
|
|
39
|
+
|
|
40
|
+
## Patent
|
|
41
|
+
|
|
42
|
+
Each contributor licenses you to do everything with this
|
|
43
|
+
software that would otherwise infringe any patent claims
|
|
44
|
+
they can license or become able to license.
|
|
45
|
+
|
|
46
|
+
## Reliability
|
|
47
|
+
|
|
48
|
+
No contributor can revoke this license.
|
|
49
|
+
|
|
50
|
+
## No Liability
|
|
51
|
+
|
|
52
|
+
***As far as the law allows, this software comes as is,
|
|
53
|
+
without any warranty or condition, and no contributor
|
|
54
|
+
will be liable to anyone for any damages related to this
|
|
55
|
+
software or this license, under any kind of legal claim.***
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var t={};t.d=(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};t.r(e),t.d(e,{TTLCache:()=>a});let i="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=()=>i.now(),r=t=>t===1/0||!!t&&t===Math.floor(t)&&t>0&&isFinite(t);class a{expirations=Object.create(null);data=new Map;expirationMap=new Map;ttl;max;updateAgeOnGet;updateAgeOnHas;noUpdateTTL;noDisposeOnSet;checkAgeOnGet;checkAgeOnHas;dispose;timer;timerExpiration;immortalKeys=new Set;constructor({max:t=1/0,ttl:e,updateAgeOnGet:i=!1,checkAgeOnGet:s=!1,updateAgeOnHas:a=!1,checkAgeOnHas:o=!1,noUpdateTTL:h=!1,dispose:n,noDisposeOnSet:l=!1}={}){if(void 0!==e&&!r(e))throw TypeError("ttl must be positive integer or Infinity if set");if(!r(t))throw TypeError("max must be positive integer or Infinity");if(this.ttl=e,this.max=t,this.updateAgeOnGet=!!i,this.checkAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.checkAgeOnHas=!!o,this.noUpdateTTL=!!h,this.noDisposeOnSet=!!l,void 0!==n){if("function"!=typeof n)throw TypeError("dispose must be function if set");this.dispose=n}else this.dispose=(t,e,i)=>{};this.timer=void 0,this.timerExpiration=void 0}setTimer(t,e){if(this.timerExpiration&&this.timerExpiration<t)return;this.timer&&clearTimeout(this.timer);let i=setTimeout(()=>{for(let t in this.timer=void 0,this.timerExpiration=void 0,this.purgeStale(),this.expirations){let e=Number(t);this.setTimer(e,e-s());break}},Math.max(0,e));i.unref&&i.unref(),this.timerExpiration=t,this.timer=i}cancelTimer(){this.timer&&(clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0)}cancelTimers(){return process.emitWarning('TTLCache.cancelTimers has been renamed to TTLCache.cancelTimer (no "s"), and will be removed in the next major version update'),this.cancelTimer()}clear(){let t=this.dispose!==a.prototype.dispose?[...this]:[];for(let[e,i]of(this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null),t))this.dispose(i,e,"delete")}setTTL(t,e=this.ttl){let i=this.expirationMap.get(t);if(void 0!==i){let e=this.expirations[i];!e||e.length<=1?delete this.expirations[i]:this.expirations[i]=e.filter(e=>e!==t)}if(e&&e!==1/0){this.immortalKeys.delete(t);let i=Math.floor(s()+e);this.expirationMap.set(t,i),this.expirations[i]||(this.expirations[i]=[],this.setTimer(i,e)),this.expirations[i].push(t)}else this.immortalKeys.add(t),this.expirationMap.set(t,1/0)}set(t,e,{ttl:i=this.ttl,noUpdateTTL:s=this.noUpdateTTL,noDisposeOnSet:a=this.noDisposeOnSet}={}){if(!r(i))throw TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has(t)){s||this.setTTL(t,i);let r=this.data.get(t),o=!a&&this.data.has(t);r!==e&&(this.data.set(t,e),o&&this.dispose(r,t,"set"))}else this.setTTL(t,i),this.data.set(t,e);for(;this.size>this.max;)this.purgeToCapacity();return this}has(t,{checkAgeOnHas:e=this.checkAgeOnHas,ttl:i=this.ttl,updateAgeOnHas:s=this.updateAgeOnHas}={}){return!!this.data.has(t)&&(e&&0===this.getRemainingTTL(t)?(this.delete(t),!1):(s&&this.setTTL(t,i),!0))}getRemainingTTL(t){let e=this.expirationMap.get(t);return e===1/0?e:void 0!==e?Math.max(0,Math.ceil(e-s())):0}get(t,{updateAgeOnGet:e=this.updateAgeOnGet,ttl:i=this.ttl,checkAgeOnGet:s=this.checkAgeOnGet}={}){let r=this.data.get(t);return s&&0===this.getRemainingTTL(t)?void this.delete(t):(e&&this.setTTL(t,i),r)}delete(t){let e=this.expirationMap.get(t);if(void 0!==e){let i=this.data.get(t);this.data.delete(t),this.expirationMap.delete(t),this.immortalKeys.delete(t);let s=this.expirations[e];return s&&(s.length<=1?delete this.expirations[e]:this.expirations[e]=s.filter(e=>e!==t)),this.dispose(i,t,"delete"),0===this.size&&this.cancelTimer(),!0}return!1}purgeToCapacity(){for(let t in this.expirations){let e=this.expirations[t];if(this.size-e.length>=this.max){delete this.expirations[t];let i=[];for(let t of e)i.push([t,this.data.get(t)]),this.data.delete(t),this.expirationMap.delete(t);for(let[t,e]of i)this.dispose(e,t,"evict")}else{let t=this.size-this.max,i=[];for(let s of e.splice(0,t))i.push([s,this.data.get(s)]),this.data.delete(s),this.expirationMap.delete(s);for(let[t,e]of i)this.dispose(e,t,"evict");return}}}get size(){return this.data.size}purgeStale(){let t=Math.ceil(s());for(let e in this.expirations){if("Infinity"===e||Number(e)>t)return;let i=[...this.expirations[e]||[]],s=[];for(let t of(delete this.expirations[e],i))s.push([t,this.data.get(t)]),this.data.delete(t),this.expirationMap.delete(t);for(let[t,e]of s)this.dispose(e,t,"stale")}0===this.size&&this.cancelTimer()}*entries(){for(let t in this.expirations)for(let e of this.expirations[t])yield[e,this.data.get(e)];for(let t of this.immortalKeys)yield[t,this.data.get(t)]}*keys(){for(let t in this.expirations)for(let e of this.expirations[t])yield e;for(let t of this.immortalKeys)yield t}*values(){for(let t in this.expirations)for(let e of this.expirations[t])yield this.data.get(e);for(let t of this.immortalKeys)yield this.data.get(t)}[Symbol.iterator](){return this.entries()}}module.exports=e})();
|