@lockerverse/sdk 0.1.0-alpha.1
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/README.md +184 -0
- package/dist/checkout.d.ts +6 -0
- package/dist/checkout.d.ts.map +1 -0
- package/dist/checkout.js +2 -0
- package/dist/checkout.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/signup.d.ts +90 -0
- package/dist/signup.d.ts.map +1 -0
- package/dist/signup.js +2 -0
- package/dist/signup.js.map +1 -0
- package/dist/telemetry.js +8 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/transport.js +2 -0
- package/dist/transport.js.map +1 -0
- package/dist/types.d.ts +247 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +90 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.js","names":["DEBUG_BUILD","DEBUG_BUILD","isErrorEvent","DEBUG_BUILD","_getBufferMap","DEBUG_BUILD","DEBUG_BUILD","WINDOW","_INTERNAL_enhanceErrorWithSentryInfo","isErrorEvent","errorEvent","objectException","WINDOW"],"sources":["../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/debug-build.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/worldwide.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/version.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/carrier.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/debug-logger.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/stacktrace.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/is.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/object.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/randomSafeContext.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/normalizationHints.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/normalize.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/string.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/misc.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/time.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/session.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/merge.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/propagationContext.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/weakRef.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/spanOnScope.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/scope.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/defaultScopes.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/chain-and-copy-promiselike.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/asyncContext/index.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/attributes.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/currentScopes.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/semanticAttributes.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/tracing/utils.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/baggage.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/dsn.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/parseSampleRate.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/spanUtils.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/hasSpansEnabled.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/should-ignore-span.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/tracing/sentryNonRecordingSpan.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/constants.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/tracing/dynamicSamplingContext.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/tracing/spans/beforeSendSpan.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/envelope.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/envelope.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/tracing/spans/hasSpanStreamingEnabled.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/scopeData.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/syncpromise.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/eventProcessors.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/debug-ids.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/prepareEvent.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/timer.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/api.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/integration.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/env.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/node.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/isBrowser.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/logs/envelope.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/logs/internal.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/metrics/envelope.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/metrics/internal.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/tracing/spans/spanJsonToStreamedSpan.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/tracing/spans/extractGenAiSpans.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/promisebuffer.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/ratelimit.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/transports/base.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/clientreport.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/eventUtils.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/transactionEvent.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/data-collection/filtering-snippets.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/data-collection/defaultPiiToCollectionOptions.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/data-collection/resolveDataCollectionOptions.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/client.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/ipAddress.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/sdkMetadata.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/eventbuilder.js","../../../node_modules/.pnpm/@sentry+core@10.69.0/node_modules/@sentry/core/build/esm/utils/supports.js","../../../node_modules/.pnpm/@sentry+browser@10.69.0/node_modules/@sentry/browser/build/npm/esm/prod/helpers.js","../../../node_modules/.pnpm/@sentry+browser@10.69.0/node_modules/@sentry/browser/build/npm/esm/prod/eventbuilder.js","../../../node_modules/.pnpm/@sentry+browser@10.69.0/node_modules/@sentry/browser/build/npm/esm/prod/client.js","../../../node_modules/.pnpm/@sentry+browser-utils@10.69.0/node_modules/@sentry/browser-utils/build/esm/debug-build.js","../../../node_modules/.pnpm/@sentry+browser-utils@10.69.0/node_modules/@sentry/browser-utils/build/esm/types.js","../../../node_modules/.pnpm/@sentry+browser-utils@10.69.0/node_modules/@sentry/browser-utils/build/esm/getNativeImplementation.js","../../../node_modules/.pnpm/@sentry+browser@10.69.0/node_modules/@sentry/browser/build/npm/esm/prod/transports/fetch.js","../../../node_modules/.pnpm/@sentry+browser@10.69.0/node_modules/@sentry/browser/build/npm/esm/prod/stack-parsers.js","../src/telemetry.ts"],"sourcesContent":["const DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","const GLOBAL_OBJ = globalThis;\n\nexport { GLOBAL_OBJ };\n//# sourceMappingURL=worldwide.js.map\n","const SDK_VERSION = \"10.69.0\" ;\n\nexport { SDK_VERSION };\n//# sourceMappingURL=version.js.map\n","import { SDK_VERSION } from './utils/version.js';\nimport { GLOBAL_OBJ } from './utils/worldwide.js';\n\nfunction getMainCarrier() {\n getSentryCarrier(GLOBAL_OBJ);\n return GLOBAL_OBJ;\n}\nfunction getSentryCarrier(carrier) {\n const __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n __SENTRY__.version = __SENTRY__.version || SDK_VERSION;\n return __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};\n}\nfunction getGlobalSingleton(name, creator, obj = GLOBAL_OBJ) {\n const __SENTRY__ = obj.__SENTRY__ = obj.__SENTRY__ || {};\n const carrier = __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};\n return carrier[name] || (carrier[name] = creator());\n}\n\nexport { getGlobalSingleton, getMainCarrier, getSentryCarrier };\n//# sourceMappingURL=carrier.js.map\n","import { getGlobalSingleton } from '../carrier.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst CONSOLE_LEVELS = [\n \"debug\",\n \"info\",\n \"warn\",\n \"error\",\n \"log\",\n \"assert\",\n \"trace\"\n];\nconst PREFIX = \"Sentry Logger \";\nconst originalConsoleMethods = {};\nfunction consoleSandbox(callback) {\n if (!(\"console\" in GLOBAL_OBJ)) {\n return callback();\n }\n const console = GLOBAL_OBJ.console;\n const wrappedFuncs = {};\n const wrappedLevels = Object.keys(originalConsoleMethods);\n wrappedLevels.forEach((level) => {\n const originalConsoleMethod = originalConsoleMethods[level];\n wrappedFuncs[level] = console[level];\n console[level] = originalConsoleMethod;\n });\n try {\n return callback();\n } finally {\n wrappedLevels.forEach((level) => {\n console[level] = wrappedFuncs[level];\n });\n }\n}\nfunction enable() {\n _getLoggerSettings().enabled = true;\n}\nfunction disable() {\n _getLoggerSettings().enabled = false;\n}\nfunction isEnabled() {\n return _getLoggerSettings().enabled;\n}\nfunction log(...args) {\n _maybeLog(\"log\", ...args);\n}\nfunction warn(...args) {\n _maybeLog(\"warn\", ...args);\n}\nfunction error(...args) {\n _maybeLog(\"error\", ...args);\n}\nfunction _maybeLog(level, ...args) {\n if (!DEBUG_BUILD) {\n return;\n }\n if (isEnabled()) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[level](`${PREFIX}[${level}]:`, ...args);\n });\n }\n}\nfunction _getLoggerSettings() {\n if (!DEBUG_BUILD) {\n return { enabled: false };\n }\n return getGlobalSingleton(\"loggerSettings\", () => ({ enabled: false }));\n}\nconst debug = {\n /** Enable logging. */\n enable,\n /** Disable logging. */\n disable,\n /** Check if logging is enabled. */\n isEnabled,\n /** Log a message. */\n log,\n /** Log a warning. */\n warn,\n /** Log an error. */\n error\n};\n\nexport { CONSOLE_LEVELS, consoleSandbox, debug, originalConsoleMethods };\n//# sourceMappingURL=debug-logger.js.map\n","const STACKTRACE_FRAME_LIMIT = 50;\nconst UNKNOWN_FUNCTION = \"?\";\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\nfunction createStackParser(...parsers) {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map((p) => p[1]);\n return (stack, skipFirstLines = 0, framesToPop = 0) => {\n const frames = [];\n const lines = stack.split(\"\\n\");\n for (let i = skipFirstLines; i < lines.length; i++) {\n let line = lines[i];\n if (line.length > 1024) {\n line = line.slice(0, 1024);\n }\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, \"$1\") : line;\n if (cleanedLine.includes(\"Error: \")) {\n continue;\n }\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) {\n break;\n }\n }\n return stripSentryFramesAndReverse(frames.slice(framesToPop));\n };\n}\nfunction stackParserFromStackParserOptions(stackParser) {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\nfunction stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n const localStack = Array.from(stack);\n if (/sentryWrapped/.test(getLastStackFrame(localStack).function || \"\")) {\n localStack.pop();\n }\n localStack.reverse();\n if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || \"\")) {\n localStack.pop();\n if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || \"\")) {\n localStack.pop();\n }\n }\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame) => ({\n ...frame,\n filename: frame.filename || getLastStackFrame(localStack).filename,\n function: frame.function || UNKNOWN_FUNCTION\n }));\n}\nfunction getLastStackFrame(arr) {\n return arr[arr.length - 1] || {};\n}\nconst defaultFunctionName = \"<anonymous>\";\nfunction getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== \"function\") {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch {\n return defaultFunctionName;\n }\n}\nfunction getFramesFromEvent(event) {\n const exception = event.exception;\n if (exception) {\n const frames = [];\n try {\n exception.values.forEach((value) => {\n if (value.stacktrace.frames) {\n frames.push(...value.stacktrace.frames);\n }\n });\n return frames;\n } catch {\n return void 0;\n }\n }\n return void 0;\n}\nfunction normalizeStackTracePath(path) {\n let filename = path?.startsWith(\"file://\") ? path.slice(7) : path;\n if (filename?.match(/\\/[A-Z]:/)) {\n filename = filename.slice(1);\n }\n return filename;\n}\n\nexport { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, normalizeStackTracePath, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n//# sourceMappingURL=stacktrace.js.map\n","const objectToString = Object.prototype.toString;\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case \"[object Error]\":\n case \"[object Exception]\":\n case \"[object DOMException]\":\n case \"[object WebAssembly.Exception]\":\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, \"ErrorEvent\");\n}\nfunction isDOMError(wat) {\n return isBuiltin(wat, \"DOMError\");\n}\nfunction isDOMException(wat) {\n return isBuiltin(wat, \"DOMException\");\n}\nfunction isString(wat) {\n return isBuiltin(wat, \"String\");\n}\nfunction isParameterizedString(wat) {\n return typeof wat === \"object\" && wat !== null && \"__sentry_template_string__\" in wat && \"__sentry_template_values__\" in wat;\n}\nfunction isPrimitive(wat) {\n return wat === null || isParameterizedString(wat) || typeof wat !== \"object\" && typeof wat !== \"function\";\n}\nfunction isPlainObject(wat) {\n return isBuiltin(wat, \"Object\");\n}\nfunction isObjectLike(wat) {\n return typeof wat === \"object\" && wat !== null;\n}\nfunction isEvent(wat) {\n return typeof Event !== \"undefined\" && isInstanceOf(wat, Event);\n}\nfunction isElement(wat) {\n return typeof Element !== \"undefined\" && isInstanceOf(wat, Element);\n}\nfunction isRegExp(wat) {\n return isBuiltin(wat, \"RegExp\");\n}\nfunction isThenable(wat) {\n return Boolean(wat?.then && typeof wat.then === \"function\");\n}\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && \"nativeEvent\" in wat && \"preventDefault\" in wat && \"stopPropagation\" in wat;\n}\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch {\n return false;\n }\n}\nfunction isVueViewModel(wat) {\n return !!(typeof wat === \"object\" && wat !== null && (wat.__isVue || wat._isVue || wat.__v_isVNode));\n}\nfunction isRequest(request) {\n return typeof Request !== \"undefined\" && isInstanceOf(request, Request);\n}\n\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isObjectLike, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isRequest, isString, isSyntheticEvent, isThenable, isVueViewModel };\n//# sourceMappingURL=is.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from './debug-logger.js';\nimport { isError, isEvent, isPrimitive, isObjectLike } from './is.js';\n\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n const original = source[name];\n if (typeof original !== \"function\") {\n return;\n }\n const wrapped = replacementFactory(original);\n if (typeof wrapped === \"function\") {\n markFunctionWrapped(wrapped, original);\n }\n try {\n source[name] = wrapped;\n } catch {\n DEBUG_BUILD && debug.log(`Failed to replace method \"${name}\" in object`, source);\n }\n}\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value,\n writable: true,\n configurable: true\n });\n } catch {\n DEBUG_BUILD && debug.log(`Failed to add non-enumerable property \"${String(name)}\" to object`, obj);\n }\n}\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, \"__sentry_original__\", original);\n } catch {\n }\n}\nfunction wrapMethod(obj, field, wrapped, enumerable = true) {\n const original = obj[field];\n if (typeof original !== \"function\") {\n throw new Error(`Cannot wrap method: ${field} is not a function`);\n }\n if (getOriginalFunction(original)) {\n throw new Error(`Attempting to wrap method ${field} multiple times`);\n }\n markFunctionWrapped(wrapped, original);\n Object.defineProperty(obj, field, {\n writable: true,\n configurable: true,\n enumerable,\n value: wrapped\n });\n}\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\nfunction convertToPlainObject(value) {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value)\n };\n }\n if (isEvent(value)) {\n const { type, target, currentTarget, detail } = value;\n return {\n type,\n target,\n currentTarget,\n ...detail ? { detail } : {},\n ...getOwnProperties(value)\n };\n }\n return value;\n}\nfunction getOwnProperties(obj) {\n if (isObjectLike(obj)) {\n return Object.fromEntries(Object.entries(obj));\n }\n return {};\n}\nfunction extractExceptionKeysForMessage(exception) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n return !keys[0] ? \"[object has no keys]\" : keys.join(\", \");\n}\nfunction dropUndefinedKeys(inputValue) {\n const memoizationMap = /* @__PURE__ */ new Map();\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (inputValue === null || typeof inputValue !== \"object\") {\n return inputValue;\n }\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== void 0) {\n return memoVal;\n }\n if (Array.isArray(inputValue)) {\n const returnValue = [];\n memoizationMap.set(inputValue, returnValue);\n inputValue.forEach((value) => {\n returnValue.push(_dropUndefinedKeys(value, memoizationMap));\n });\n return returnValue;\n }\n if (isPojo(inputValue)) {\n const returnValue = {};\n memoizationMap.set(inputValue, returnValue);\n const keys = Object.keys(inputValue);\n keys.forEach((key) => {\n const val = inputValue[key];\n if (val !== void 0) {\n returnValue[key] = _dropUndefinedKeys(val, memoizationMap);\n }\n });\n return returnValue;\n }\n return inputValue;\n}\nfunction isPojo(input) {\n const constructor = input.constructor;\n return constructor === Object || constructor === void 0;\n}\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n // this will catch both undefined and null\n case wat == void 0:\n objectified = new String(wat);\n break;\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case (typeof wat === \"symbol\" || typeof wat === \"bigint\"):\n objectified = Object(wat);\n break;\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n objectified = new wat.constructor(wat);\n break;\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, wrapMethod };\n//# sourceMappingURL=object.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nlet RESOLVED_RUNNER;\nfunction withRandomSafeContext(cb) {\n if (RESOLVED_RUNNER !== void 0) {\n return RESOLVED_RUNNER ? RESOLVED_RUNNER(cb) : cb();\n }\n const sym = /* @__PURE__ */ Symbol.for(\"__SENTRY_SAFE_RANDOM_ID_WRAPPER__\");\n const globalWithSymbol = GLOBAL_OBJ;\n if (sym in globalWithSymbol && typeof globalWithSymbol[sym] === \"function\") {\n RESOLVED_RUNNER = globalWithSymbol[sym];\n return RESOLVED_RUNNER(cb);\n }\n RESOLVED_RUNNER = null;\n return cb();\n}\nfunction safeMathRandom() {\n return withRandomSafeContext(() => Math.random());\n}\nfunction safeDateNow() {\n return withRandomSafeContext(() => Date.now());\n}\n\nexport { safeDateNow, safeMathRandom, withRandomSafeContext };\n//# sourceMappingURL=randomSafeContext.js.map\n","import { addNonEnumerableProperty } from './object.js';\n\nconst SENTRY_SKIP_NORMALIZATION = /* @__PURE__ */ Symbol.for(\"sentry.skipNormalization\");\nconst SENTRY_OVERRIDE_NORMALIZATION_DEPTH = /* @__PURE__ */ Symbol.for(\"sentry.overrideNormalizationDepth\");\nfunction setSkipNormalizationHint(obj) {\n addNonEnumerableProperty(obj, SENTRY_SKIP_NORMALIZATION, true);\n}\nfunction setNormalizationDepthOverrideHint(obj, depth) {\n addNonEnumerableProperty(obj, SENTRY_OVERRIDE_NORMALIZATION_DEPTH, depth);\n}\nfunction hasSkipNormalizationHint(value) {\n return Boolean(value[SENTRY_SKIP_NORMALIZATION]);\n}\nfunction getNormalizationDepthOverrideHint(value) {\n const v = value[SENTRY_OVERRIDE_NORMALIZATION_DEPTH];\n return typeof v === \"number\" ? v : void 0;\n}\n\nexport { getNormalizationDepthOverrideHint, hasSkipNormalizationHint, setNormalizationDepthOverrideHint, setSkipNormalizationHint };\n//# sourceMappingURL=normalizationHints.js.map\n","import { hasSkipNormalizationHint, getNormalizationDepthOverrideHint } from './normalizationHints.js';\nimport { convertToPlainObject } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\n\nlet stringifier;\nfunction setNormalizeStringifier(newStringifier) {\n stringifier = newStringifier;\n}\nfunction normalize(input, depth = 100, maxProperties = Infinity) {\n try {\n return visit(\"\", input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\nfunction normalizeToSize(object, depth = 3, maxSize = 100 * 1024) {\n const normalized = normalize(object, depth);\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n return normalized;\n}\nfunction visit(key, value, depth = Infinity, maxProperties = Infinity, memo = memoBuilder()) {\n const [memoize, unmemoize] = memo;\n if (value == null || // this matches null and undefined -> eqeq not eqeqeq\n [\"boolean\", \"string\"].includes(typeof value) || typeof value === \"number\" && Number.isFinite(value)) {\n return value;\n }\n const stringified = stringifyValue(key, value);\n if (!stringified.startsWith(\"[object \")) {\n return stringified;\n }\n if (hasSkipNormalizationHint(value)) {\n return value;\n }\n const overrideDepth = getNormalizationDepthOverrideHint(value);\n const remainingDepth = overrideDepth !== void 0 ? overrideDepth : depth;\n if (remainingDepth === 0) {\n return stringified.replace(\"object \", \"\");\n }\n if (memoize(value)) {\n return \"[Circular ~]\";\n }\n const valueWithToJSON = value;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === \"function\") {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n return visit(\"\", jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch {\n }\n }\n const normalized = Array.isArray(value) ? [] : {};\n let numAdded = 0;\n const visitable = convertToPlainObject(value);\n for (const visitKey in visitable) {\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n if (numAdded >= maxProperties) {\n normalized[visitKey] = \"[MaxProperties ~]\";\n break;\n }\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n numAdded++;\n }\n unmemoize(value);\n return normalized;\n}\nfunction stringifyValue(key, value) {\n try {\n if (stringifier) {\n const stringified = stringifier(value);\n if (stringified) {\n return stringified;\n }\n }\n if (typeof global !== \"undefined\" && value === global) {\n return \"[Global]\";\n }\n if (typeof value === \"number\" && !Number.isFinite(value)) {\n return `[${value}]`;\n }\n if (typeof value === \"function\") {\n return `[Function: ${getFunctionName(value)}]`;\n }\n if (typeof value === \"symbol\") {\n return `[${String(value)}]`;\n }\n if (typeof value === \"bigint\") {\n return `[BigInt: ${String(value)}]`;\n }\n const objName = getConstructorName(value);\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\nfunction getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n return prototype?.constructor ? prototype.constructor.name : \"null prototype\";\n}\nfunction utf8Length(value) {\n return ~-encodeURI(value).split(/%..|./).length;\n}\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\nfunction normalizeUrlToBase(url, basePath) {\n const escapedBase = basePath.replace(/\\\\/g, \"/\").replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n let newUrl = url;\n try {\n newUrl = decodeURI(url);\n } catch {\n }\n return newUrl.replace(/\\\\/g, \"/\").replace(/webpack:\\/?/g, \"\").replace(new RegExp(`(file://)?/*${escapedBase}/*`, \"ig\"), \"app:///\");\n}\nfunction memoBuilder() {\n const inner = /* @__PURE__ */ new WeakSet();\n function memoize(obj) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n function unmemoize(obj) {\n inner.delete(obj);\n }\n return [memoize, unmemoize];\n}\n\nexport { normalize, normalizeToSize, normalizeUrlToBase, setNormalizeStringifier, stringifyValue };\n//# sourceMappingURL=normalize.js.map\n","import { isString, isRegExp, isPrimitive } from './is.js';\nimport { stringifyValue } from './normalize.js';\n\nfunction stringify(value, fallback = \"[unserializable]\") {\n if (typeof value === \"string\") {\n return value;\n }\n try {\n return JSON.stringify(value);\n } catch {\n return typeof fallback === \"function\" ? fallback(value) : fallback;\n }\n}\nfunction truncate(str, max = 0) {\n if (typeof str !== \"string\" || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\nfunction snipLine(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n colno = lineLength;\n }\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += \" {snip}\";\n }\n return newLine;\n}\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return \"\";\n }\n const output = [];\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n if (isPrimitive(value)) {\n output.push(String(value));\n } else if (value instanceof Error) {\n output.push(value.message ? `${value.name}: ${value.message}` : value.name);\n } else {\n output.push(stringifyValue(void 0, value));\n }\n }\n return output.join(delimiter);\n}\nfunction isMatchingPattern(value, pattern, requireExactStringMatch = false) {\n if (!isString(value)) {\n return false;\n }\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n if (typeof pattern === \"function\") {\n return pattern(value);\n }\n return false;\n}\nfunction stringMatchesSomePattern(testString, patterns = [], requireExactStringMatch = false) {\n for (const pattern of patterns) {\n if (isMatchingPattern(testString, pattern, requireExactStringMatch)) {\n return true;\n }\n }\n return false;\n}\n\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, stringify, truncate };\n//# sourceMappingURL=string.js.map\n","import { addNonEnumerableProperty } from './object.js';\nimport { withRandomSafeContext, safeMathRandom } from './randomSafeContext.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nfunction getCrypto() {\n const gbl = GLOBAL_OBJ;\n return gbl.crypto || gbl.msCrypto;\n}\nlet emptyUuid;\nfunction getRandomByte() {\n return safeMathRandom() * 16;\n}\nfunction uuid4(crypto = getCrypto()) {\n try {\n if (crypto?.randomUUID) {\n return withRandomSafeContext(() => crypto.randomUUID()).replace(/-/g, \"\");\n }\n } catch {\n }\n if (!emptyUuid) {\n emptyUuid = \"10000000100040008000\" + 1e11;\n }\n return emptyUuid.replace(\n /[018]/g,\n (c) => (\n // eslint-disable-next-line no-bitwise\n (c ^ (getRandomByte() & 15) >> c / 4).toString(16)\n )\n );\n}\nfunction getFirstException(event) {\n return event.exception?.values?.[0];\n}\nfunction getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || \"<unknown>\";\n }\n return eventId || \"<unknown>\";\n}\nfunction addExceptionTypeValue(event, value, type) {\n const exception = event.exception = event.exception || {};\n const values = exception.values = exception.values || [];\n const firstException = values[0] = values[0] || {};\n if (!firstException.value) {\n firstException.value = value || \"\";\n }\n if (!firstException.type) {\n firstException.type = type || \"Error\";\n }\n}\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n const defaultMechanism = { type: \"generic\", handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n if (newMechanism && \"data\" in newMechanism) {\n const mergedData = { ...currentMechanism?.data, ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\nconst SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\nfunction _parseInt(input) {\n return parseInt(input || \"\", 10);\n}\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = _parseInt(match[1]);\n const minor = _parseInt(match[2]);\n const patch = _parseInt(match[3]);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? void 0 : major,\n minor: isNaN(minor) ? void 0 : minor,\n patch: isNaN(patch) ? void 0 : patch,\n prerelease: match[4]\n };\n}\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n if (frame.lineno === void 0) {\n return;\n }\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map((line) => snipLine(line, 0));\n const lineIndex = Math.min(maxLines - 1, sourceLine);\n frame.context_line = snipLine(lines[lineIndex], frame.colno || 0);\n frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map((line) => snipLine(line, 0));\n}\nfunction checkOrSetAlreadyCaught(exception) {\n if (isAlreadyCaptured(exception)) {\n return true;\n }\n try {\n addNonEnumerableProperty(exception, \"__sentry_captured__\", true);\n } catch {\n }\n return false;\n}\nfunction isAlreadyCaptured(exception) {\n try {\n return exception.__sentry_captured__;\n } catch {\n }\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, checkOrSetAlreadyCaught, getEventDescription, isAlreadyCaptured, parseSemver, uuid4 };\n//# sourceMappingURL=misc.js.map\n","import { safeDateNow, withRandomSafeContext } from './randomSafeContext.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst ONE_SECOND_IN_MS = 1e3;\nfunction dateTimestampInSeconds() {\n return safeDateNow() / ONE_SECOND_IN_MS;\n}\nfunction createUnixTimestampInSecondsFunc() {\n const { performance } = GLOBAL_OBJ;\n if (!performance?.now || !performance.timeOrigin) {\n return dateTimestampInSeconds;\n }\n const timeOrigin = performance.timeOrigin;\n return () => {\n return (timeOrigin + withRandomSafeContext(() => performance.now())) / ONE_SECOND_IN_MS;\n };\n}\nlet _cachedTimestampInSeconds;\nfunction timestampInSeconds() {\n const func = _cachedTimestampInSeconds ?? (_cachedTimestampInSeconds = createUnixTimestampInSecondsFunc());\n return func();\n}\nlet cachedTimeOrigin = null;\nfunction getBrowserTimeOrigin() {\n const { performance } = GLOBAL_OBJ;\n if (!performance?.now) {\n return void 0;\n }\n const threshold = 3e5;\n const performanceNow = withRandomSafeContext(() => performance.now());\n const dateNow = safeDateNow();\n const timeOrigin = performance.timeOrigin;\n if (typeof timeOrigin === \"number\") {\n const timeOriginDelta = Math.abs(timeOrigin + performanceNow - dateNow);\n if (timeOriginDelta < threshold) {\n return timeOrigin;\n }\n }\n const navigationStart = performance.timing?.navigationStart;\n if (typeof navigationStart === \"number\") {\n const navigationStartDelta = Math.abs(navigationStart + performanceNow - dateNow);\n if (navigationStartDelta < threshold) {\n return navigationStart;\n }\n }\n return dateNow - performanceNow;\n}\nfunction browserPerformanceTimeOrigin() {\n if (cachedTimeOrigin === null) {\n cachedTimeOrigin = getBrowserTimeOrigin();\n }\n return cachedTimeOrigin;\n}\n\nexport { browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds };\n//# sourceMappingURL=time.js.map\n","import { uuid4 } from './utils/misc.js';\nimport { timestampInSeconds } from './utils/time.js';\n\nfunction makeSession(context) {\n const startingTime = timestampInSeconds();\n const session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: \"ok\",\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session)\n };\n if (context) {\n updateSession(session, context);\n }\n return session;\n}\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n session.timestamp = context.timestamp || timestampInSeconds();\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== void 0) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === \"number\") {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = void 0;\n } else if (typeof context.duration === \"number\") {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === \"number\") {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === \"ok\") {\n context = { status: \"exited\" };\n }\n updateSession(session, context);\n}\nfunction sessionToJSON(session) {\n return {\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1e3).toISOString(),\n timestamp: new Date(session.timestamp * 1e3).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === \"number\" || typeof session.did === \"string\" ? `${session.did}` : void 0,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent\n }\n };\n}\n\nexport { closeSession, makeSession, updateSession };\n//# sourceMappingURL=session.js.map\n","function merge(initialObj, mergeObj, levels = 2) {\n if (!mergeObj || typeof mergeObj !== \"object\" || levels <= 0) {\n return mergeObj;\n }\n if (initialObj && Object.keys(mergeObj).length === 0) {\n return initialObj;\n }\n const output = { ...initialObj };\n for (const key in mergeObj) {\n if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {\n output[key] = merge(output[key], mergeObj[key], levels - 1);\n }\n }\n return output;\n}\n\nexport { merge };\n//# sourceMappingURL=merge.js.map\n","import { uuid4 } from './misc.js';\n\nfunction generateTraceId() {\n return uuid4();\n}\nfunction generateSpanId() {\n return uuid4().substring(16);\n}\n\nexport { generateSpanId, generateTraceId };\n//# sourceMappingURL=propagationContext.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nfunction makeWeakRef(value) {\n try {\n const WeakRefImpl = GLOBAL_OBJ.WeakRef;\n if (typeof WeakRefImpl === \"function\") {\n return new WeakRefImpl(value);\n }\n } catch {\n }\n return value;\n}\nfunction derefWeakRef(ref) {\n if (!ref) {\n return void 0;\n }\n if (typeof ref === \"object\" && \"deref\" in ref && typeof ref.deref === \"function\") {\n try {\n return ref.deref();\n } catch {\n return void 0;\n }\n }\n return ref;\n}\n\nexport { derefWeakRef, makeWeakRef };\n//# sourceMappingURL=weakRef.js.map\n","import { addNonEnumerableProperty } from './object.js';\nimport { makeWeakRef, derefWeakRef } from './weakRef.js';\n\nconst SCOPE_SPAN_FIELD = \"_sentrySpan\";\nfunction _setSpanForScope(scope, span) {\n if (span) {\n addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, makeWeakRef(span));\n } else {\n delete scope[SCOPE_SPAN_FIELD];\n }\n}\nfunction _getSpanForScope(scope) {\n return derefWeakRef(scope[SCOPE_SPAN_FIELD]);\n}\n\nexport { _getSpanForScope, _setSpanForScope };\n//# sourceMappingURL=spanOnScope.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { updateSession } from './session.js';\nimport { debug } from './utils/debug-logger.js';\nimport { isPlainObject } from './utils/is.js';\nimport { merge } from './utils/merge.js';\nimport { uuid4 } from './utils/misc.js';\nimport { generateTraceId } from './utils/propagationContext.js';\nimport { safeMathRandom } from './utils/randomSafeContext.js';\nimport { _setSpanForScope, _getSpanForScope } from './utils/spanOnScope.js';\nimport { truncate } from './utils/string.js';\nimport { dateTimestampInSeconds } from './utils/time.js';\n\nconst DEFAULT_MAX_BREADCRUMBS = 100;\nclass Scope {\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._attributes = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = {\n traceId: generateTraceId(),\n sampleRand: safeMathRandom()\n };\n }\n /**\n * Clone all data from this scope into a new scope.\n */\n clone() {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._attributes = { ...this._attributes };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n if (this._contexts.flags) {\n newScope._contexts.flags = {\n values: [...this._contexts.flags.values]\n };\n }\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n newScope._lastEventId = this._lastEventId;\n newScope._conversationId = this._conversationId;\n _setSpanForScope(newScope, _getSpanForScope(this));\n return newScope;\n }\n /**\n * Update the client assigned to this scope.\n * Note that not every scope will have a client assigned - isolation scopes & the global scope will generally not have a client,\n * as well as manually created scopes.\n */\n setClient(client) {\n this._client = client;\n }\n /**\n * Set the ID of the last captured error event.\n * This is generally only captured on the isolation scope.\n */\n setLastEventId(lastEventId) {\n this._lastEventId = lastEventId;\n }\n /**\n * Get the client assigned to this scope.\n */\n getClient() {\n return this._client;\n }\n /**\n * Get the ID of the last captured error event.\n * This is generally only available on the isolation scope.\n */\n lastEventId() {\n return this._lastEventId;\n }\n /**\n * @inheritDoc\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n /**\n * Add an event processor that will be called before an event is sent.\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n /**\n * Set the user for this scope.\n * Set to `null` to unset the user.\n */\n setUser(user) {\n this._user = user || {\n email: void 0,\n id: void 0,\n ip_address: void 0,\n username: void 0\n };\n if (this._session) {\n updateSession(this._session, { user });\n }\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Get the user from this scope.\n */\n getUser() {\n return this._user;\n }\n /**\n * Set the conversation ID for this scope.\n * Set to `null` to unset the conversation ID.\n */\n setConversationId(conversationId) {\n this._conversationId = conversationId || void 0;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Set an object that will be merged into existing tags on the scope,\n * and will be sent as tags data with the event.\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags\n };\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Set a single tag that will be sent as tags data with the event.\n */\n setTag(key, value) {\n return this.setTags({ [key]: value });\n }\n /**\n * Sets attributes onto the scope.\n *\n * These attributes are applied to logs, metrics and streamed spans.\n *\n * Supported attribute value types are `string`, `number`, `boolean`, `string[]`, `number[]` and `boolean[]`.\n *\n * @param newAttributes - The attributes to set on the scope, as key-value pairs.\n *\n * @example\n * ```typescript\n * scope.setAttributes({\n * is_admin: true,\n * payment_selection: 'credit_card',\n * render_duration: 150,\n * });\n * ```\n */\n setAttributes(newAttributes) {\n this._attributes = {\n ...this._attributes,\n ...newAttributes\n };\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Sets an attribute onto the scope.\n *\n * These attributes are applied to logs, metrics and streamed spans.\n *\n * Supported attribute value types are `string`, `number`, `boolean`, `string[]`, `number[]` and `boolean[]`.\n *\n * @param key - The attribute key.\n * @param value - The attribute value.\n *\n * @example\n * ```typescript\n * scope.setAttribute('is_admin', true);\n * scope.setAttribute('render_duration', 150);\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setAttribute(key, value) {\n return this.setAttributes({ [key]: value });\n }\n /**\n * Removes the attribute with the given key from the scope.\n *\n * @param key - The attribute key.\n *\n * @example\n * ```typescript\n * scope.removeAttribute('is_admin');\n * ```\n */\n removeAttribute(key) {\n if (key in this._attributes) {\n delete this._attributes[key];\n this._notifyScopeListeners();\n }\n return this;\n }\n /**\n * Set an object that will be merged into existing extra on the scope,\n * and will be sent as extra data with the event.\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras\n };\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Set a single key:value extra entry that will be sent as extra data with the event.\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param {string[]} fingerprint Fingerprint to group events in Sentry.\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Sets the level on the scope for future events.\n */\n setLevel(level) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Sets the transaction name on the scope so that the name of e.g. taken server route or\n * the page location is attached to future events.\n *\n * IMPORTANT: Calling this function does NOT change the name of the currently active\n * root span. If you want to change the name of the active root span, use\n * `Sentry.updateSpanName(rootSpan, 'new name')` instead.\n *\n * By default, the SDK updates the scope's transaction name automatically on sensible\n * occasions, such as a page navigation or when handling a new request on the server.\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Sets context data with the given name.\n * Data passed as context will be normalized. You can also pass `null` to unset the context.\n * Note that context data will not be merged - calling `setContext` will overwrite an existing context with the same key.\n */\n setContext(key, context) {\n if (context === null) {\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Set the session for the scope.\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Get the session from the scope.\n */\n getSession() {\n return this._session;\n }\n /**\n * Updates the scope with provided data. Can work in three variations:\n * - plain object containing updatable attributes\n * - Scope instance that'll extract the attributes from\n * - callback function that'll receive the current scope as an argument and allow for modifications\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n const scopeToMerge = typeof captureContext === \"function\" ? captureContext(this) : captureContext;\n const scopeInstance = scopeToMerge instanceof Scope ? scopeToMerge.getScopeData() : isPlainObject(scopeToMerge) ? captureContext : void 0;\n const {\n tags,\n attributes,\n extra,\n user,\n contexts,\n level,\n fingerprint = [],\n propagationContext,\n conversationId\n } = scopeInstance || {};\n this._tags = { ...this._tags, ...tags };\n this._attributes = { ...this._attributes, ...attributes };\n this._extra = { ...this._extra, ...extra };\n this._contexts = { ...this._contexts, ...contexts };\n if (user && Object.keys(user).length) {\n this._user = user;\n }\n if (level) {\n this._level = level;\n }\n if (fingerprint.length) {\n this._fingerprint = fingerprint;\n }\n if (propagationContext) {\n this._propagationContext = propagationContext;\n }\n if (conversationId) {\n this._conversationId = conversationId;\n }\n return this;\n }\n /**\n * Clears the current scope and resets its properties.\n * Note: The client will not be cleared.\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._attributes = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = void 0;\n this._transactionName = void 0;\n this._fingerprint = void 0;\n this._session = void 0;\n this._conversationId = void 0;\n _setSpanForScope(this, void 0);\n this._attachments = [];\n this.setPropagationContext({\n traceId: generateTraceId(),\n sampleRand: safeMathRandom()\n });\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Adds a breadcrumb to the scope.\n * By default, the last 100 breadcrumbs are kept.\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === \"number\" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n if (maxCrumbs <= 0) {\n return this;\n }\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n // Breadcrumb messages can theoretically be infinitely large and they're held in memory so we truncate them not to leak (too much) memory\n message: breadcrumb.message ? truncate(breadcrumb.message, 2048) : breadcrumb.message\n };\n this._breadcrumbs.push(mergedBreadcrumb);\n if (this._breadcrumbs.length > maxCrumbs) {\n this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);\n this._client?.recordDroppedEvent(\"buffer_overflow\", \"log_item\");\n }\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Get the last breadcrumb of the scope.\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n /**\n * Clear all breadcrumbs from the scope.\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n /**\n * Add an attachment to the scope.\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n /**\n * Clear all attachments from the scope.\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n /**\n * Get the data of this scope, which should be applied to an event during processing.\n */\n getScopeData() {\n return {\n breadcrumbs: this._breadcrumbs,\n attachments: this._attachments,\n contexts: this._contexts,\n tags: this._tags,\n attributes: this._attributes,\n extra: this._extra,\n user: this._user,\n level: this._level,\n fingerprint: this._fingerprint || [],\n eventProcessors: this._eventProcessors,\n propagationContext: this._propagationContext,\n sdkProcessingMetadata: this._sdkProcessingMetadata,\n transactionName: this._transactionName,\n span: _getSpanForScope(this),\n conversationId: this._conversationId\n };\n }\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry.\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n return this;\n }\n /**\n * Add propagation context to the scope, used for distributed tracing\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n /**\n * Get propagation context from the scope, used for distributed tracing\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n /**\n * Capture an exception for this scope.\n *\n * @returns {string} The id of the captured Sentry event.\n */\n captureException(exception, hint) {\n const eventId = hint?.event_id || uuid4();\n if (!this._client) {\n DEBUG_BUILD && debug.warn(\"No client configured on scope - will not capture exception!\");\n return eventId;\n }\n const syntheticException = new Error(\"Sentry syntheticException\");\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId\n },\n this\n );\n return eventId;\n }\n /**\n * Capture a message for this scope.\n *\n * @returns {string} The id of the captured message.\n */\n captureMessage(message, level, hint) {\n const eventId = hint?.event_id || uuid4();\n if (!this._client) {\n DEBUG_BUILD && debug.warn(\"No client configured on scope - will not capture message!\");\n return eventId;\n }\n const syntheticException = hint?.syntheticException ?? new Error(message);\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId\n },\n this\n );\n return eventId;\n }\n /**\n * Capture a Sentry event for this scope.\n *\n * @returns {string} The id of the captured event.\n */\n captureEvent(event, hint) {\n const eventId = event.event_id || hint?.event_id || uuid4();\n if (!this._client) {\n DEBUG_BUILD && debug.warn(\"No client configured on scope - will not capture event!\");\n return eventId;\n }\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n return eventId;\n }\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach((callback) => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n\nexport { Scope };\n//# sourceMappingURL=scope.js.map\n","import { getGlobalSingleton } from './carrier.js';\nimport { Scope } from './scope.js';\n\nfunction getDefaultCurrentScope() {\n return getGlobalSingleton(\"defaultCurrentScope\", () => new Scope());\n}\nfunction getDefaultIsolationScope() {\n return getGlobalSingleton(\"defaultIsolationScope\", () => new Scope());\n}\n\nexport { getDefaultCurrentScope, getDefaultIsolationScope };\n//# sourceMappingURL=defaultScopes.js.map\n","const isActualPromise = (p) => p instanceof Promise && !p[kChainedCopy];\nconst kChainedCopy = /* @__PURE__ */ Symbol(\"chained PromiseLike\");\nconst chainAndCopyPromiseLike = (original, onSuccess, onError) => {\n const chained = original.then(\n (value) => {\n onSuccess(value);\n return value;\n },\n (err) => {\n onError(err);\n throw err;\n }\n );\n return isActualPromise(chained) && isActualPromise(original) ? chained : copyProps(original, chained);\n};\nconst copyProps = (original, chained) => {\n if (!chained) return original;\n let mutated = false;\n for (const key in original) {\n if (key in chained) continue;\n mutated = true;\n const value = original[key];\n if (typeof value === \"function\") {\n Object.defineProperty(chained, key, {\n value: (...args) => value.apply(original, args),\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n chained[key] = value;\n }\n }\n if (mutated) Object.assign(chained, { [kChainedCopy]: true });\n return chained;\n};\n\nexport { chainAndCopyPromiseLike };\n//# sourceMappingURL=chain-and-copy-promiselike.js.map\n","import { getDefaultCurrentScope, getDefaultIsolationScope } from '../defaultScopes.js';\nimport { Scope } from '../scope.js';\nimport { chainAndCopyPromiseLike } from '../utils/chain-and-copy-promiselike.js';\nimport { isThenable } from '../utils/is.js';\nimport { getMainCarrier, getSentryCarrier } from '../carrier.js';\n\nclass AsyncContextStack {\n constructor(scope, isolationScope) {\n let assignedScope;\n if (!scope) {\n assignedScope = new Scope();\n } else {\n assignedScope = scope;\n }\n let assignedIsolationScope;\n if (!isolationScope) {\n assignedIsolationScope = new Scope();\n } else {\n assignedIsolationScope = isolationScope;\n }\n this._stack = [{ scope: assignedScope }];\n this._isolationScope = assignedIsolationScope;\n }\n /**\n * Fork a scope for the stack.\n */\n withScope(callback) {\n const scope = this._pushScope();\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(scope);\n } catch (e) {\n this._popScope();\n throw e;\n }\n if (isThenable(maybePromiseResult)) {\n return chainAndCopyPromiseLike(\n maybePromiseResult,\n () => this._popScope(),\n () => this._popScope()\n );\n }\n this._popScope();\n return maybePromiseResult;\n }\n /**\n * Get the client of the stack.\n */\n getClient() {\n return this.getStackTop().client;\n }\n /**\n * Returns the scope of the top stack.\n */\n getScope() {\n return this.getStackTop().scope;\n }\n /**\n * Get the isolation scope for the stack.\n */\n getIsolationScope() {\n return this._isolationScope;\n }\n /**\n * Returns the topmost scope layer in the order domain > local > process.\n */\n getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n /**\n * Push a scope to the stack.\n */\n _pushScope() {\n const scope = this.getScope().clone();\n this._stack.push({\n client: this.getClient(),\n scope\n });\n return scope;\n }\n /**\n * Pop a scope from the stack.\n */\n _popScope() {\n if (this._stack.length <= 1) return false;\n return !!this._stack.pop();\n }\n}\nfunction getAsyncContextStack() {\n const registry = getMainCarrier();\n const sentry = getSentryCarrier(registry);\n return sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope());\n}\nfunction withScope(callback) {\n return getAsyncContextStack().withScope(callback);\n}\nfunction withSetScope(scope, callback) {\n const stack = getAsyncContextStack();\n return stack.withScope(() => {\n stack.getStackTop().scope = scope;\n return callback(scope);\n });\n}\nfunction withIsolationScope(callback) {\n return getAsyncContextStack().withScope(() => {\n return callback(getAsyncContextStack().getIsolationScope());\n });\n}\nfunction getStackAsyncContextStrategy() {\n return {\n withIsolationScope,\n withScope,\n withSetScope,\n withSetIsolationScope: (_isolationScope, callback) => {\n return withIsolationScope(callback);\n },\n getCurrentScope: () => getAsyncContextStack().getScope(),\n getIsolationScope: () => getAsyncContextStack().getIsolationScope()\n };\n}\n\nexport { AsyncContextStack, getStackAsyncContextStrategy };\n//# sourceMappingURL=stackStrategy.js.map\n","import { getSentryCarrier, getMainCarrier } from '../carrier.js';\nimport { getStackAsyncContextStrategy } from './stackStrategy.js';\n\nfunction setAsyncContextStrategy(strategy) {\n const registry = getMainCarrier();\n const sentry = getSentryCarrier(registry);\n sentry.acs = strategy;\n}\nfunction getAsyncContextStrategy(carrier) {\n const sentry = getSentryCarrier(carrier);\n if (sentry.acs) {\n return sentry.acs;\n }\n return getStackAsyncContextStrategy();\n}\n\nexport { getAsyncContextStrategy, setAsyncContextStrategy };\n//# sourceMappingURL=index.js.map\n","import { isPrimitive } from './utils/is.js';\n\nfunction isAttributeObject(maybeObj) {\n return typeof maybeObj === \"object\" && maybeObj != null && !Array.isArray(maybeObj) && Object.keys(maybeObj).includes(\"value\");\n}\nfunction attributeValueToTypedAttributeValue(rawValue, useFallback) {\n const { value, unit } = isAttributeObject(rawValue) ? rawValue : { value: rawValue, unit: void 0 };\n const attributeValue = getTypedAttributeValue(value);\n const checkedUnit = unit && typeof unit === \"string\" ? { unit } : {};\n if (attributeValue) {\n return { ...attributeValue, ...checkedUnit };\n }\n if (!useFallback || useFallback === \"skip-undefined\" && value === void 0) {\n return;\n }\n let stringValue = \"\";\n try {\n stringValue = JSON.stringify(value) ?? \"\";\n } catch {\n }\n return {\n value: stringValue,\n type: \"string\",\n ...checkedUnit\n };\n}\nfunction serializeAttributes(attributes, fallback = false) {\n const serializedAttributes = {};\n for (const [key, value] of Object.entries(attributes ?? {})) {\n const typedValue = attributeValueToTypedAttributeValue(value, fallback);\n if (typedValue) {\n serializedAttributes[key] = typedValue;\n }\n }\n return serializedAttributes;\n}\nfunction estimateTypedAttributesSizeInBytes(attributes) {\n if (!attributes) {\n return 0;\n }\n let weight = 0;\n for (const [key, attr] of Object.entries(attributes)) {\n weight += key.length * 2;\n weight += attr.type.length * 2;\n weight += (attr.unit?.length ?? 0) * 2;\n const val = attr.value;\n if (Array.isArray(val)) {\n weight += estimatePrimitiveSizeInBytes(val[0]) * val.length;\n } else if (isPrimitive(val)) {\n weight += estimatePrimitiveSizeInBytes(val);\n } else {\n weight += 100;\n }\n }\n return weight;\n}\nfunction estimatePrimitiveSizeInBytes(value) {\n if (typeof value === \"string\") {\n return value.length * 2;\n } else if (typeof value === \"boolean\") {\n return 4;\n } else if (typeof value === \"number\") {\n return 8;\n }\n return 0;\n}\nfunction getTypedAttributeValue(value) {\n if (Array.isArray(value)) {\n return { value, type: \"array\" };\n }\n const primitiveType = typeof value === \"string\" ? \"string\" : typeof value === \"boolean\" ? \"boolean\" : typeof value === \"number\" && !Number.isNaN(value) ? Number.isInteger(value) ? \"integer\" : \"double\" : null;\n if (primitiveType) {\n return { value, type: primitiveType };\n }\n}\n\nexport { attributeValueToTypedAttributeValue, estimateTypedAttributesSizeInBytes, isAttributeObject, serializeAttributes };\n//# sourceMappingURL=attributes.js.map\n","import { getAsyncContextStrategy } from './asyncContext/index.js';\nimport { getMainCarrier, getGlobalSingleton } from './carrier.js';\nimport { Scope } from './scope.js';\nimport { generateSpanId } from './utils/propagationContext.js';\n\nlet _externalPropagationContextProvider;\nfunction registerExternalPropagationContext(fn) {\n _externalPropagationContextProvider = fn;\n}\nfunction getExternalPropagationContext() {\n return _externalPropagationContextProvider?.();\n}\nfunction hasExternalPropagationContext() {\n return _externalPropagationContextProvider !== void 0;\n}\nfunction getCurrentScope() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n return acs.getCurrentScope();\n}\nfunction getIsolationScope() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n return acs.getIsolationScope();\n}\nfunction getGlobalScope() {\n return getGlobalSingleton(\"globalScope\", () => new Scope());\n}\nfunction withScope(...rest) {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (rest.length === 2) {\n const [scope, callback] = rest;\n if (!scope) {\n return acs.withScope(callback);\n }\n return acs.withSetScope(scope, callback);\n }\n return acs.withScope(rest[0]);\n}\nfunction withIsolationScope(...rest) {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (rest.length === 2) {\n const [isolationScope, callback] = rest;\n if (!isolationScope) {\n return acs.withIsolationScope(callback);\n }\n return acs.withSetIsolationScope(isolationScope, callback);\n }\n return acs.withIsolationScope(rest[0]);\n}\nfunction getClient() {\n return getCurrentScope().getClient();\n}\nfunction getTraceContextFromScope(scope) {\n const externalContext = getExternalPropagationContext();\n if (externalContext) {\n return { trace_id: externalContext.traceId, span_id: externalContext.spanId };\n }\n const propagationContext = scope.getPropagationContext();\n const { traceId, parentSpanId, propagationSpanId } = propagationContext;\n const traceContext = {\n trace_id: traceId,\n span_id: propagationSpanId || generateSpanId()\n };\n if (parentSpanId) {\n traceContext.parent_span_id = parentSpanId;\n }\n return traceContext;\n}\n\nexport { getClient, getCurrentScope, getExternalPropagationContext, getGlobalScope, getIsolationScope, getTraceContextFromScope, hasExternalPropagationContext, registerExternalPropagationContext, withIsolationScope, withScope };\n//# sourceMappingURL=currentScopes.js.map\n","const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = \"sentry.source\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = \"sentry.sample_rate\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = \"sentry.previous_trace_sample_rate\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_OP = \"sentry.op\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = \"sentry.origin\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE = \"sentry.status.message\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = \"sentry.idle_span_finish_reason\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = \"sentry.measurement_unit\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = \"sentry.measurement_value\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = \"sentry.release\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT = \"sentry.environment\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME = \"sentry.segment.name\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = \"sentry.segment.id\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = \"sentry.sdk.name\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = \"sentry.sdk.version\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS = \"sentry.sdk.integrations\";\nconst SEMANTIC_ATTRIBUTE_USER_ID = \"user.id\";\nconst SEMANTIC_ATTRIBUTE_USER_EMAIL = \"user.email\";\nconst SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS = \"user.ip_address\";\nconst SEMANTIC_ATTRIBUTE_USER_USERNAME = \"user.name\";\nconst SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = \"sentry.custom_span_name\";\nconst SEMANTIC_ATTRIBUTE_PROFILE_ID = \"sentry.profile_id\";\nconst SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = \"sentry.exclusive_time\";\nconst SEMANTIC_ATTRIBUTE_CACHE_HIT = \"cache.hit\";\nconst SEMANTIC_ATTRIBUTE_CACHE_KEY = \"cache.key\";\nconst SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = \"cache.item_size\";\nconst SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = \"http.request.method\";\nconst SEMANTIC_ATTRIBUTE_URL_FULL = \"url.full\";\nconst SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE = \"sentry.link.type\";\nconst GEN_AI_CONVERSATION_ID_ATTRIBUTE = \"gen_ai.conversation.id\";\n\nexport { GEN_AI_CONVERSATION_ID_ATTRIBUTE, SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_RELEASE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS, SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME, SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID, SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE, SEMANTIC_ATTRIBUTE_URL_FULL, SEMANTIC_ATTRIBUTE_USER_EMAIL, SEMANTIC_ATTRIBUTE_USER_ID, SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS, SEMANTIC_ATTRIBUTE_USER_USERNAME, SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE };\n//# sourceMappingURL=semanticAttributes.js.map\n","import { addNonEnumerableProperty } from '../utils/object.js';\nimport { derefWeakRef, makeWeakRef } from '../utils/weakRef.js';\n\nconst SCOPE_ON_START_SPAN_FIELD = \"_sentryScope\";\nconst ISOLATION_SCOPE_ON_START_SPAN_FIELD = \"_sentryIsolationScope\";\nconst OTEL_SOURCE_INFERENCE_SPAN_FIELD = /* @__PURE__ */ Symbol.for(\"sentry.otelSourceInference\");\nconst OTEL_SOURCE_EXPLICITLY_SET_SPAN_FIELD = /* @__PURE__ */ Symbol.for(\"sentry.otelSourceExplicitlySet\");\nconst TRACER_PROVIDER_SPAN_FIELD = /* @__PURE__ */ Symbol.for(\"sentry.tracerProviderSpan\");\nfunction setCapturedScopesOnSpan(span, scope, isolationScope) {\n if (span) {\n addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, makeWeakRef(isolationScope));\n addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope);\n }\n}\nfunction getCapturedScopesOnSpan(span) {\n const spanWithScopes = span;\n return {\n scope: spanWithScopes[SCOPE_ON_START_SPAN_FIELD],\n isolationScope: derefWeakRef(spanWithScopes[ISOLATION_SCOPE_ON_START_SPAN_FIELD])\n };\n}\nfunction markSpanForOtelSourceInference(span) {\n addNonEnumerableProperty(span, OTEL_SOURCE_INFERENCE_SPAN_FIELD, true);\n}\nfunction spanShouldInferOtelSource(span) {\n return span[OTEL_SOURCE_INFERENCE_SPAN_FIELD] === true;\n}\nfunction markSpanSourceAsExplicit(span) {\n addNonEnumerableProperty(span, OTEL_SOURCE_EXPLICITLY_SET_SPAN_FIELD, true);\n}\nfunction spanSourceWasExplicitlySet(span) {\n return span[OTEL_SOURCE_EXPLICITLY_SET_SPAN_FIELD] === true;\n}\nfunction markSpanAsTracerProviderSpan(span) {\n addNonEnumerableProperty(span, TRACER_PROVIDER_SPAN_FIELD, true);\n}\nfunction spanIsTracerProviderSpan(span) {\n return span[TRACER_PROVIDER_SPAN_FIELD] === true;\n}\n\nexport { getCapturedScopesOnSpan, markSpanAsTracerProviderSpan, markSpanForOtelSourceInference, markSpanSourceAsExplicit, setCapturedScopesOnSpan, spanIsTracerProviderSpan, spanShouldInferOtelSource, spanSourceWasExplicitlySet };\n//# sourceMappingURL=utils.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from './debug-logger.js';\nimport { isString } from './is.js';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = \"sentry-\";\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\nfunction baggageHeaderToDynamicSamplingContext(baggageHeader) {\n const baggageObject = parseBaggageHeader(baggageHeader);\n if (!baggageObject) {\n return void 0;\n }\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext;\n } else {\n return void 0;\n }\n}\nfunction dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext) {\n if (!dynamicSamplingContext) {\n return void 0;\n }\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {}\n );\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\nfunction parseBaggageHeader(baggageHeader) {\n if (!baggageHeader || !isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return void 0;\n }\n if (Array.isArray(baggageHeader)) {\n return baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n Object.entries(currBaggageObject).forEach(([key, value]) => {\n acc[key] = value;\n });\n return acc;\n }, {});\n }\n return baggageHeaderToObject(baggageHeader);\n}\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader.split(\",\").map((baggageEntry) => {\n const eqIdx = baggageEntry.indexOf(\"=\");\n if (eqIdx === -1) {\n return [];\n }\n const key = baggageEntry.slice(0, eqIdx);\n const value = baggageEntry.slice(eqIdx + 1);\n return [key, value].map((keyOrValue) => {\n try {\n return decodeURIComponent(keyOrValue.trim());\n } catch {\n return;\n }\n });\n }).reduce((acc, [key, value]) => {\n if (key && value) {\n acc[key] = value;\n }\n return acc;\n }, {});\n}\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n return void 0;\n }\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD && debug.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, \"\");\n}\nfunction mergeBaggageHeaders(existing, incoming) {\n if (!existing) {\n return incoming;\n }\n const existingEntries = parseBaggageHeader(existing);\n const incomingEntries = parseBaggageHeader(incoming);\n if (!incomingEntries) {\n return existing;\n }\n const merged = {};\n let hasNewSentryEntries = false;\n const newSentryEntries = {};\n const newNonSentryEntries = {};\n for (const [key, value] of Object.entries(incomingEntries)) {\n if (key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {\n newSentryEntries[key] = value;\n hasNewSentryEntries = true;\n } else {\n newNonSentryEntries[key] = value;\n }\n }\n if (existingEntries) {\n for (const [key, value] of Object.entries(existingEntries)) {\n if (!hasNewSentryEntries || !key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {\n merged[key] = value;\n }\n }\n }\n if (hasNewSentryEntries) {\n Object.assign(merged, newSentryEntries);\n }\n for (const [key, value] of Object.entries(newNonSentryEntries)) {\n merged[key] ?? (merged[key] = value);\n }\n return objectToBaggageHeader(merged);\n}\n\nexport { MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, mergeBaggageHeaders, objectToBaggageHeader, parseBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { consoleSandbox, debug } from './debug-logger.js';\n\nconst ORG_ID_REGEX = /^o(\\d+)\\./;\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)((?:\\[[:.%\\w]+\\]|[\\w.-]+))(?::(\\d+))?\\/(.+)/;\nfunction isValidProtocol(protocol) {\n return protocol === \"http\" || protocol === \"https\";\n}\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : \"\"}@${host}${port ? `:${port}` : \"\"}/${path ? `${path}/` : path}${projectId}`;\n}\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n if (!match) {\n consoleSandbox(() => {\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return void 0;\n }\n const [protocol, publicKey, pass = \"\", host = \"\", port = \"\", lastPath = \"\"] = match.slice(1);\n let path = \"\";\n let projectId = lastPath;\n const split = projectId.split(\"/\");\n if (split.length > 1) {\n path = split.slice(0, -1).join(\"/\");\n projectId = split.pop();\n }\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n return dsnFromComponents({ host, pass, path, projectId, port, protocol, publicKey });\n}\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || \"\",\n pass: components.pass || \"\",\n host: components.host,\n port: components.port || \"\",\n path: components.path || \"\",\n projectId: components.projectId\n };\n}\nfunction validateDsn(dsn) {\n if (!DEBUG_BUILD) {\n return true;\n }\n const { port, projectId, protocol } = dsn;\n const requiredComponents = [\"protocol\", \"publicKey\", \"host\", \"projectId\"];\n const hasMissingRequiredComponent = requiredComponents.find((component) => {\n if (!dsn[component]) {\n debug.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n if (hasMissingRequiredComponent) {\n return false;\n }\n if (!projectId.match(/^\\d+$/)) {\n debug.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n if (!isValidProtocol(protocol)) {\n debug.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n if (port && isNaN(parseInt(port, 10))) {\n debug.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n return true;\n}\nfunction extractOrgIdFromDsnHost(host) {\n const match = host.match(ORG_ID_REGEX);\n return match?.[1];\n}\nfunction extractOrgIdFromClient(client) {\n const options = client.getOptions();\n const { host } = client.getDsn() || {};\n let org_id;\n if (options.orgId) {\n org_id = String(options.orgId);\n } else if (host) {\n org_id = extractOrgIdFromDsnHost(host);\n }\n return org_id;\n}\nfunction makeDsn(from) {\n const components = typeof from === \"string\" ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return void 0;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, extractOrgIdFromClient, extractOrgIdFromDsnHost, makeDsn };\n//# sourceMappingURL=dsn.js.map\n","function parseSampleRate(sampleRate) {\n if (typeof sampleRate === \"boolean\") {\n return Number(sampleRate);\n }\n const rate = typeof sampleRate === \"string\" ? parseFloat(sampleRate) : sampleRate;\n if (typeof rate !== \"number\" || isNaN(rate) || rate < 0 || rate > 1) {\n return void 0;\n }\n return rate;\n}\n\nexport { parseSampleRate };\n//# sourceMappingURL=parseSampleRate.js.map\n","import { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { serializeAttributes } from '../attributes.js';\nimport { getMainCarrier } from '../carrier.js';\nimport { getCurrentScope } from '../currentScopes.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE } from '../semanticAttributes.js';\nimport { SPAN_STATUS_UNSET, SPAN_STATUS_OK } from '../tracing/spanstatus.js';\nimport { getCapturedScopesOnSpan } from '../tracing/utils.js';\nimport { addNonEnumerableProperty } from './object.js';\nimport { generateSpanId } from './propagationContext.js';\nimport { timestampInSeconds } from './time.js';\nimport { generateSentryTraceHeader, generateTraceparentHeader } from './tracing.js';\nimport { consoleSandbox } from './debug-logger.js';\nimport { _getSpanForScope } from './spanOnScope.js';\n\nconst TRACE_FLAG_NONE = 0;\nconst TRACE_FLAG_SAMPLED = 1;\nlet hasShownSpanDropWarning = false;\nfunction spanToTransactionTraceContext(span) {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, origin, links } = spanToJSON(span);\n return {\n parent_span_id,\n span_id,\n trace_id,\n data,\n op,\n status,\n origin,\n links\n };\n}\nfunction spanToTraceContext(span) {\n const { spanId, traceId: trace_id, isRemote } = span.spanContext();\n const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n const scope = getCapturedScopesOnSpan(span).scope;\n const span_id = isRemote ? scope?.getPropagationContext().propagationSpanId || generateSpanId() : spanId;\n return {\n parent_span_id,\n span_id,\n trace_id\n };\n}\nfunction spanToTraceHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\nfunction spanToTraceparentHeader(span) {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateTraceparentHeader(traceId, spanId, sampled);\n}\nfunction convertSpanLinksForEnvelope(links) {\n if (links && links.length > 0) {\n return links.map(({ context: { spanId, traceId, traceFlags, ...restContext }, attributes }) => ({\n span_id: spanId,\n trace_id: traceId,\n sampled: traceFlags === TRACE_FLAG_SAMPLED,\n attributes,\n ...restContext\n }));\n } else {\n return void 0;\n }\n}\nfunction getStreamedSpanLinks(links) {\n if (links?.length) {\n return links.map(({ context: { spanId, traceId, traceFlags }, attributes }) => ({\n span_id: spanId,\n trace_id: traceId,\n sampled: traceFlags === TRACE_FLAG_SAMPLED,\n attributes\n }));\n } else {\n return void 0;\n }\n}\nfunction spanTimeInputToSeconds(input) {\n if (typeof input === \"number\") {\n return ensureTimestampInSeconds(input);\n }\n if (Array.isArray(input)) {\n return input[0] + input[1] / 1e9;\n }\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n return timestampInSeconds();\n}\nfunction ensureTimestampInSeconds(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1e3 : timestamp;\n}\nfunction spanToJSON(span) {\n if (spanIsSentrySpan(span)) {\n return span.getSpanJSON();\n }\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n const { attributes, startTime, name, endTime, status, links } = span;\n return {\n span_id,\n trace_id,\n data: attributes,\n description: name,\n parent_span_id: getOtelParentSpanId(span),\n start_timestamp: spanTimeInputToSeconds(startTime),\n // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n timestamp: spanTimeInputToSeconds(endTime) || void 0,\n status: getStatusMessage(status),\n op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],\n links: convertSpanLinksForEnvelope(links)\n };\n }\n return {\n span_id,\n trace_id,\n start_timestamp: 0,\n data: {}\n };\n}\nfunction spanToStreamedSpanJSON(span) {\n if (spanIsSentrySpan(span)) {\n return span.getStreamedSpanJSON();\n }\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n const { attributes, startTime, name, endTime, status, links } = span;\n return {\n name,\n span_id,\n trace_id,\n parent_span_id: getOtelParentSpanId(span),\n start_timestamp: spanTimeInputToSeconds(startTime),\n end_timestamp: spanTimeInputToSeconds(endTime),\n is_segment: span === INTERNAL_getSegmentSpan(span),\n status: getSimpleStatus(status),\n attributes: addStatusMessageAttribute(attributes, status),\n links: getStreamedSpanLinks(links)\n };\n }\n return {\n span_id,\n trace_id,\n start_timestamp: 0,\n name: \"\",\n end_timestamp: 0,\n status: \"ok\",\n is_segment: span === INTERNAL_getSegmentSpan(span)\n };\n}\nfunction getOtelParentSpanId(span) {\n return \"parentSpanId\" in span ? span.parentSpanId : \"parentSpanContext\" in span ? span.parentSpanContext?.spanId : void 0;\n}\nfunction streamedSpanJsonToSerializedSpan(spanJson) {\n return {\n ...spanJson,\n attributes: serializeAttributes(spanJson.attributes),\n links: spanJson.links?.map((link) => ({\n ...link,\n attributes: serializeAttributes(link.attributes)\n }))\n };\n}\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span) {\n const castSpan = span;\n return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\nfunction spanIsSentrySpan(span) {\n return typeof span.getSpanJSON === \"function\";\n}\nfunction spanIsSampled(span) {\n const { traceFlags } = span.spanContext();\n return traceFlags === TRACE_FLAG_SAMPLED;\n}\nfunction getStatusMessage(status) {\n if (!status || status.code === SPAN_STATUS_UNSET) {\n return void 0;\n }\n if (status.code === SPAN_STATUS_OK) {\n return \"ok\";\n }\n return status.message || \"internal_error\";\n}\nfunction getSimpleStatus(status) {\n return !status || status.code === SPAN_STATUS_OK || status.code === SPAN_STATUS_UNSET || status.message === \"cancelled\" ? \"ok\" : \"error\";\n}\nfunction addStatusMessageAttribute(attributes, status) {\n const statusMessage = getSimpleStatus(status) === \"error\" ? status?.message : void 0;\n return {\n ...statusMessage && { [SEMANTIC_ATTRIBUTE_SENTRY_STATUS_MESSAGE]: statusMessage },\n ...attributes\n };\n}\nconst CHILD_SPANS_FIELD = \"_sentryChildSpans\";\nconst ROOT_SPAN_FIELD = \"_sentryRootSpan\";\nfunction addChildSpanToSpan(span, childSpan) {\n const rootSpan = span[ROOT_SPAN_FIELD] || span;\n addNonEnumerableProperty(childSpan, ROOT_SPAN_FIELD, rootSpan);\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].add(childSpan);\n } else {\n addNonEnumerableProperty(span, CHILD_SPANS_FIELD, /* @__PURE__ */ new Set([childSpan]));\n }\n}\nfunction removeChildSpanFromSpan(span, childSpan) {\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].delete(childSpan);\n }\n}\nfunction getSpanDescendants(span) {\n const resultSet = /* @__PURE__ */ new Set();\n function addSpanChildren(span2) {\n if (resultSet.has(span2)) {\n return;\n } else if (spanIsSampled(span2)) {\n resultSet.add(span2);\n const childSpans = span2[CHILD_SPANS_FIELD] ? Array.from(span2[CHILD_SPANS_FIELD]) : [];\n for (const childSpan of childSpans) {\n addSpanChildren(childSpan);\n }\n }\n }\n addSpanChildren(span);\n return Array.from(resultSet);\n}\nconst getRootSpan = INTERNAL_getSegmentSpan;\nfunction INTERNAL_getSegmentSpan(span) {\n return span[ROOT_SPAN_FIELD] || span;\n}\nfunction getActiveSpan() {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.getActiveSpan) {\n return acs.getActiveSpan();\n }\n return _getSpanForScope(getCurrentScope());\n}\nfunction showSpanDropWarning() {\n if (!hasShownSpanDropWarning) {\n consoleSandbox(() => {\n console.warn(\n \"[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.\"\n );\n });\n hasShownSpanDropWarning = true;\n }\n}\nfunction updateSpanName(span, name) {\n span.updateName(name);\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: \"custom\",\n [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name\n });\n}\n\nexport { INTERNAL_getSegmentSpan, TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, addChildSpanToSpan, addStatusMessageAttribute, convertSpanLinksForEnvelope, getActiveSpan, getRootSpan, getSimpleStatus, getSpanDescendants, getStatusMessage, getStreamedSpanLinks, removeChildSpanFromSpan, showSpanDropWarning, spanIsSampled, spanIsSentrySpan, spanTimeInputToSeconds, spanToJSON, spanToStreamedSpanJSON, spanToTraceContext, spanToTraceHeader, spanToTraceparentHeader, spanToTransactionTraceContext, streamedSpanJsonToSerializedSpan, updateSpanName };\n//# sourceMappingURL=spanUtils.js.map\n","import { getClient } from '../currentScopes.js';\n\nfunction hasSpansEnabled(maybeOptions) {\n if (typeof __SENTRY_TRACING__ === \"boolean\" && !__SENTRY_TRACING__) {\n return false;\n }\n const options = maybeOptions || getClient()?.getOptions();\n return !!options && // Note: This check is `!= null`, meaning \"nullish\". `0` is not \"nullish\", `undefined` and `null` are. (This comment was brought to you by 15 minutes of questioning life)\n (options.tracesSampleRate != null || !!options.tracesSampler);\n}\n\nexport { hasSpansEnabled };\n//# sourceMappingURL=hasSpansEnabled.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from './debug-logger.js';\nimport { isMatchingPattern } from './string.js';\n\nfunction logIgnoredSpan(droppedSpan) {\n debug.log(`Ignoring span ${droppedSpan.op} - ${droppedSpan.description} because it matches \\`ignoreSpans\\`.`);\n}\nfunction shouldIgnoreSpan(span, ignoreSpans) {\n if (!ignoreSpans?.length) {\n return false;\n }\n for (const pattern of ignoreSpans) {\n if (isStringOrRegExp(pattern)) {\n if (span.description && isMatchingPattern(span.description, pattern)) {\n DEBUG_BUILD && logIgnoredSpan(span);\n return true;\n }\n continue;\n }\n const hasAttributes = !!pattern.attributes && Object.keys(pattern.attributes).length > 0;\n if (!pattern.name && !pattern.op && !hasAttributes) {\n continue;\n }\n const nameMatches = pattern.name ? span.description && isMatchingPattern(span.description, pattern.name) : true;\n const opMatches = pattern.op ? span.op && isMatchingPattern(span.op, pattern.op) : true;\n const attrsMatch = pattern.attributes ? Object.entries(pattern.attributes).every(\n ([key, valuePattern]) => _matchesAttributeValue(span.attributes?.[key], valuePattern)\n ) : true;\n if (nameMatches && opMatches && attrsMatch) {\n DEBUG_BUILD && logIgnoredSpan(span);\n return true;\n }\n }\n return false;\n}\nfunction _matchesAttributeValue(actual, pat) {\n if (typeof actual === \"string\" && (typeof pat === \"string\" || pat instanceof RegExp)) {\n return isMatchingPattern(actual, pat);\n }\n if (Array.isArray(actual) && Array.isArray(pat)) {\n return actual.length === pat.length && actual.every((v, i) => v === pat[i]);\n }\n return actual === pat;\n}\nfunction reparentChildSpans(spans, dropSpan) {\n const droppedSpanParentId = dropSpan.parent_span_id;\n const droppedSpanId = dropSpan.span_id;\n if (!droppedSpanParentId) {\n return;\n }\n for (const span of spans) {\n if (span.parent_span_id === droppedSpanId) {\n span.parent_span_id = droppedSpanParentId;\n }\n }\n}\nfunction isStringOrRegExp(value) {\n return typeof value === \"string\" || value instanceof RegExp;\n}\n\nexport { reparentChildSpans, shouldIgnoreSpan };\n//# sourceMappingURL=should-ignore-span.js.map\n","import { addNonEnumerableProperty } from '../utils/object.js';\nimport { generateTraceId, generateSpanId } from '../utils/propagationContext.js';\nimport { TRACE_FLAG_NONE } from '../utils/spanUtils.js';\n\nconst NON_RECORDING_SPAN_FIELD = /* @__PURE__ */ Symbol.for(\"sentry.nonRecordingSpan\");\nclass SentryNonRecordingSpan {\n constructor(spanContext = {}) {\n this._traceId = spanContext.traceId || generateTraceId();\n this._spanId = spanContext.spanId || generateSpanId();\n this.dropReason = spanContext.dropReason;\n addNonEnumerableProperty(this, NON_RECORDING_SPAN_FIELD, true);\n }\n /** @inheritdoc */\n spanContext() {\n return {\n spanId: this._spanId,\n traceId: this._traceId,\n traceFlags: TRACE_FLAG_NONE\n };\n }\n /** @inheritdoc */\n end(_timestamp) {\n }\n /** @inheritdoc */\n setAttribute(_key, _value) {\n return this;\n }\n /** @inheritdoc */\n setAttributes(_values) {\n return this;\n }\n /** @inheritdoc */\n setStatus(_status) {\n return this;\n }\n /** @inheritdoc */\n updateName(_name) {\n return this;\n }\n /** @inheritdoc */\n isRecording() {\n return false;\n }\n /** @inheritdoc */\n addEvent(_name, _attributesOrStartTime, _startTime) {\n return this;\n }\n /** @inheritDoc */\n addLink(_link) {\n return this;\n }\n /** @inheritDoc */\n addLinks(_links) {\n return this;\n }\n /**\n * This should generally not be used,\n * but we need it for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n recordException(_exception, _time) {\n }\n}\nfunction spanIsNonRecordingSpan(span) {\n return !!span && span[NON_RECORDING_SPAN_FIELD] === true;\n}\n\nexport { SentryNonRecordingSpan, spanIsNonRecordingSpan };\n//# sourceMappingURL=sentryNonRecordingSpan.js.map\n","const DEFAULT_ENVIRONMENT = \"production\";\nconst DEV_ENVIRONMENT = \"development\";\n\nexport { DEFAULT_ENVIRONMENT, DEV_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getClient } from '../currentScopes.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '../semanticAttributes.js';\nimport { baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader } from '../utils/baggage.js';\nimport { extractOrgIdFromClient } from '../utils/dsn.js';\nimport { hasSpansEnabled } from '../utils/hasSpansEnabled.js';\nimport { addNonEnumerableProperty } from '../utils/object.js';\nimport { getRootSpan, spanToJSON, spanIsSampled } from '../utils/spanUtils.js';\nimport { spanIsNonRecordingSpan } from './sentryNonRecordingSpan.js';\nimport { getCapturedScopesOnSpan } from './utils.js';\n\nconst FROZEN_DSC_FIELD = \"_frozenDsc\";\nfunction freezeDscOnSpan(span, dsc) {\n const spanWithMaybeDsc = span;\n addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc);\n}\nfunction getDynamicSamplingContextFromClient(trace_id, client) {\n const options = client.getOptions();\n const { publicKey: public_key } = client.getDsn() || {};\n const dsc = {\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n public_key,\n trace_id,\n org_id: extractOrgIdFromClient(client)\n };\n client.emit(\"createDsc\", dsc);\n return dsc;\n}\nfunction getDynamicSamplingContextFromScope(client, scope) {\n const propagationContext = scope.getPropagationContext();\n return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client);\n}\nfunction getDynamicSamplingContextFromSpan(span) {\n const client = getClient();\n if (!client) {\n return {};\n }\n const rootSpan = getRootSpan(span);\n const rootSpanJson = spanToJSON(rootSpan);\n const rootSpanAttributes = rootSpanJson.data;\n const traceState = rootSpan.spanContext().traceState;\n const rootSpanSampleRate = traceState?.get(\"sentry.sample_rate\") ?? rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] ?? rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE];\n function applyLocalSampleRateToDsc(dsc2) {\n if (typeof rootSpanSampleRate === \"number\" || typeof rootSpanSampleRate === \"string\") {\n dsc2.sample_rate = `${rootSpanSampleRate}`;\n }\n return dsc2;\n }\n const frozenDsc = rootSpan[FROZEN_DSC_FIELD];\n if (frozenDsc) {\n return applyLocalSampleRateToDsc(frozenDsc);\n }\n const isNonRecordingRoot = spanIsNonRecordingSpan(rootSpan);\n const isIgnoredRoot = isNonRecordingRoot && rootSpan.dropReason === \"ignored\";\n if (isNonRecordingRoot && (!hasSpansEnabled(client.getOptions()) || isIgnoredRoot)) {\n const capturedScope = getCapturedScopesOnSpan(rootSpan).scope;\n if (capturedScope) {\n const dsc2 = { ...getDynamicSamplingContextFromScope(client, capturedScope) };\n if (isIgnoredRoot) {\n dsc2.sampled = \"false\";\n }\n return applyLocalSampleRateToDsc(dsc2);\n }\n }\n const traceStateDsc = traceState?.get(\"sentry.dsc\");\n const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc);\n if (dscOnTraceState) {\n return applyLocalSampleRateToDsc(dscOnTraceState);\n }\n const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);\n const source = rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ?? rootSpanAttributes[\"sentry.segment.name.source\"];\n const name = rootSpanJson.description;\n if (source !== \"url\" && name) {\n dsc.transaction = name;\n }\n if (hasSpansEnabled()) {\n dsc.sampled = String(spanIsSampled(rootSpan));\n dsc.sample_rand = // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans\n // The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span\n traceState?.get(\"sentry.sample_rand\") ?? // On all other platforms we can actually get the scopes from a root span (we use this as a fallback)\n getCapturedScopesOnSpan(rootSpan).scope?.getPropagationContext().sampleRand.toString();\n }\n applyLocalSampleRateToDsc(dsc);\n client.emit(\"createDsc\", dsc, rootSpan);\n return dsc;\n}\nfunction spanToBaggageHeader(span) {\n const dsc = getDynamicSamplingContextFromSpan(span);\n return dynamicSamplingContextToSentryBaggageHeader(dsc);\n}\n\nexport { freezeDscOnSpan, getDynamicSamplingContextFromClient, getDynamicSamplingContextFromScope, getDynamicSamplingContextFromSpan, spanToBaggageHeader };\n//# sourceMappingURL=dynamicSamplingContext.js.map\n","import { addNonEnumerableProperty } from '../../utils/object.js';\n\nfunction withStreamedSpan(callback) {\n addNonEnumerableProperty(callback, \"_streamed\", true);\n return callback;\n}\nfunction isStreamedBeforeSendSpanCallback(callback) {\n return !!callback && typeof callback === \"function\" && \"_streamed\" in callback && !!callback._streamed;\n}\n\nexport { isStreamedBeforeSendSpanCallback, withStreamedSpan };\n//# sourceMappingURL=beforeSendSpan.js.map\n","import { getSentryCarrier } from '../carrier.js';\nimport { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { safeDateNow } from './randomSafeContext.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nfunction createEnvelope(headers, items = []) {\n return [headers, items];\n}\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]];\n}\nfunction forEachEnvelopeItem(envelope, callback) {\n const envelopeItems = envelope[1];\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n if (result) {\n return true;\n }\n }\n return false;\n}\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\nfunction encodeUTF8(input) {\n const carrier = getSentryCarrier(GLOBAL_OBJ);\n return carrier.encodePolyfill ? carrier.encodePolyfill(input) : new TextEncoder().encode(input);\n}\nfunction decodeUTF8(input) {\n const carrier = getSentryCarrier(GLOBAL_OBJ);\n return carrier.decodePolyfill ? carrier.decodePolyfill(input) : new TextDecoder().decode(input);\n}\nfunction serializeEnvelope(envelope) {\n const [envHeaders, items] = envelope;\n let parts = JSON.stringify(envHeaders);\n function append(next) {\n if (typeof parts === \"string\") {\n parts = typeof next === \"string\" ? parts + next : [encodeUTF8(parts), next];\n } else {\n parts.push(typeof next === \"string\" ? encodeUTF8(next) : next);\n }\n }\n for (const item of items) {\n const [itemHeaders, payload] = item;\n append(`\n${JSON.stringify(itemHeaders)}\n`);\n if (typeof payload === \"string\" || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch {\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n return typeof parts === \"string\" ? parts : concatBuffers(parts);\n}\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n return merged;\n}\nfunction parseEnvelope(env) {\n let buffer = typeof env === \"string\" ? encodeUTF8(env) : env;\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n function readJson() {\n let i = buffer.indexOf(10);\n if (i < 0) {\n i = buffer.length;\n }\n return JSON.parse(decodeUTF8(readBinary(i)));\n }\n const envelopeHeader = readJson();\n const items = [];\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === \"number\" ? itemHeader.length : void 0;\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n return [envelopeHeader, items];\n}\nfunction createSpanEnvelopeItem(spanJson) {\n const spanHeaders = {\n type: \"span\"\n };\n return [spanHeaders, spanJson];\n}\nfunction createAttachmentEnvelopeItem(attachment) {\n const buffer = typeof attachment.data === \"string\" ? encodeUTF8(attachment.data) : attachment.data;\n return [\n {\n type: \"attachment\",\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType\n },\n buffer\n ];\n}\nconst DATA_CATEGORY_OVERRIDES = {\n sessions: \"session\",\n event: \"error\",\n client_report: \"internal\",\n user_report: \"default\",\n profile_chunk: \"profile\",\n replay_event: \"replay\",\n replay_recording: \"replay\",\n check_in: \"monitor\",\n raw_security: \"security\",\n log: \"log_item\",\n trace_metric: \"metric\"\n};\nfunction _isOverriddenType(type) {\n return type in DATA_CATEGORY_OVERRIDES;\n}\nfunction envelopeItemTypeToDataCategory(type) {\n return _isOverriddenType(type) ? DATA_CATEGORY_OVERRIDES[type] : type;\n}\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent?.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\nfunction createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) {\n const dynamicSamplingContext = event.sdkProcessingMetadata?.dynamicSamplingContext;\n return {\n event_id: event.event_id,\n sent_at: new Date(safeDateNow()).toISOString(),\n ...sdkInfo && { sdk: sdkInfo },\n ...!!tunnel && dsn && { dsn: dsnToString(dsn) },\n ...dynamicSamplingContext && {\n trace: dynamicSamplingContext\n }\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext.js';\nimport { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan.js';\nimport { dsnToString } from './utils/dsn.js';\nimport { getSdkMetadataForEnvelopeHeader, createEventEnvelopeHeaders, createEnvelope, createSpanEnvelopeItem } from './utils/envelope.js';\nimport { safeDateNow } from './utils/randomSafeContext.js';\nimport { shouldIgnoreSpan } from './utils/should-ignore-span.js';\nimport { spanToJSON, showSpanDropWarning } from './utils/spanUtils.js';\n\nfunction _enhanceEventWithSdkInfo(event, newSdkInfo) {\n if (!newSdkInfo) {\n return event;\n }\n const eventSdkInfo = event.sdk || {};\n event.sdk = {\n ...eventSdkInfo,\n name: eventSdkInfo.name || newSdkInfo.name,\n version: eventSdkInfo.version || newSdkInfo.version,\n integrations: [...event.sdk?.integrations || [], ...newSdkInfo.integrations || []],\n packages: [...event.sdk?.packages || [], ...newSdkInfo.packages || []],\n settings: event.sdk?.settings || newSdkInfo.settings ? {\n ...event.sdk?.settings,\n ...newSdkInfo.settings\n } : void 0\n };\n return event;\n}\nfunction createSessionEnvelope(session, dsn, metadata, tunnel) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date(safeDateNow()).toISOString(),\n ...sdkInfo && { sdk: sdkInfo },\n ...!!tunnel && dsn && { dsn: dsnToString(dsn) }\n };\n const envelopeItem = \"aggregates\" in session ? [{ type: \"sessions\" }, session] : [{ type: \"session\" }, session.toJSON()];\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\nfunction createEventEnvelope(event, dsn, metadata, tunnel) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const eventType = event.type && event.type !== \"replay_event\" ? event.type : \"event\";\n _enhanceEventWithSdkInfo(event, metadata?.sdk);\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n delete event.sdkProcessingMetadata;\n const eventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\nfunction createSpanEnvelope(spans, client) {\n function dscHasRequiredProps(dsc2) {\n return !!dsc2.trace_id && !!dsc2.public_key;\n }\n const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n const headers = {\n sent_at: new Date(safeDateNow()).toISOString(),\n ...dscHasRequiredProps(dsc) && { trace: dsc },\n ...!!tunnel && dsn && { dsn: dsnToString(dsn) }\n };\n const { beforeSendSpan, ignoreSpans } = client?.getOptions() || {};\n const filteredSpans = ignoreSpans?.length ? spans.filter((span) => {\n const json = spanToJSON(span);\n return !shouldIgnoreSpan({ description: json.description, op: json.op, attributes: json.data }, ignoreSpans);\n }) : spans;\n const droppedSpans = spans.length - filteredSpans.length;\n if (droppedSpans) {\n client?.recordDroppedEvent(\"before_send\", \"span\", droppedSpans);\n }\n const convertToSpanJSON = beforeSendSpan ? (span) => {\n const spanJson = spanToJSON(span);\n const processedSpan = !isStreamedBeforeSendSpanCallback(beforeSendSpan) ? beforeSendSpan(spanJson) : spanJson;\n if (!processedSpan) {\n showSpanDropWarning();\n return spanJson;\n }\n return processedSpan;\n } : spanToJSON;\n const items = [];\n for (const span of filteredSpans) {\n const spanJson = convertToSpanJSON(span);\n if (spanJson) {\n items.push(createSpanEnvelopeItem(spanJson));\n }\n }\n return createEnvelope(headers, items);\n}\n\nexport { _enhanceEventWithSdkInfo, createEventEnvelope, createSessionEnvelope, createSpanEnvelope };\n//# sourceMappingURL=envelope.js.map\n","function hasSpanStreamingEnabled(client) {\n return client.getOptions().traceLifecycle === \"stream\";\n}\n\nexport { hasSpanStreamingEnabled };\n//# sourceMappingURL=hasSpanStreamingEnabled.js.map\n","import { getGlobalScope } from '../currentScopes.js';\nimport { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext.js';\nimport { merge } from './merge.js';\nimport { spanToTraceContext, getRootSpan, spanToJSON } from './spanUtils.js';\n\nfunction applyScopeDataToEvent(event, data) {\n const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n applyDataToEvent(event, data);\n if (span) {\n applySpanToEvent(event, span);\n }\n applyFingerprintToEvent(event, fingerprint);\n applyBreadcrumbsToEvent(event, breadcrumbs);\n applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\nfunction mergeScopeData(data, mergeData) {\n const {\n extra,\n tags,\n attributes,\n user,\n contexts,\n level,\n sdkProcessingMetadata,\n breadcrumbs,\n fingerprint,\n eventProcessors,\n attachments,\n propagationContext,\n transactionName,\n span\n } = mergeData;\n mergeAndOverwriteScopeData(data, \"extra\", extra);\n mergeAndOverwriteScopeData(data, \"tags\", tags);\n mergeAndOverwriteScopeData(data, \"attributes\", attributes);\n mergeAndOverwriteScopeData(data, \"user\", user);\n mergeAndOverwriteScopeData(data, \"contexts\", contexts);\n data.sdkProcessingMetadata = merge(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);\n if (level) {\n data.level = level;\n }\n if (transactionName) {\n data.transactionName = transactionName;\n }\n if (span) {\n data.span = span;\n }\n if (breadcrumbs.length) {\n data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n }\n if (fingerprint.length) {\n data.fingerprint = [...data.fingerprint, ...fingerprint];\n }\n if (eventProcessors.length) {\n data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n }\n if (attachments.length) {\n data.attachments = [...data.attachments, ...attachments];\n }\n data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\nfunction mergeAndOverwriteScopeData(data, prop, mergeVal) {\n data[prop] = merge(data[prop], mergeVal, 1);\n}\nfunction getCombinedScopeData(isolationScope, currentScope) {\n const scopeData = getGlobalScope().getScopeData();\n isolationScope && mergeScopeData(scopeData, isolationScope.getScopeData());\n currentScope && mergeScopeData(scopeData, currentScope.getScopeData());\n return scopeData;\n}\nfunction applyDataToEvent(event, data) {\n const { extra, tags, user, contexts, level, transactionName } = data;\n if (Object.keys(extra).length) {\n event.extra = { ...extra, ...event.extra };\n }\n if (Object.keys(tags).length) {\n event.tags = { ...tags, ...event.tags };\n }\n if (Object.keys(user).length) {\n event.user = { ...user, ...event.user };\n }\n if (Object.keys(contexts).length) {\n event.contexts = { ...contexts, ...event.contexts };\n }\n if (level) {\n event.level = level;\n }\n if (transactionName && event.type !== \"transaction\") {\n event.transaction = transactionName;\n }\n}\nfunction applyBreadcrumbsToEvent(event, breadcrumbs) {\n const mergedBreadcrumbs = [...event.breadcrumbs || [], ...breadcrumbs];\n event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : void 0;\n}\nfunction applySdkMetadataToEvent(event, sdkProcessingMetadata) {\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...sdkProcessingMetadata\n };\n}\nfunction applySpanToEvent(event, span) {\n event.contexts = {\n trace: spanToTraceContext(span),\n ...event.contexts\n };\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n ...event.sdkProcessingMetadata\n };\n const rootSpan = getRootSpan(span);\n const transactionName = spanToJSON(rootSpan).description;\n if (transactionName && !event.transaction && event.type === \"transaction\") {\n event.transaction = transactionName;\n }\n}\nfunction applyFingerprintToEvent(event, fingerprint) {\n event.fingerprint = event.fingerprint ? Array.isArray(event.fingerprint) ? event.fingerprint : [event.fingerprint] : [];\n if (fingerprint) {\n event.fingerprint = event.fingerprint.concat(fingerprint);\n }\n if (!event.fingerprint.length) {\n delete event.fingerprint;\n }\n}\n\nexport { applyScopeDataToEvent, getCombinedScopeData, mergeAndOverwriteScopeData, mergeScopeData };\n//# sourceMappingURL=scopeData.js.map\n","import { isThenable } from './is.js';\n\nconst STATE_PENDING = 0;\nconst STATE_RESOLVED = 1;\nconst STATE_REJECTED = 2;\nfunction resolvedSyncPromise(value) {\n return new SyncPromise((resolve) => {\n resolve(value);\n });\n}\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\nclass SyncPromise {\n constructor(executor) {\n this._state = STATE_PENDING;\n this._handlers = [];\n this._runExecutor(executor);\n }\n /** @inheritdoc */\n then(onfulfilled, onrejected) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n (result) => {\n if (!onfulfilled) {\n resolve(result);\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n (reason) => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n }\n ]);\n this._executeHandlers();\n });\n }\n /** @inheritdoc */\n catch(onrejected) {\n return this.then((val) => val, onrejected);\n }\n /** @inheritdoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n return this.then(\n (value) => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n (reason) => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n }\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n resolve(val);\n });\n });\n }\n /** Excute the resolve/reject handlers. */\n _executeHandlers() {\n if (this._state === STATE_PENDING) {\n return;\n }\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n cachedHandlers.forEach((handler) => {\n if (handler[0]) {\n return;\n }\n if (this._state === STATE_RESOLVED) {\n handler[1](this._value);\n }\n if (this._state === STATE_REJECTED) {\n handler[2](this._value);\n }\n handler[0] = true;\n });\n }\n /** Run the executor for the SyncPromise. */\n _runExecutor(executor) {\n const setResult = (state, value) => {\n if (this._state !== STATE_PENDING) {\n return;\n }\n if (isThenable(value)) {\n void value.then(resolve, reject);\n return;\n }\n this._state = state;\n this._value = value;\n this._executeHandlers();\n };\n const resolve = (value) => {\n setResult(STATE_RESOLVED, value);\n };\n const reject = (reason) => {\n setResult(STATE_REJECTED, reason);\n };\n try {\n executor(resolve, reject);\n } catch (e) {\n reject(e);\n }\n }\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n//# sourceMappingURL=syncpromise.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { debug } from './utils/debug-logger.js';\nimport { isThenable } from './utils/is.js';\nimport { resolvedSyncPromise, rejectedSyncPromise } from './utils/syncpromise.js';\n\nfunction notifyEventProcessors(processors, event, hint, index = 0) {\n try {\n const result = _notifyEventProcessors(event, hint, processors, index);\n return isThenable(result) ? result : resolvedSyncPromise(result);\n } catch (error) {\n return rejectedSyncPromise(error);\n }\n}\nfunction _notifyEventProcessors(event, hint, processors, index) {\n const processor = processors[index];\n if (!event || !processor) {\n return event;\n }\n const result = processor({ ...event }, hint);\n DEBUG_BUILD && result === null && debug.log(`Event processor \"${processor.id || \"?\"}\" dropped event`);\n if (isThenable(result)) {\n return result.then((final) => _notifyEventProcessors(final, hint, processors, index + 1));\n }\n return _notifyEventProcessors(result, hint, processors, index + 1);\n}\n\nexport { notifyEventProcessors };\n//# sourceMappingURL=eventProcessors.js.map\n","import { normalizeStackTracePath } from './stacktrace.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nlet parsedStackResults;\nlet lastSentryKeysCount;\nlet lastNativeKeysCount;\nlet cachedFilenameDebugIds;\nfunction getFilenameToDebugIdMap(stackParser) {\n const sentryDebugIdMap = GLOBAL_OBJ._sentryDebugIds;\n const nativeDebugIdMap = GLOBAL_OBJ._debugIds;\n if (!sentryDebugIdMap && !nativeDebugIdMap) {\n return {};\n }\n const sentryDebugIdKeys = sentryDebugIdMap ? Object.keys(sentryDebugIdMap) : [];\n const nativeDebugIdKeys = nativeDebugIdMap ? Object.keys(nativeDebugIdMap) : [];\n if (cachedFilenameDebugIds && sentryDebugIdKeys.length === lastSentryKeysCount && nativeDebugIdKeys.length === lastNativeKeysCount) {\n return cachedFilenameDebugIds;\n }\n lastSentryKeysCount = sentryDebugIdKeys.length;\n lastNativeKeysCount = nativeDebugIdKeys.length;\n cachedFilenameDebugIds = {};\n if (!parsedStackResults) {\n parsedStackResults = {};\n }\n const processDebugIds = (debugIdKeys, debugIdMap) => {\n for (const key of debugIdKeys) {\n const debugId = debugIdMap[key];\n const result = parsedStackResults?.[key];\n if (result && cachedFilenameDebugIds && debugId) {\n cachedFilenameDebugIds[result[0]] = debugId;\n if (parsedStackResults) {\n parsedStackResults[key] = [result[0], debugId];\n }\n } else if (debugId) {\n const parsedStack = stackParser(key);\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n const filename = stackFrame?.filename;\n if (filename && cachedFilenameDebugIds && parsedStackResults) {\n cachedFilenameDebugIds[filename] = debugId;\n parsedStackResults[key] = [filename, debugId];\n break;\n }\n }\n }\n }\n };\n if (sentryDebugIdMap) {\n processDebugIds(sentryDebugIdKeys, sentryDebugIdMap);\n }\n if (nativeDebugIdMap) {\n processDebugIds(nativeDebugIdKeys, nativeDebugIdMap);\n }\n return cachedFilenameDebugIds;\n}\nfunction getDebugImagesForResources(stackParser, resource_paths) {\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n if (!filenameDebugIdMap) {\n return [];\n }\n const images = [];\n for (const path of resource_paths) {\n const normalizedPath = normalizeStackTracePath(path);\n if (normalizedPath && filenameDebugIdMap[normalizedPath]) {\n images.push({\n type: \"sourcemap\",\n code_file: path,\n debug_id: filenameDebugIdMap[normalizedPath]\n });\n }\n }\n return images;\n}\n\nexport { getDebugImagesForResources, getFilenameToDebugIdMap };\n//# sourceMappingURL=debug-ids.js.map\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { notifyEventProcessors } from '../eventProcessors.js';\nimport { Scope } from '../scope.js';\nimport { getFilenameToDebugIdMap } from './debug-ids.js';\nimport { uuid4, addExceptionMechanism } from './misc.js';\nimport { normalize } from './normalize.js';\nimport { getCombinedScopeData, applyScopeDataToEvent } from './scopeData.js';\nimport { truncate } from './string.js';\nimport { resolvedSyncPromise } from './syncpromise.js';\nimport { dateTimestampInSeconds } from './time.js';\n\nfunction prepareEvent(options, event, hint, scope, client, isolationScope) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1e3 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds()\n };\n const integrations = hint.integrations || options.integrations.map((i) => i.name);\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n if (client) {\n client.emit(\"applyFrameMetadata\", event);\n }\n if (event.type === void 0) {\n applyDebugIds(prepared, options.stackParser);\n }\n const finalScope = getFinalScope(scope, hint.captureContext);\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n const clientEventProcessors = client ? client.getEventProcessors() : [];\n const data = getCombinedScopeData(isolationScope, finalScope);\n const attachments = [...hint.attachments || [], ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n applyScopeDataToEvent(prepared, data);\n const eventProcessors = [\n ...clientEventProcessors,\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors\n ];\n const isInternalException = hint.data && hint.data.__sentry__ === true;\n const result = isInternalException ? resolvedSyncPromise(prepared) : notifyEventProcessors(eventProcessors, prepared, hint);\n return result.then((evt) => {\n if (evt) {\n applyDebugMeta(evt);\n }\n if (typeof normalizeDepth === \"number\" && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength } = options;\n event.environment = event.environment || environment || DEFAULT_ENVIRONMENT;\n if (!event.release && release) {\n event.release = release;\n }\n if (!event.dist && dist) {\n event.dist = dist;\n }\n const request = event.request;\n if (request?.url && maxValueLength) {\n request.url = truncate(request.url, maxValueLength);\n }\n if (maxValueLength) {\n event.exception?.values?.forEach((exception) => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n });\n }\n}\nfunction applyDebugIds(event, stackParser) {\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n event.exception?.values?.forEach((exception) => {\n exception.stacktrace?.frames?.forEach((frame) => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n}\nfunction applyDebugMeta(event) {\n const filenameDebugIdMap = {};\n event.exception?.values?.forEach((exception) => {\n exception.stacktrace?.frames?.forEach((frame) => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {\n images.push({\n type: \"sourcemap\",\n code_file: filename,\n debug_id\n });\n });\n}\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...event.sdk.integrations || [], ...integrationNames];\n }\n}\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n const normalized = {\n ...event,\n ...event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map((b) => ({\n ...b,\n ...b.data && {\n data: normalize(b.data, depth, maxBreadth)\n }\n }))\n },\n ...event.user && {\n user: normalize(event.user, depth, maxBreadth)\n },\n ...event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth)\n },\n ...event.extra && {\n extra: normalize(event.extra, depth, maxBreadth)\n }\n };\n if (event.contexts?.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n if (event.spans) {\n normalized.spans = event.spans.map((span) => {\n return {\n ...span,\n ...span.data && {\n data: normalize(span.data, depth, maxBreadth)\n }\n };\n });\n }\n if (event.contexts?.flags && normalized.contexts) {\n normalized.contexts.flags = normalize(event.contexts.flags, 3, maxBreadth);\n }\n return normalized;\n}\nfunction getFinalScope(scope, captureContext) {\n if (!captureContext) {\n return scope;\n }\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\nfunction parseEventHintOrCaptureContext(hint) {\n if (!hint) {\n return void 0;\n }\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint\n };\n }\n return hint;\n}\nfunction hintIsScopeOrFunction(hint) {\n return hint instanceof Scope || typeof hint === \"function\";\n}\nconst captureContextKeys = [\n \"user\",\n \"level\",\n \"extra\",\n \"contexts\",\n \"tags\",\n \"fingerprint\",\n \"propagationContext\"\n];\nfunction hintIsScopeContext(hint) {\n return Object.keys(hint).some((key) => captureContextKeys.includes(key));\n}\n\nexport { applyClientOptions, applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n","function safeUnref(timer) {\n if (typeof timer === \"object\" && typeof timer.unref === \"function\") {\n timer.unref();\n }\n return timer;\n}\n\nexport { safeUnref };\n//# sourceMappingURL=timer.js.map\n","import { makeDsn, dsnToString } from './utils/dsn.js';\n\nconst SENTRY_API_VERSION = \"7\";\nfunction getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : \"\";\n const port = dsn.port ? `:${dsn.port}` : \"\";\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : \"\"}/api/`;\n}\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\nfunction _encodedAuth(dsn, sdkInfo) {\n const params = {\n sentry_version: SENTRY_API_VERSION\n };\n if (dsn.publicKey) {\n params.sentry_key = dsn.publicKey;\n }\n if (sdkInfo) {\n params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n }\n return new URLSearchParams(params).toString();\n}\nfunction getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) {\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\nfunction getReportDialogEndpoint(dsnLike, dialogOptions) {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return \"\";\n }\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === \"dsn\") {\n continue;\n }\n if (key === \"onClose\") {\n continue;\n }\n if (key === \"user\") {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`;\n }\n }\n return `${endpoint}?${encodedOptions}`;\n}\n\nexport { SENTRY_API_VERSION, getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };\n//# sourceMappingURL=api.js.map\n","import { getClient } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { debug } from './utils/debug-logger.js';\n\nconst installedIntegrations = [];\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n integrations.forEach((currentInstance) => {\n const { name } = currentInstance;\n const existingInstance = integrationsByName[name];\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n integrationsByName[name] = currentInstance;\n });\n return Object.values(integrationsByName);\n}\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n defaultIntegrations.forEach((integration) => {\n integration.isDefaultInstance = true;\n });\n let integrations;\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === \"function\") {\n const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\n } else {\n integrations = defaultIntegrations;\n }\n return filterDuplicates(integrations);\n}\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n integrations.forEach((integration) => {\n if (integration?.beforeSetup) {\n integration.beforeSetup(client);\n }\n });\n integrations.forEach((integration) => {\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n return integrationIndex;\n}\nfunction afterSetupIntegrations(client, integrations) {\n for (const integration of integrations) {\n if (integration?.afterAllSetup) {\n integration.afterAllSetup(client);\n }\n }\n}\nfunction setupIntegration(client, integration, integrationIndex) {\n if (integrationIndex[integration.name]) {\n DEBUG_BUILD && debug.log(`Integration skipped because it was already installed: ${integration.name}`);\n return;\n }\n integrationIndex[integration.name] = integration;\n if (!installedIntegrations.includes(integration.name) && typeof integration.setupOnce === \"function\") {\n integration.setupOnce();\n installedIntegrations.push(integration.name);\n }\n if (integration.setup && typeof integration.setup === \"function\") {\n integration.setup(client);\n }\n if (typeof integration.preprocessEvent === \"function\") {\n const callback = integration.preprocessEvent.bind(integration);\n client.on(\"preprocessEvent\", (event, hint) => callback(event, hint, client));\n }\n if (typeof integration.processEvent === \"function\") {\n const callback = integration.processEvent.bind(integration);\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name\n });\n client.addEventProcessor(processor);\n }\n [\"processSpan\", \"processSegmentSpan\"].forEach((hook) => {\n const callback = integration[hook];\n if (typeof callback === \"function\") {\n client.on(hook, (span) => callback.call(integration, span, client));\n }\n });\n DEBUG_BUILD && debug.log(`Integration installed: ${integration.name}`);\n}\nfunction addIntegration(integration) {\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && debug.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n client.addIntegration(integration);\n}\nfunction defineIntegration(fn) {\n return fn;\n}\nfunction extendIntegration(integration, extendedIntegration) {\n const wrappedIntegration = {\n ...integration,\n ...extendedIntegration\n };\n for (const key in extendedIntegration) {\n const baseValue = integration[key];\n const extendedValue = extendedIntegration[key];\n if (typeof baseValue === \"function\" && typeof extendedValue === \"function\") {\n const wrappedFunction = new Proxy(baseValue, {\n apply: (target, thisArg, args) => {\n Reflect.apply(target, thisArg, args);\n return Reflect.apply(extendedValue, thisArg, args);\n }\n });\n wrappedIntegration[key] = wrappedFunction;\n }\n }\n return wrappedIntegration;\n}\n\nexport { addIntegration, afterSetupIntegrations, defineIntegration, extendIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n//# sourceMappingURL=integration.js.map\n","function isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== \"undefined\" && !!__SENTRY_BROWSER_BUNDLE__;\n}\nfunction getSDKSource() {\n /*! __SENTRY_SDK_SOURCE__ */\n return \"npm\";\n}\n\nexport { getSDKSource, isBrowserBundle };\n//# sourceMappingURL=env.js.map\n","import { isBrowserBundle } from './env.js';\n\nfunction isNodeEnv() {\n return !isBrowserBundle() && Object.prototype.toString.call(typeof process !== \"undefined\" ? process : 0) === \"[object process]\";\n}\nfunction dynamicRequire(mod, request) {\n return mod.require(request);\n}\nfunction loadModule(moduleName, existingModule = module) {\n let mod;\n try {\n mod = dynamicRequire(existingModule, moduleName);\n } catch {\n }\n if (!mod) {\n try {\n const { cwd } = dynamicRequire(existingModule, \"process\");\n mod = dynamicRequire(existingModule, `${cwd()}/node_modules/${moduleName}`);\n } catch {\n }\n }\n return mod;\n}\n\nexport { isNodeEnv, loadModule };\n//# sourceMappingURL=node.js.map\n","import { isNodeEnv } from './node.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nfunction isBrowser() {\n return typeof window !== \"undefined\" && (!isNodeEnv() || isElectronNodeRenderer());\n}\nfunction isElectronNodeRenderer() {\n const process = GLOBAL_OBJ.process;\n return process?.type === \"renderer\";\n}\n\nexport { isBrowser };\n//# sourceMappingURL=isBrowser.js.map\n","import { dsnToString } from '../utils/dsn.js';\nimport { createEnvelope } from '../utils/envelope.js';\nimport { isBrowser } from '../utils/isBrowser.js';\n\nfunction createLogContainerEnvelopeItem(items, inferUserData) {\n const inferSetting = inferUserData ? \"auto\" : \"never\";\n return [\n {\n type: \"log\",\n item_count: items.length,\n content_type: \"application/vnd.sentry.items.log+json\"\n },\n {\n version: 2,\n ...isBrowser() && {\n ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting }\n },\n items\n }\n ];\n}\nfunction createLogEnvelope(logs, metadata, tunnel, dsn, inferUserData) {\n const headers = {};\n if (metadata?.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version\n };\n }\n if (!!tunnel && !!dsn) {\n headers.dsn = dsnToString(dsn);\n }\n return createEnvelope(headers, [createLogContainerEnvelopeItem(logs, inferUserData)]);\n}\n\nexport { createLogContainerEnvelopeItem, createLogEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { serializeAttributes } from '../attributes.js';\nimport { getGlobalSingleton } from '../carrier.js';\nimport { getClient, getIsolationScope, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { debug, consoleSandbox } from '../utils/debug-logger.js';\nimport { isParameterizedString } from '../utils/is.js';\nimport { getCombinedScopeData } from '../utils/scopeData.js';\nimport { _getSpanForScope } from '../utils/spanOnScope.js';\nimport { timestampInSeconds } from '../utils/time.js';\nimport { getSequenceAttribute } from '../utils/timestampSequence.js';\nimport { _getTraceInfoFromScope } from '../utils/trace-info.js';\nimport { SEVERITY_TEXT_TO_SEVERITY_NUMBER } from './constants.js';\nimport { createLogEnvelope } from './envelope.js';\n\nconst MAX_LOG_BUFFER_SIZE = 100;\nfunction setLogAttribute(logAttributes, key, value, setEvenIfPresent = true) {\n if (value && (!logAttributes[key] || setEvenIfPresent)) {\n logAttributes[key] = value;\n }\n}\nfunction _INTERNAL_captureSerializedLog(client, serializedLog) {\n const bufferMap = _getBufferMap();\n const logBuffer = _INTERNAL_getLogBuffer(client);\n if (logBuffer === void 0) {\n bufferMap.set(client, [serializedLog]);\n } else {\n if (logBuffer.length >= MAX_LOG_BUFFER_SIZE) {\n _INTERNAL_flushLogsBuffer(client, logBuffer);\n bufferMap.set(client, [serializedLog]);\n } else {\n bufferMap.set(client, [...logBuffer, serializedLog]);\n }\n }\n}\nfunction _INTERNAL_captureLog(beforeLog, currentScope = getCurrentScope(), captureSerializedLog = _INTERNAL_captureSerializedLog) {\n const client = currentScope?.getClient() ?? getClient();\n if (!client) {\n DEBUG_BUILD && debug.warn(\"No client available to capture log.\");\n return;\n }\n const { release, environment, enableLogs = false, beforeSendLog } = client.getOptions();\n if (!enableLogs) {\n DEBUG_BUILD && debug.warn(\"logging option not enabled, log will not be captured.\");\n return;\n }\n const [, traceContext] = _getTraceInfoFromScope(client, currentScope);\n const processedLogAttributes = {\n ...beforeLog.attributes\n };\n const {\n user: { id, email, username },\n attributes: scopeAttributes = {}\n } = getCombinedScopeData(getIsolationScope(), currentScope);\n setLogAttribute(processedLogAttributes, \"user.id\", id, false);\n setLogAttribute(processedLogAttributes, \"user.email\", email, false);\n setLogAttribute(processedLogAttributes, \"user.name\", username, false);\n setLogAttribute(processedLogAttributes, \"sentry.release\", release);\n setLogAttribute(processedLogAttributes, \"sentry.environment\", environment);\n const { name, version } = client.getSdkMetadata()?.sdk ?? {};\n setLogAttribute(processedLogAttributes, \"sentry.sdk.name\", name);\n setLogAttribute(processedLogAttributes, \"sentry.sdk.version\", version);\n const replay = client.getIntegrationByName(\"Replay\");\n const replayId = replay?.getReplayId(true);\n setLogAttribute(processedLogAttributes, \"sentry.replay_id\", replayId);\n if (replayId && replay?.getRecordingMode() === \"buffer\") {\n setLogAttribute(processedLogAttributes, \"sentry._internal.replay_is_buffering\", true);\n }\n const beforeLogMessage = beforeLog.message;\n if (isParameterizedString(beforeLogMessage)) {\n const { __sentry_template_string__, __sentry_template_values__ = [] } = beforeLogMessage;\n if (__sentry_template_values__?.length) {\n processedLogAttributes[\"sentry.message.template\"] = __sentry_template_string__;\n }\n __sentry_template_values__.forEach((param, index) => {\n processedLogAttributes[`sentry.message.parameter.${index}`] = param;\n });\n }\n const span = _getSpanForScope(currentScope);\n setLogAttribute(processedLogAttributes, \"sentry.trace.parent_span_id\", span?.spanContext().spanId);\n const processedLog = { ...beforeLog, attributes: processedLogAttributes };\n client.emit(\"beforeCaptureLog\", processedLog);\n const log = beforeSendLog ? consoleSandbox(() => beforeSendLog(processedLog)) : processedLog;\n if (!log) {\n client.recordDroppedEvent(\"before_send\", \"log_item\", 1);\n DEBUG_BUILD && debug.warn(\"beforeSendLog returned null, log will not be captured.\");\n return;\n }\n const { level, message, attributes: logAttributes = {}, severityNumber } = log;\n const timestamp = timestampInSeconds();\n const sequenceAttr = getSequenceAttribute(timestamp);\n const serializedLog = {\n timestamp,\n level,\n body: _removeLoneSurrogates(String(message)),\n trace_id: traceContext?.trace_id,\n severity_number: severityNumber ?? SEVERITY_TEXT_TO_SEVERITY_NUMBER[level],\n attributes: sanitizeLogAttributes({\n ...serializeAttributes(scopeAttributes),\n ...serializeAttributes(logAttributes, true),\n [sequenceAttr.key]: sequenceAttr.value\n })\n };\n captureSerializedLog(client, serializedLog);\n client.emit(\"afterCaptureLog\", log);\n}\nfunction _INTERNAL_flushLogsBuffer(client, maybeLogBuffer) {\n const logBuffer = maybeLogBuffer ?? _INTERNAL_getLogBuffer(client) ?? [];\n if (logBuffer.length === 0) {\n return;\n }\n const clientOptions = client.getOptions();\n const envelope = createLogEnvelope(\n logBuffer,\n clientOptions._metadata,\n clientOptions.tunnel,\n client.getDsn(),\n client.getDataCollectionOptions().userInfo\n );\n _getBufferMap().set(client, []);\n client.emit(\"flushLogs\");\n client.sendEnvelope(envelope);\n}\nfunction _INTERNAL_getLogBuffer(client) {\n return _getBufferMap().get(client);\n}\nfunction _getBufferMap() {\n return getGlobalSingleton(\"clientToLogBufferMap\", () => /* @__PURE__ */ new WeakMap());\n}\nfunction sanitizeLogAttributes(attributes) {\n const sanitized = {};\n for (const [key, attr] of Object.entries(attributes)) {\n const sanitizedKey = _removeLoneSurrogates(key);\n if (attr.type === \"string\") {\n sanitized[sanitizedKey] = { ...attr, value: _removeLoneSurrogates(attr.value) };\n } else {\n sanitized[sanitizedKey] = attr;\n }\n }\n return sanitized;\n}\nfunction _removeLoneSurrogates(str) {\n const strObj = Object(str);\n const isWellFormed = strObj[\"isWellFormed\"];\n const toWellFormed = strObj[\"toWellFormed\"];\n if (typeof isWellFormed === \"function\" && typeof toWellFormed === \"function\") {\n return isWellFormed.call(str) ? str : toWellFormed.call(str);\n }\n return str;\n}\n\nexport { _INTERNAL_captureLog, _INTERNAL_captureSerializedLog, _INTERNAL_flushLogsBuffer, _INTERNAL_getLogBuffer, _removeLoneSurrogates };\n//# sourceMappingURL=internal.js.map\n","import { dsnToString } from '../utils/dsn.js';\nimport { createEnvelope } from '../utils/envelope.js';\nimport { isBrowser } from '../utils/isBrowser.js';\n\nfunction createMetricContainerEnvelopeItem(items, inferUserData) {\n const inferSetting = inferUserData ? \"auto\" : \"never\";\n return [\n {\n type: \"trace_metric\",\n item_count: items.length,\n content_type: \"application/vnd.sentry.items.trace-metric+json\"\n },\n {\n version: 2,\n ...isBrowser() && {\n ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting }\n },\n items\n }\n ];\n}\nfunction createMetricEnvelope(metrics, metadata, tunnel, dsn, inferUserData) {\n const headers = {};\n if (metadata?.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version\n };\n }\n if (!!tunnel && !!dsn) {\n headers.dsn = dsnToString(dsn);\n }\n return createEnvelope(headers, [createMetricContainerEnvelopeItem(metrics, inferUserData)]);\n}\n\nexport { createMetricContainerEnvelopeItem, createMetricEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { serializeAttributes } from '../attributes.js';\nimport { getGlobalSingleton } from '../carrier.js';\nimport { getCurrentScope, getClient, getIsolationScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from '../utils/debug-logger.js';\nimport { getCombinedScopeData } from '../utils/scopeData.js';\nimport { _getSpanForScope } from '../utils/spanOnScope.js';\nimport { timestampInSeconds } from '../utils/time.js';\nimport { getSequenceAttribute } from '../utils/timestampSequence.js';\nimport { _getTraceInfoFromScope } from '../utils/trace-info.js';\nimport { createMetricEnvelope } from './envelope.js';\n\nconst MAX_METRIC_BUFFER_SIZE = 1e3;\nfunction setMetricAttribute(metricAttributes, key, value, setEvenIfPresent = true) {\n if (value && (setEvenIfPresent || !(key in metricAttributes))) {\n metricAttributes[key] = value;\n }\n}\nfunction _INTERNAL_captureSerializedMetric(client, serializedMetric) {\n const bufferMap = _getBufferMap();\n const metricBuffer = _INTERNAL_getMetricBuffer(client);\n if (metricBuffer === void 0) {\n bufferMap.set(client, [serializedMetric]);\n } else {\n if (metricBuffer.length >= MAX_METRIC_BUFFER_SIZE) {\n _INTERNAL_flushMetricsBuffer(client, metricBuffer);\n bufferMap.set(client, [serializedMetric]);\n } else {\n bufferMap.set(client, [...metricBuffer, serializedMetric]);\n }\n }\n}\nfunction _enrichMetricAttributes(beforeMetric, client, user) {\n const { release, environment } = client.getOptions();\n const processedMetricAttributes = {\n ...beforeMetric.attributes\n };\n setMetricAttribute(processedMetricAttributes, \"user.id\", user.id, false);\n setMetricAttribute(processedMetricAttributes, \"user.email\", user.email, false);\n setMetricAttribute(processedMetricAttributes, \"user.name\", user.username, false);\n setMetricAttribute(processedMetricAttributes, \"sentry.release\", release);\n setMetricAttribute(processedMetricAttributes, \"sentry.environment\", environment);\n const { name, version } = client.getSdkMetadata()?.sdk ?? {};\n setMetricAttribute(processedMetricAttributes, \"sentry.sdk.name\", name);\n setMetricAttribute(processedMetricAttributes, \"sentry.sdk.version\", version);\n const replay = client.getIntegrationByName(\"Replay\");\n const replayId = replay?.getReplayId(true);\n setMetricAttribute(processedMetricAttributes, \"sentry.replay_id\", replayId);\n if (replayId && replay?.getRecordingMode() === \"buffer\") {\n setMetricAttribute(processedMetricAttributes, \"sentry._internal.replay_is_buffering\", true);\n }\n return {\n ...beforeMetric,\n attributes: processedMetricAttributes\n };\n}\nfunction _buildSerializedMetric(metric, client, currentScope, scopeAttributes) {\n const [, traceContext] = _getTraceInfoFromScope(client, currentScope);\n const span = _getSpanForScope(currentScope);\n const traceId = span ? span.spanContext().traceId : traceContext?.trace_id;\n const spanId = span ? span.spanContext().spanId : void 0;\n const timestamp = timestampInSeconds();\n const sequenceAttr = getSequenceAttribute(timestamp);\n return {\n timestamp,\n trace_id: traceId ?? \"\",\n span_id: spanId,\n name: metric.name,\n type: metric.type,\n unit: metric.unit,\n value: metric.value,\n attributes: {\n ...serializeAttributes(scopeAttributes),\n ...serializeAttributes(metric.attributes, \"skip-undefined\"),\n [sequenceAttr.key]: sequenceAttr.value\n }\n };\n}\nfunction _INTERNAL_captureMetric(beforeMetric, options) {\n const currentScope = options?.scope ?? getCurrentScope();\n const captureSerializedMetric = options?.captureSerializedMetric ?? _INTERNAL_captureSerializedMetric;\n const client = currentScope?.getClient() ?? getClient();\n if (!client) {\n DEBUG_BUILD && debug.warn(\"No client available to capture metric.\");\n return;\n }\n const { _experiments, enableMetrics, beforeSendMetric } = client.getOptions();\n const metricsEnabled = enableMetrics ?? _experiments?.enableMetrics ?? true;\n if (!metricsEnabled) {\n DEBUG_BUILD && debug.warn(\"metrics option not enabled, metric will not be captured.\");\n return;\n }\n const { user, attributes: scopeAttributes } = getCombinedScopeData(getIsolationScope(), currentScope);\n const enrichedMetric = _enrichMetricAttributes(beforeMetric, client, user);\n client.emit(\"processMetric\", enrichedMetric);\n const beforeSendCallback = beforeSendMetric || _experiments?.beforeSendMetric;\n const processedMetric = beforeSendCallback ? beforeSendCallback(enrichedMetric) : enrichedMetric;\n if (!processedMetric) {\n DEBUG_BUILD && debug.log(\"`beforeSendMetric` returned `null`, will not send metric.\");\n return;\n }\n const serializedMetric = _buildSerializedMetric(processedMetric, client, currentScope, scopeAttributes);\n DEBUG_BUILD && debug.log(\"[Metric]\", serializedMetric);\n captureSerializedMetric(client, serializedMetric);\n client.emit(\"afterCaptureMetric\", processedMetric);\n}\nfunction _INTERNAL_flushMetricsBuffer(client, maybeMetricBuffer) {\n const metricBuffer = maybeMetricBuffer ?? _INTERNAL_getMetricBuffer(client) ?? [];\n if (metricBuffer.length === 0) {\n return;\n }\n const clientOptions = client.getOptions();\n const envelope = createMetricEnvelope(\n metricBuffer,\n clientOptions._metadata,\n clientOptions.tunnel,\n client.getDsn(),\n client.getDataCollectionOptions().userInfo\n );\n _getBufferMap().set(client, []);\n client.emit(\"flushMetrics\");\n client.sendEnvelope(envelope);\n}\nfunction _INTERNAL_getMetricBuffer(client) {\n return _getBufferMap().get(client);\n}\nfunction _getBufferMap() {\n return getGlobalSingleton(\"clientToMetricBufferMap\", () => /* @__PURE__ */ new WeakMap());\n}\n\nexport { _INTERNAL_captureMetric, _INTERNAL_captureSerializedMetric, _INTERNAL_flushMetricsBuffer, _INTERNAL_getMetricBuffer };\n//# sourceMappingURL=internal.js.map\n","import { streamedSpanJsonToSerializedSpan } from '../../utils/spanUtils.js';\n\nfunction spanJsonToSerializedStreamedSpan(span) {\n const streamedSpan = {\n trace_id: span.trace_id,\n span_id: span.span_id,\n parent_span_id: span.parent_span_id,\n name: span.description || \"\",\n start_timestamp: span.start_timestamp,\n end_timestamp: span.timestamp || span.start_timestamp,\n status: !span.status || span.status === \"ok\" || span.status === \"cancelled\" ? \"ok\" : \"error\",\n is_segment: false,\n attributes: { ...span.data },\n links: span.links\n };\n return streamedSpanJsonToSerializedSpan(streamedSpan);\n}\n\nexport { spanJsonToSerializedStreamedSpan };\n//# sourceMappingURL=spanJsonToStreamedSpan.js.map\n","import { isBrowser } from '../../utils/isBrowser.js';\nimport { hasSpanStreamingEnabled } from './hasSpanStreamingEnabled.js';\nimport { spanJsonToSerializedStreamedSpan } from './spanJsonToStreamedSpan.js';\n\nfunction extractGenAiSpansFromEvent(event, client) {\n if (event.type !== \"transaction\" || !event.spans?.length || !event.sdkProcessingMetadata?.hasGenAiSpans || client.getOptions().streamGenAiSpans === false || hasSpanStreamingEnabled(client)) {\n return void 0;\n }\n const genAiSpans = [];\n const remainingSpans = [];\n for (const span of event.spans) {\n if (span.op?.startsWith(\"gen_ai.\")) {\n genAiSpans.push(spanJsonToSerializedStreamedSpan(span));\n } else {\n remainingSpans.push(span);\n }\n }\n if (genAiSpans.length === 0) {\n return void 0;\n }\n event.spans = remainingSpans;\n const inferSetting = client.getDataCollectionOptions().userInfo ? \"auto\" : \"never\";\n return [\n { type: \"span\", item_count: genAiSpans.length, content_type: \"application/vnd.sentry.items.span.v2+json\" },\n {\n version: 2,\n ...isBrowser() && {\n ingest_settings: { infer_ip: inferSetting, infer_user_agent: inferSetting }\n },\n items: genAiSpans\n }\n ];\n}\n\nexport { extractGenAiSpansFromEvent };\n//# sourceMappingURL=extractGenAiSpans.js.map\n","import { resolvedSyncPromise, rejectedSyncPromise } from './syncpromise.js';\nimport { safeUnref } from './timer.js';\n\nconst SENTRY_BUFFER_FULL_ERROR = /* @__PURE__ */ Symbol.for(\"SentryBufferFullError\");\nfunction makePromiseBuffer(limit = 100) {\n const buffer = /* @__PURE__ */ new Set();\n function isReady() {\n return buffer.size < limit;\n }\n function remove(task) {\n buffer.delete(task);\n }\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(SENTRY_BUFFER_FULL_ERROR);\n }\n const task = taskProducer();\n buffer.add(task);\n void task.then(\n () => remove(task),\n () => remove(task)\n );\n return task;\n }\n function drain(timeout) {\n if (!buffer.size) {\n return resolvedSyncPromise(true);\n }\n const drainPromise = Promise.allSettled(Array.from(buffer)).then(() => true);\n if (!timeout) {\n return drainPromise;\n }\n const promises = [\n drainPromise,\n new Promise((resolve) => safeUnref(setTimeout(() => resolve(false), timeout)))\n ];\n return Promise.race(promises);\n }\n return {\n get $() {\n return Array.from(buffer);\n },\n add,\n drain\n };\n}\n\nexport { SENTRY_BUFFER_FULL_ERROR, makePromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map\n","import { safeDateNow } from './randomSafeContext.js';\n\nconst DEFAULT_RETRY_AFTER = 60 * 1e3;\nfunction parseRetryAfterHeader(header, now = safeDateNow()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1e3;\n }\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n return DEFAULT_RETRY_AFTER;\n}\nfunction disabledUntil(limits, dataCategory) {\n return limits[dataCategory] || limits.all || 0;\n}\nfunction isRateLimited(limits, dataCategory, now = safeDateNow()) {\n return disabledUntil(limits, dataCategory) > now;\n}\nfunction updateRateLimits(limits, { statusCode, headers }, now = safeDateNow()) {\n const updatedRateLimits = {\n ...limits\n };\n const rateLimitHeader = headers?.[\"x-sentry-rate-limits\"];\n const retryAfterHeader = headers?.[\"retry-after\"];\n if (rateLimitHeader) {\n for (const limit of rateLimitHeader.trim().split(\",\")) {\n const [retryAfter, categories, , , namespaces] = limit.split(\":\", 5);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1e3;\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(\";\")) {\n if (category === \"metric_bucket\") {\n if (!namespaces || namespaces.split(\";\").includes(\"custom\")) {\n updatedRateLimits[category] = now + delay;\n }\n } else {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1e3;\n }\n return updatedRateLimits;\n}\n\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n//# sourceMappingURL=ratelimit.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from '../utils/debug-logger.js';\nimport { forEachEnvelopeItem, envelopeItemTypeToDataCategory, createEnvelope, serializeEnvelope, envelopeContainsItemType } from '../utils/envelope.js';\nimport { makePromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from '../utils/promisebuffer.js';\nimport { isRateLimited, updateRateLimits } from '../utils/ratelimit.js';\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\nfunction createTransport(options, makeRequest, buffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE\n)) {\n let rateLimits = {};\n const flush = (timeout) => buffer.drain(timeout);\n function send(envelope) {\n const filteredEnvelopeItems = [];\n forEachEnvelopeItem(envelope, (item, type) => {\n const dataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, dataCategory)) {\n options.recordDroppedEvent(\"ratelimit_backoff\", dataCategory);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n if (filteredEnvelopeItems.length === 0) {\n return Promise.resolve({});\n }\n const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems);\n const recordEnvelopeLoss = (reason) => {\n if (envelopeContainsItemType(filteredEnvelope, [\"client_report\"])) {\n DEBUG_BUILD && debug.warn(`Dropping client report. Will not send outcomes (reason: ${reason}).`);\n return;\n }\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type));\n });\n };\n const requestTask = () => makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then(\n (response) => {\n if (response.statusCode === 413) {\n DEBUG_BUILD && debug.error(\n \"Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.\"\n );\n recordEnvelopeLoss(\"send_error\");\n return response;\n }\n if (DEBUG_BUILD && response.statusCode !== void 0 && (response.statusCode < 200 || response.statusCode >= 300)) {\n debug.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n (error) => {\n recordEnvelopeLoss(\"network_error\");\n DEBUG_BUILD && debug.error(\"Encountered error running transport request:\", error);\n throw error;\n }\n );\n return buffer.add(requestTask).then(\n (result) => result,\n (error) => {\n if (error === SENTRY_BUFFER_FULL_ERROR) {\n DEBUG_BUILD && debug.error(\"Skipped sending event because buffer is full.\");\n recordEnvelopeLoss(\"queue_overflow\");\n return Promise.resolve({});\n } else {\n throw error;\n }\n }\n );\n }\n return {\n send,\n flush\n };\n}\n\nexport { DEFAULT_TRANSPORT_BUFFER_SIZE, createTransport };\n//# sourceMappingURL=base.js.map\n","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\n\nfunction createClientReportEnvelope(discarded_events, dsn, timestamp) {\n const clientReportItem = [\n { type: \"client_report\" },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events\n }\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n\nexport { createClientReportEnvelope };\n//# sourceMappingURL=clientreport.js.map\n","function getPossibleEventMessages(event) {\n const possibleMessages = [];\n if (event.message) {\n possibleMessages.push(event.message);\n }\n try {\n const lastException = event.exception.values[event.exception.values.length - 1];\n if (lastException?.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n } catch {\n }\n return possibleMessages;\n}\n\nexport { getPossibleEventMessages };\n//# sourceMappingURL=eventUtils.js.map\n","import { SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_PROFILE_ID } from '../semanticAttributes.js';\n\nfunction convertTransactionEventToSpanJson(event) {\n const { trace_id, parent_span_id, span_id, status, origin, data, op } = event.contexts?.trace ?? {};\n return {\n data: data ?? {},\n description: event.transaction,\n op,\n parent_span_id,\n span_id: span_id ?? \"\",\n start_timestamp: event.start_timestamp ?? 0,\n status,\n timestamp: event.timestamp,\n trace_id: trace_id ?? \"\",\n origin,\n profile_id: data?.[SEMANTIC_ATTRIBUTE_PROFILE_ID],\n exclusive_time: data?.[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME],\n measurements: event.measurements,\n is_segment: true\n };\n}\nfunction convertSpanJsonToTransactionEvent(span) {\n return {\n type: \"transaction\",\n timestamp: span.timestamp,\n start_timestamp: span.start_timestamp,\n transaction: span.description,\n contexts: {\n trace: {\n trace_id: span.trace_id,\n span_id: span.span_id,\n parent_span_id: span.parent_span_id,\n op: span.op,\n status: span.status,\n origin: span.origin,\n data: {\n ...span.data,\n ...span.profile_id && { [SEMANTIC_ATTRIBUTE_PROFILE_ID]: span.profile_id },\n ...span.exclusive_time && { [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: span.exclusive_time }\n }\n }\n },\n measurements: span.measurements\n };\n}\n\nexport { convertSpanJsonToTransactionEvent, convertTransactionEventToSpanJson };\n//# sourceMappingURL=transactionEvent.js.map\n","const FILTERED_VALUE = \"[Filtered]\";\nconst PII_HEADER_SNIPPETS = [\"forwarded\", \"-ip\", \"remote-\", \"via\", \"-user\"];\nconst SENSITIVE_KEY_SNIPPETS = [\n \"auth\",\n \"token\",\n \"secret\",\n \"session\",\n // for the user_session cookie\n \"password\",\n \"passwd\",\n \"pwd\",\n \"key\",\n \"jwt\",\n \"bearer\",\n \"sso\",\n \"saml\",\n \"csrf\",\n \"xsrf\",\n \"credentials\",\n \"sid\",\n \"identity\",\n // Always treat cookie headers as sensitive in case individual key-value cookie pairs cannot properly be extracted\n \"set-cookie\",\n \"cookie\"\n];\nconst SENSITIVE_COOKIE_NAME_SNIPPETS = [\n // Express / Connect default session cookie\n \".sid\",\n // Opaque session ids (PHPSESSID, ASPSESSIONID*, BIGipServer*, *sessid*, …)\n \"sessid\",\n // Laravel etc. \"remember me\" tokens\n \"remember\",\n // OIDC / OAuth auxiliary (`oauth*` covered by header snippet `auth`)\n \"oidc\",\n \"pkce\",\n \"nonce\",\n // RFC 6265bis high-security cookie name prefixes\n \"__secure-\",\n \"__host-\",\n // Load balancer / CDN sticky-session cookies (opaque routing tokens)\n \"awsalb\",\n \"awselb\",\n \"akamai\",\n // BaaS / IdP session cookies (names often omit \"session\")\n \"__stripe\",\n \"cognito\",\n \"firebase\",\n \"supabase\",\n \"sb-\",\n // Step-up / MFA cookies\n \"mfa\",\n \"2fa\"\n];\n\nexport { FILTERED_VALUE, PII_HEADER_SNIPPETS, SENSITIVE_COOKIE_NAME_SNIPPETS, SENSITIVE_KEY_SNIPPETS };\n//# sourceMappingURL=filtering-snippets.js.map\n","import { PII_HEADER_SNIPPETS } from './filtering-snippets.js';\n\nfunction defaultPiiToCollectionOptions(sendDefaultPii) {\n return sendDefaultPii === true ? {\n userInfo: true,\n cookies: true,\n httpHeaders: { request: true, response: true },\n httpBodies: [\"incomingRequest\", \"outgoingRequest\", \"incomingResponse\", \"outgoingResponse\"],\n urlQueryParams: true,\n graphQL: { document: true, variables: true },\n genAI: { inputs: true, outputs: true },\n databaseQueryData: true,\n stackFrameVariables: true,\n frameContextLines: 7\n // default should be 5, but ContextLines integration uses 7\n } : {\n userInfo: false,\n cookies: { deny: PII_HEADER_SNIPPETS },\n httpHeaders: { request: { deny: PII_HEADER_SNIPPETS }, response: { deny: PII_HEADER_SNIPPETS } },\n httpBodies: [],\n urlQueryParams: { deny: PII_HEADER_SNIPPETS },\n // The GraphQL document has literal values redacted at collection time, so it was historically\n // always attached regardless of `sendDefaultPii`; keep it on to preserve that behavior.\n graphQL: { document: true, variables: true },\n genAI: { inputs: false, outputs: false },\n // Database query values were only sent with `sendDefaultPii: true` (e.g. Supabase gated on it),\n // so map the legacy \"off\" state to `false`.\n databaseQueryData: false,\n stackFrameVariables: true,\n frameContextLines: 7\n // default should be 5, but ContextLines integration uses 7\n };\n}\n\nexport { defaultPiiToCollectionOptions };\n//# sourceMappingURL=defaultPiiToCollectionOptions.js.map\n","import { defaultPiiToCollectionOptions } from './defaultPiiToCollectionOptions.js';\n\nconst DEFAULTS = {\n userInfo: true,\n cookies: true,\n httpHeaders: { request: true, response: true },\n httpBodies: [\"incomingRequest\", \"outgoingRequest\", \"incomingResponse\", \"outgoingResponse\"],\n urlQueryParams: true,\n graphQL: { document: true, variables: true },\n genAI: { inputs: true, outputs: true },\n databaseQueryData: true,\n stackFrameVariables: true,\n frameContextLines: 5\n};\nfunction resolveDataCollectionOptions(options) {\n const base = options.dataCollection != null ? DEFAULTS : defaultPiiToCollectionOptions(options.sendDefaultPii);\n const dc = options.dataCollection ?? {};\n return {\n userInfo: dc.userInfo ?? base.userInfo,\n cookies: dc.cookies ?? base.cookies,\n httpHeaders: {\n request: dc.httpHeaders?.request ?? base.httpHeaders.request,\n response: dc.httpHeaders?.response ?? base.httpHeaders.response\n },\n httpBodies: dc.httpBodies ?? base.httpBodies,\n // oxlint-disable-next-line typescript/no-deprecated\n urlQueryParams: dc.urlQueryParams ?? dc.queryParams ?? base.urlQueryParams,\n graphQL: {\n document: dc.graphQL?.document ?? base.graphQL.document,\n variables: dc.graphQL?.variables ?? base.graphQL.variables\n },\n genAI: {\n inputs: dc.genAI?.inputs ?? base.genAI.inputs,\n outputs: dc.genAI?.outputs ?? base.genAI.outputs\n },\n databaseQueryData: dc.databaseQueryData ?? base.databaseQueryData,\n stackFrameVariables: dc.stackFrameVariables ?? base.stackFrameVariables,\n frameContextLines: dc.frameContextLines ?? base.frameContextLines\n };\n}\n\nexport { resolveDataCollectionOptions };\n//# sourceMappingURL=resolveDataCollectionOptions.js.map\n","import { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { getTraceContextFromScope, getCurrentScope, getIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegration, afterSetupIntegrations, setupIntegrations } from './integration.js';\nimport { _INTERNAL_flushLogsBuffer } from './logs/internal.js';\nimport { _INTERNAL_flushMetricsBuffer } from './metrics/internal.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext.js';\nimport { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan.js';\nimport { extractGenAiSpansFromEvent } from './tracing/spans/extractGenAiSpans.js';\nimport { DEFAULT_TRANSPORT_BUFFER_SIZE } from './transports/base.js';\nimport { createClientReportEnvelope } from './utils/clientreport.js';\nimport { debug } from './utils/debug-logger.js';\nimport { makeDsn, dsnToString } from './utils/dsn.js';\nimport { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils/envelope.js';\nimport { getPossibleEventMessages } from './utils/eventUtils.js';\nimport { isParameterizedString, isPrimitive, isObjectLike, isThenable, isPlainObject } from './utils/is.js';\nimport { merge } from './utils/merge.js';\nimport { uuid4, checkOrSetAlreadyCaught } from './utils/misc.js';\nimport { parseSampleRate } from './utils/parseSampleRate.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\nimport { makePromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from './utils/promisebuffer.js';\nimport { safeMathRandom } from './utils/randomSafeContext.js';\nimport { shouldIgnoreSpan, reparentChildSpans } from './utils/should-ignore-span.js';\nimport { showSpanDropWarning } from './utils/spanUtils.js';\nimport { rejectedSyncPromise } from './utils/syncpromise.js';\nimport { safeUnref } from './utils/timer.js';\nimport { convertTransactionEventToSpanJson, convertSpanJsonToTransactionEvent } from './utils/transactionEvent.js';\nimport { resolveDataCollectionOptions } from './utils/data-collection/resolveDataCollectionOptions.js';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\nconst MISSING_RELEASE_FOR_SESSION_ERROR = \"Discarded session because of missing or non-string release\";\nconst INTERNAL_ERROR_SYMBOL = /* @__PURE__ */ Symbol.for(\"SentryInternalError\");\nconst DO_NOT_SEND_EVENT_SYMBOL = /* @__PURE__ */ Symbol.for(\"SentryDoNotSendEventError\");\nconst DEFAULT_FLUSH_INTERVAL = 5e3;\nfunction _makeInternalError(message) {\n return {\n message,\n [INTERNAL_ERROR_SYMBOL]: true\n };\n}\nfunction _makeDoNotSendEventError(message) {\n return {\n message,\n [DO_NOT_SEND_EVENT_SYMBOL]: true\n };\n}\nfunction _isInternalError(error) {\n return isObjectLike(error) && INTERNAL_ERROR_SYMBOL in error;\n}\nfunction _isDoNotSendEventError(error) {\n return isObjectLike(error) && DO_NOT_SEND_EVENT_SYMBOL in error;\n}\nfunction setupWeightBasedFlushing(client, afterCaptureHook, flushHook, estimateSizeFn, flushFn) {\n let weight = 0;\n let flushTimeout;\n let isTimerActive = false;\n client.on(flushHook, () => {\n weight = 0;\n clearTimeout(flushTimeout);\n isTimerActive = false;\n });\n client.on(afterCaptureHook, (item) => {\n weight += estimateSizeFn(item);\n if (weight >= 8e5) {\n flushFn(client);\n } else if (!isTimerActive) {\n const flushInterval = client.getOptions()._flushInterval ?? DEFAULT_FLUSH_INTERVAL;\n if (flushInterval > 0) {\n isTimerActive = true;\n flushTimeout = safeUnref(\n setTimeout(() => {\n flushFn(client);\n }, flushInterval)\n );\n }\n }\n });\n client.on(\"flush\", () => {\n flushFn(client);\n });\n}\nclass Client {\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n constructor(options) {\n this._options = options;\n this._integrations = {};\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n this._promiseBuffer = makePromiseBuffer(options.transportOptions?.bufferSize ?? DEFAULT_TRANSPORT_BUFFER_SIZE);\n this._dataCollection = resolveDataCollectionOptions(options);\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n DEBUG_BUILD && debug.warn(\"No DSN provided, client will not send events.\");\n }\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(\n this._dsn,\n options.tunnel,\n options._metadata ? options._metadata.sdk : void 0\n );\n this._transport = options.transport({\n tunnel: this._options.tunnel,\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url\n });\n }\n this._options.enableLogs = this._options.enableLogs ?? this._options._experiments?.enableLogs;\n if (this._options.enableLogs) {\n setupWeightBasedFlushing(this, \"afterCaptureLog\", \"flushLogs\", estimateLogSizeInBytes, _INTERNAL_flushLogsBuffer);\n }\n const enableMetrics = this._options.enableMetrics ?? this._options._experiments?.enableMetrics ?? true;\n if (enableMetrics) {\n setupWeightBasedFlushing(\n this,\n \"afterCaptureMetric\",\n \"flushMetrics\",\n estimateMetricSizeInBytes,\n _INTERNAL_flushMetricsBuffer\n );\n }\n }\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureException(exception, hint, scope) {\n const eventId = uuid4();\n if (checkOrSetAlreadyCaught(exception)) {\n DEBUG_BUILD && debug.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n const hintWithEventId = {\n event_id: eventId,\n ...hint\n };\n this._process(\n () => this.eventFromException(exception, hintWithEventId).then((event) => this._captureEvent(event, hintWithEventId, scope)).then((res) => res),\n \"error\"\n );\n return hintWithEventId.event_id;\n }\n /**\n * Captures a message event and sends it to Sentry.\n *\n * Unlike `captureMessage` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureMessage(message, level, hint, currentScope) {\n const hintWithEventId = {\n event_id: uuid4(),\n ...hint\n };\n const eventMessage = isParameterizedString(message) ? message : String(message);\n const isMessage = isPrimitive(message);\n const promisedEvent = isMessage ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message, hintWithEventId);\n this._process(\n () => promisedEvent.then((event) => this._captureEvent(event, hintWithEventId, currentScope)),\n isMessage ? \"unknown\" : \"error\"\n );\n return hintWithEventId.event_id;\n }\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.\n */\n captureEvent(event, hint, currentScope) {\n const eventId = uuid4();\n if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n DEBUG_BUILD && debug.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n const hintWithEventId = {\n event_id: eventId,\n ...hint\n };\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;\n const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;\n const dataCategory = getDataCategoryByType(event.type);\n this._process(\n () => this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope, capturedSpanIsolationScope),\n dataCategory\n );\n return hintWithEventId.event_id;\n }\n /**\n * Captures a session.\n */\n captureSession(session) {\n this.sendSession(session);\n updateSession(session, { init: false });\n }\n /**\n * Get the current Dsn.\n */\n getDsn() {\n return this._dsn;\n }\n /**\n * Get the current options.\n */\n getOptions() {\n return this._options;\n }\n /**\n * Get the resolved data collection configuration.\n */\n getDataCollectionOptions() {\n return this._dataCollection;\n }\n /**\n * Get the SDK metadata.\n * @see SdkMetadata\n */\n getSdkMetadata() {\n return this._options._metadata;\n }\n /**\n * Returns the transport that is used by the client.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n */\n getTransport() {\n return this._transport;\n }\n /**\n * Wait for all events to be sent or the timeout to expire, whichever comes first.\n *\n * @param timeout Maximum time in ms the client should wait for events to be flushed. Omitting this parameter will\n * cause the client to wait until all events are sent before resolving the promise.\n * @returns A promise that will resolve with `true` if all events are sent before the timeout, or `false` if there are\n * still events in the queue when the timeout is reached.\n */\n // @ts-expect-error - PromiseLike is a subset of Promise\n async flush(timeout) {\n const transport = this._transport;\n this.emit(\"flush\");\n if (!transport) {\n return true;\n }\n const clientFinished = await this._isClientDoneProcessing(timeout);\n const transportFlushed = await transport.flush(timeout);\n return clientFinished && transportFlushed;\n }\n /**\n * Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.\n *\n * @param {number} timeout Maximum time in ms the client should wait before shutting down. Omitting this parameter will cause\n * the client to wait until all events are sent before disabling itself.\n * @returns {Promise<boolean>} A promise which resolves to `true` if the flush completes successfully before the timeout, or `false` if\n * it doesn't.\n */\n // @ts-expect-error - PromiseLike is a subset of Promise\n async close(timeout) {\n const result = await this.flush(timeout);\n this.getOptions().enabled = false;\n this.emit(\"close\");\n return result;\n }\n /**\n * Get all installed event processors.\n */\n getEventProcessors() {\n return this._eventProcessors;\n }\n /**\n * Adds an event processor that applies to any event processed by this client.\n */\n addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n /**\n * Initialize this client.\n * Call this after the client was set on a scope.\n */\n init() {\n if (this._isEnabled() || // Force integrations to be setup even if no DSN was set when we have\n // Spotlight enabled. This is particularly important for browser as we\n // don't support the `spotlight` option there and rely on the users\n // adding the `spotlightBrowserIntegration()` to their integrations which\n // wouldn't get initialized with the check below when there's no DSN set.\n this._options.integrations.some(({ name }) => name.startsWith(\"Spotlight\"))) {\n this._setupIntegrations();\n }\n }\n /**\n * Gets an installed integration by its name.\n *\n * @returns {Integration|undefined} The installed integration or `undefined` if no integration with that `name` was installed.\n */\n getIntegrationByName(integrationName) {\n return this._integrations[integrationName];\n }\n /**\n * Returns the names of all installed integrations.\n */\n getIntegrationNames() {\n return Object.keys(this._integrations);\n }\n /**\n * Add an integration to the client.\n * This can be used to e.g. lazy load integrations.\n * In most cases, this should not be necessary,\n * and you're better off just passing the integrations via `integrations: []` at initialization time.\n * However, if you find the need to conditionally load & add an integration, you can use `addIntegration` to do so.\n */\n addIntegration(integration) {\n const isAlreadyInstalled = this._integrations[integration.name];\n if (!isAlreadyInstalled && integration.beforeSetup) {\n integration.beforeSetup(this);\n }\n setupIntegration(this, integration, this._integrations);\n if (!isAlreadyInstalled) {\n afterSetupIntegrations(this, [integration]);\n }\n }\n /**\n * Send a fully prepared event to Sentry.\n */\n sendEvent(event, hint = {}) {\n this.emit(\"beforeSendEvent\", event, hint);\n const genAiSpanItem = extractGenAiSpansFromEvent(event, this);\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));\n }\n if (genAiSpanItem) {\n env = addItemToEnvelope(env, genAiSpanItem);\n }\n this.sendEnvelope(env).then((sendResponse) => this.emit(\"afterSendEvent\", event, sendResponse));\n }\n /**\n * Send a session or session aggregrates to Sentry.\n */\n sendSession(session) {\n const { release: clientReleaseOption, environment: clientEnvironmentOption = DEFAULT_ENVIRONMENT } = this._options;\n if (\"aggregates\" in session) {\n const sessionAttrs = session.attrs || {};\n if (!sessionAttrs.release && !clientReleaseOption) {\n DEBUG_BUILD && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n return;\n }\n sessionAttrs.release = sessionAttrs.release || clientReleaseOption;\n sessionAttrs.environment = sessionAttrs.environment || clientEnvironmentOption;\n session.attrs = sessionAttrs;\n } else {\n if (!session.release && !clientReleaseOption) {\n DEBUG_BUILD && debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);\n return;\n }\n session.release = session.release || clientReleaseOption;\n session.environment = session.environment || clientEnvironmentOption;\n }\n this.emit(\"beforeSendSession\", session);\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n this.sendEnvelope(env);\n }\n /**\n * Record on the client that an event got dropped (ie, an event that will not be sent to Sentry).\n */\n recordDroppedEvent(reason, category, count = 1) {\n if (this._options.sendClientReports) {\n const key = `${reason}:${category}`;\n DEBUG_BUILD && debug.log(`Recording outcome: \"${key}\"${count > 1 ? ` (${count} times)` : \"\"}`);\n this._outcomes[key] = (this._outcomes[key] || 0) + count;\n }\n }\n /**\n * Register a hook on this client.\n */\n on(hook, callback) {\n const hookCallbacks = this._hooks[hook] = this._hooks[hook] || /* @__PURE__ */ new Set();\n const uniqueCallback = (...args) => callback(...args);\n hookCallbacks.add(uniqueCallback);\n return () => {\n hookCallbacks.delete(uniqueCallback);\n };\n }\n /**\n * Emit a hook that was previously registered via `on()`.\n */\n emit(hook, ...rest) {\n const callbacks = this._hooks[hook];\n if (callbacks) {\n callbacks.forEach((callback) => callback(...rest));\n }\n }\n /**\n * Send an envelope to Sentry.\n */\n // @ts-expect-error - PromiseLike is a subset of Promise\n async sendEnvelope(envelope) {\n this.emit(\"beforeEnvelope\", envelope);\n if (this._isEnabled() && this._transport) {\n try {\n return await this._transport.send(envelope);\n } catch (reason) {\n DEBUG_BUILD && debug.error(\"Error while sending envelope:\", reason);\n return {};\n }\n }\n DEBUG_BUILD && debug.error(\"Transport disabled\");\n return {};\n }\n /**\n * Register a cleanup function to be called when the client is disposed.\n * This is useful for integrations that need to clean up global state.\n *\n * NOTE: This is a no-op in the base `Client` class. Subclasses like `ServerRuntimeClient`\n * override this method to actually register and execute cleanup callbacks.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n registerCleanup(callback) {\n }\n /**\n * Disposes of the client and releases all resources.\n *\n * Subclasses should override this method to clean up their own resources, including invoking\n * any callbacks registered via {@link Client.registerCleanup}. The base implementation is a\n * no-op and does NOT execute registered cleanup callbacks.\n *\n * After calling dispose(), the client should not be used anymore.\n */\n dispose() {\n }\n /* eslint-enable @typescript-eslint/unified-signatures */\n /** Setup integrations for this client. */\n _setupIntegrations() {\n const { integrations } = this._options;\n this._integrations = setupIntegrations(this, integrations);\n afterSetupIntegrations(this, integrations);\n }\n /** Updates existing session based on the provided event */\n _updateSessionFromEvent(session, event) {\n let crashed = event.level === \"fatal\";\n let errored = false;\n const exceptions = event.exception?.values;\n if (exceptions) {\n errored = true;\n crashed = false;\n for (const ex of exceptions) {\n if (ex.mechanism?.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n const sessionNonTerminal = session.status === \"ok\";\n const shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed;\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...crashed && { status: \"crashed\" },\n errors: session.errors || Number(errored || crashed)\n });\n this.captureSession(session);\n }\n }\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n async _isClientDoneProcessing(timeout) {\n let ticked = 0;\n while (!timeout || ticked < timeout) {\n await new Promise((resolve) => setTimeout(resolve, 1));\n if (!this._numProcessing) {\n return true;\n }\n ticked++;\n }\n return false;\n }\n /** Determines whether this SDK is enabled and a transport is present. */\n _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== void 0;\n }\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A new event with more information.\n */\n _prepareEvent(event, hint, currentScope, isolationScope) {\n const options = this.getOptions();\n const integrations = this.getIntegrationNames();\n if (!hint.integrations && integrations.length) {\n hint.integrations = integrations;\n }\n this.emit(\"preprocessEvent\", event, hint);\n if (!event.type) {\n isolationScope.setLastEventId(event.event_id || hint.event_id);\n }\n return prepareEvent(options, event, hint, currentScope, this, isolationScope).then((evt) => {\n if (evt === null) {\n return evt;\n }\n this.emit(\"postprocessEvent\", evt, hint);\n evt.contexts = {\n trace: { ...evt.contexts?.trace, ...getTraceContextFromScope(currentScope) },\n ...evt.contexts\n };\n const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata\n };\n return evt;\n });\n }\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n _captureEvent(event, hint = {}, currentScope = getCurrentScope(), isolationScope = getIsolationScope()) {\n if (DEBUG_BUILD && isErrorEvent(event)) {\n debug.log(`Captured error event \\`${getPossibleEventMessages(event)[0] || \"<unknown>\"}\\``);\n }\n return this._processEvent(event, hint, currentScope, isolationScope).then(\n (finalEvent) => {\n return finalEvent.event_id;\n },\n (reason) => {\n if (DEBUG_BUILD) {\n if (_isDoNotSendEventError(reason)) {\n debug.log(reason.message);\n } else if (_isInternalError(reason)) {\n debug.warn(reason.message);\n } else {\n debug.warn(reason);\n }\n }\n return void 0;\n }\n );\n }\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n _processEvent(event, hint, currentScope, isolationScope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || \"error\";\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n const parsedSampleRate = typeof sampleRate === \"undefined\" ? void 0 : parseSampleRate(sampleRate);\n if (isError && typeof parsedSampleRate === \"number\" && safeMathRandom() > parsedSampleRate) {\n this.recordDroppedEvent(\"sample_rate\", \"error\");\n return rejectedSyncPromise(\n _makeDoNotSendEventError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`\n )\n );\n }\n const dataCategory = getDataCategoryByType(event.type);\n return this._prepareEvent(event, hint, currentScope, isolationScope).then((prepared) => {\n if (prepared === null) {\n this.recordDroppedEvent(\"event_processor\", dataCategory);\n throw _makeDoNotSendEventError(\"An event processor returned `null`, will not send event.\");\n }\n const isInternalException = hint.data?.__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n const result = processBeforeSend(this, options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n }).then((processedEvent) => {\n if (processedEvent === null) {\n this.recordDroppedEvent(\"before_send\", dataCategory);\n if (isTransaction) {\n const spans = event.spans || [];\n const spanCount = 1 + spans.length;\n this.recordDroppedEvent(\"before_send\", \"span\", spanCount);\n }\n throw _makeDoNotSendEventError(`${beforeSendLabel} returned \\`null\\`, will not send event.`);\n }\n const session = currentScope.getSession() || isolationScope.getSession();\n if (isError && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n if (isTransaction) {\n const spanCountBefore = processedEvent.sdkProcessingMetadata?.spanCountBeforeProcessing || 0;\n const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n const droppedSpanCount = spanCountBefore - spanCountAfter;\n if (droppedSpanCount > 0) {\n this.recordDroppedEvent(\"before_send\", \"span\", droppedSpanCount);\n }\n }\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = \"custom\";\n processedEvent.transaction_info = {\n ...transactionInfo,\n source\n };\n }\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n }).then(null, (reason) => {\n if (_isDoNotSendEventError(reason) || _isInternalError(reason)) {\n throw reason;\n }\n this.captureException(reason, {\n mechanism: {\n handled: false,\n type: \"internal\"\n },\n data: {\n __sentry__: true\n },\n originalException: reason\n });\n throw _makeInternalError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${reason}`\n );\n });\n }\n /**\n * Occupies the client with processing and event\n */\n _process(taskProducer, dataCategory) {\n this._numProcessing++;\n void this._promiseBuffer.add(taskProducer).then(\n (value) => {\n this._numProcessing--;\n return value;\n },\n (reason) => {\n this._numProcessing--;\n if (reason === SENTRY_BUFFER_FULL_ERROR) {\n this.recordDroppedEvent(\"queue_overflow\", dataCategory);\n }\n return reason;\n }\n );\n }\n /**\n * Clears outcomes on this client and returns them.\n */\n _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.entries(outcomes).map(([key, quantity]) => {\n const [reason, category] = key.split(\":\");\n return {\n reason,\n category,\n quantity\n };\n });\n }\n /**\n * Sends client reports as an envelope.\n */\n _flushOutcomes() {\n DEBUG_BUILD && debug.log(\"Flushing outcomes...\");\n const outcomes = this._clearOutcomes();\n if (outcomes.length === 0) {\n DEBUG_BUILD && debug.log(\"No outcomes to send\");\n return;\n }\n if (!this._dsn) {\n DEBUG_BUILD && debug.log(\"No dsn provided, will not send outcomes\");\n return;\n }\n DEBUG_BUILD && debug.log(\"Sending outcomes:\", outcomes);\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n this.sendEnvelope(envelope);\n }\n}\nfunction getDataCategoryByType(type) {\n return type === \"replay_event\" ? \"replay\" : type || \"error\";\n}\nfunction _validateBeforeSendResult(beforeSendResult, beforeSendLabel) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n (event) => {\n if (!isPlainObject(event) && event !== null) {\n throw _makeInternalError(invalidValueError);\n }\n return event;\n },\n (e) => {\n throw _makeInternalError(`${beforeSendLabel} rejected with ${e}`);\n }\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw _makeInternalError(invalidValueError);\n }\n return beforeSendResult;\n}\nfunction processBeforeSend(client, options, event, hint) {\n const { beforeSend, beforeSendTransaction, ignoreSpans } = options;\n const beforeSendSpan = !isStreamedBeforeSendSpanCallback(options.beforeSendSpan) && options.beforeSendSpan;\n let processedEvent = event;\n if (isErrorEvent(processedEvent) && beforeSend) {\n return beforeSend(processedEvent, hint);\n }\n if (isTransactionEvent(processedEvent)) {\n if (beforeSendSpan || ignoreSpans) {\n const rootSpanJson = convertTransactionEventToSpanJson(processedEvent);\n if (ignoreSpans?.length && shouldIgnoreSpan(\n { description: rootSpanJson.description, op: rootSpanJson.op, attributes: rootSpanJson.data },\n ignoreSpans\n )) {\n return null;\n }\n if (beforeSendSpan) {\n const processedRootSpanJson = beforeSendSpan(rootSpanJson);\n if (!processedRootSpanJson) {\n showSpanDropWarning();\n } else {\n processedEvent = merge(event, convertSpanJsonToTransactionEvent(processedRootSpanJson));\n }\n }\n if (processedEvent.spans) {\n const processedSpans = [];\n const initialSpans = processedEvent.spans;\n for (const span of initialSpans) {\n if (ignoreSpans?.length && shouldIgnoreSpan({ description: span.description, op: span.op, attributes: span.data }, ignoreSpans)) {\n reparentChildSpans(initialSpans, span);\n continue;\n }\n if (beforeSendSpan) {\n const processedSpan = beforeSendSpan(span);\n if (!processedSpan) {\n showSpanDropWarning();\n processedSpans.push(span);\n } else {\n processedSpans.push(processedSpan);\n }\n } else {\n processedSpans.push(span);\n }\n }\n const droppedSpans = processedEvent.spans.length - processedSpans.length;\n if (droppedSpans) {\n client.recordDroppedEvent(\"before_send\", \"span\", droppedSpans);\n }\n processedEvent.spans = processedSpans;\n }\n }\n if (beforeSendTransaction) {\n if (processedEvent.spans) {\n const spanCountBefore = processedEvent.spans.length;\n processedEvent.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n spanCountBeforeProcessing: spanCountBefore\n };\n }\n return beforeSendTransaction(processedEvent, hint);\n }\n }\n return processedEvent;\n}\nfunction isErrorEvent(event) {\n return event.type === void 0;\n}\nfunction isTransactionEvent(event) {\n return event.type === \"transaction\";\n}\nfunction estimateMetricSizeInBytes(metric) {\n let weight = 0;\n if (metric.name) {\n weight += metric.name.length * 2;\n }\n weight += 8;\n return weight + estimateAttributesSizeInBytes(metric.attributes);\n}\nfunction estimateLogSizeInBytes(log) {\n let weight = 0;\n if (log.message) {\n weight += log.message.length * 2;\n }\n return weight + estimateAttributesSizeInBytes(log.attributes);\n}\nfunction estimateAttributesSizeInBytes(attributes) {\n if (!attributes) {\n return 0;\n }\n let weight = 0;\n Object.values(attributes).forEach((value) => {\n if (Array.isArray(value)) {\n weight += value.length * estimatePrimitiveSizeInBytes(value[0]);\n } else if (isPrimitive(value)) {\n weight += estimatePrimitiveSizeInBytes(value);\n } else {\n weight += 100;\n }\n });\n return weight;\n}\nfunction estimatePrimitiveSizeInBytes(value) {\n if (typeof value === \"string\") {\n return value.length * 2;\n } else if (typeof value === \"number\") {\n return 8;\n } else if (typeof value === \"boolean\") {\n return 4;\n }\n return 0;\n}\n\nexport { Client };\n//# sourceMappingURL=client.js.map\n","function addAutoIpAddressToUser(objWithMaybeUser) {\n if (objWithMaybeUser.user?.ip_address === void 0) {\n objWithMaybeUser.user = {\n ...objWithMaybeUser.user,\n ip_address: \"{{auto}}\"\n };\n }\n}\nfunction addAutoIpAddressToSession(session) {\n if (\"aggregates\" in session) {\n if (session.attrs?.[\"ip_address\"] === void 0) {\n session.attrs = {\n ...session.attrs,\n ip_address: \"{{auto}}\"\n };\n }\n } else {\n if (session.ipAddress === void 0) {\n session.ipAddress = \"{{auto}}\";\n }\n }\n}\n\nexport { addAutoIpAddressToSession, addAutoIpAddressToUser };\n//# sourceMappingURL=ipAddress.js.map\n","import { SDK_VERSION } from './version.js';\n\nfunction applySdkMetadata(options, name, names = [name], source = \"npm\") {\n const sdk = (options._metadata = options._metadata || {}).sdk = options._metadata.sdk || {};\n if (!sdk.name) {\n sdk.name = `sentry.javascript.${name}`;\n sdk.packages = names.map((name2) => ({\n name: `${source}:@sentry/${name2}`,\n version: SDK_VERSION\n }));\n sdk.version = SDK_VERSION;\n }\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n","import { isParameterizedString, isError, isPlainObject, isErrorEvent } from './is.js';\nimport { addExceptionMechanism, addExceptionTypeValue } from './misc.js';\nimport { normalizeToSize } from './normalize.js';\nimport { extractExceptionKeysForMessage } from './object.js';\n\nfunction parseStackFrames(stackParser, error) {\n return stackParser(error.stack || \"\", 1);\n}\nfunction hasSentryFetchUrlHost(error) {\n return isError(error) && \"__sentry_fetch_url_host__\" in error && typeof error.__sentry_fetch_url_host__ === \"string\";\n}\nfunction _enhanceErrorWithSentryInfo(error) {\n if (hasSentryFetchUrlHost(error)) {\n return `${error.message} (${error.__sentry_fetch_url_host__})`;\n }\n return error.message;\n}\nfunction exceptionFromError(stackParser, error) {\n const exception = {\n type: error.name || error.constructor.name,\n value: _enhanceErrorWithSentryInfo(error)\n };\n const frames = parseStackFrames(stackParser, error);\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n return exception;\n}\nfunction getErrorPropertyFromObject(obj) {\n for (const prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n const value = obj[prop];\n if (value instanceof Error) {\n return value;\n }\n }\n }\n return void 0;\n}\nfunction getMessageForObject(exception) {\n if (\"name\" in exception && typeof exception.name === \"string\") {\n let message = `'${exception.name}' captured as exception`;\n if (\"message\" in exception && typeof exception.message === \"string\") {\n message += ` with message '${exception.message}'`;\n }\n return message;\n } else if (\"message\" in exception && typeof exception.message === \"string\") {\n return exception.message;\n }\n const keys = extractExceptionKeysForMessage(exception);\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as exception with message \\`${exception.message}\\``;\n }\n const className = getObjectClassName(exception);\n return `${className && className !== \"Object\" ? `'${className}'` : \"Object\"} captured as exception with keys: ${keys}`;\n}\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : void 0;\n } catch {\n }\n}\nfunction getException(client, mechanism, exception, hint) {\n if (isError(exception)) {\n return [exception, void 0];\n }\n mechanism.synthetic = true;\n if (isPlainObject(exception)) {\n const normalizeDepth = client?.getOptions().normalizeDepth;\n const extras = { [\"__serialized__\"]: normalizeToSize(exception, normalizeDepth) };\n const errorFromProp = getErrorPropertyFromObject(exception);\n if (errorFromProp) {\n return [errorFromProp, extras];\n }\n const message = getMessageForObject(exception);\n const ex2 = hint?.syntheticException || new Error(message);\n ex2.message = message;\n return [ex2, extras];\n }\n const ex = hint?.syntheticException || new Error(exception);\n ex.message = `${exception}`;\n return [ex, void 0];\n}\nfunction eventFromUnknownInput(client, stackParser, exception, hint) {\n const providedMechanism = hint?.data && hint.data.mechanism;\n const mechanism = providedMechanism || {\n handled: true,\n type: \"generic\"\n };\n const [ex, extras] = getException(client, mechanism, exception, hint);\n const event = {\n exception: {\n values: [exceptionFromError(stackParser, ex)]\n }\n };\n if (extras) {\n event.extra = extras;\n }\n addExceptionTypeValue(event, void 0, void 0);\n addExceptionMechanism(event, mechanism);\n return {\n ...event,\n event_id: hint?.event_id\n };\n}\nfunction eventFromMessage(stackParser, message, level = \"info\", hint, attachStacktrace) {\n const event = {\n event_id: hint?.event_id,\n level\n };\n if (attachStacktrace && hint?.syntheticException) {\n const frames = parseStackFrames(stackParser, hint.syntheticException);\n if (frames.length) {\n event.exception = {\n values: [\n {\n value: message,\n stacktrace: { frames }\n }\n ]\n };\n addExceptionMechanism(event, { synthetic: true });\n }\n }\n if (isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__\n };\n return event;\n }\n event.message = message;\n return event;\n}\n\nexport { _enhanceErrorWithSentryInfo, eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStackFrames };\n//# sourceMappingURL=eventbuilder.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { debug } from './debug-logger.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ;\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent(\"\");\n return true;\n } catch {\n return false;\n }\n}\nfunction supportsDOMError() {\n try {\n new DOMError(\"\");\n return true;\n } catch {\n return false;\n }\n}\nfunction supportsDOMException() {\n try {\n new DOMException(\"\");\n return true;\n } catch {\n return false;\n }\n}\nfunction supportsHistory() {\n return \"history\" in WINDOW && !!WINDOW.history;\n}\nconst supportsFetch = _isFetchSupported;\nfunction _isFetchSupported() {\n if (!(\"fetch\" in WINDOW)) {\n return false;\n }\n try {\n new Headers();\n new Request(\"data:,\");\n new Response();\n return true;\n } catch {\n return false;\n }\n}\nfunction isNativeFunction(func) {\n return func && /^function\\s+\\w+\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\nfunction supportsNativeFetch() {\n if (typeof EdgeRuntime === \"string\") {\n return true;\n }\n if (!_isFetchSupported()) {\n return false;\n }\n if (isNativeFunction(WINDOW.fetch)) {\n return true;\n }\n let result = false;\n const doc = WINDOW.document;\n if (doc && typeof doc.createElement === \"function\") {\n try {\n const sandbox = doc.createElement(\"iframe\");\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow?.fetch) {\n result = isNativeFunction(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n DEBUG_BUILD && debug.warn(\"Could not create sandbox iframe for pure fetch check, bailing to window.fetch: \", err);\n }\n }\n return result;\n}\nfunction supportsReportingObserver() {\n return \"ReportingObserver\" in WINDOW;\n}\nfunction supportsReferrerPolicy() {\n if (!_isFetchSupported()) {\n return false;\n }\n try {\n new Request(\"_\", {\n referrerPolicy: \"origin\"\n });\n return true;\n } catch {\n return false;\n }\n}\n\nexport { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n//# sourceMappingURL=supports.js.map\n","import { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, withScope, addExceptionTypeValue, addExceptionMechanism, captureException, getLocationHref } from '@sentry/core/browser';\n\nconst WINDOW = GLOBAL_OBJ;\nlet ignoreOnError = 0;\nfunction shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\nfunction ignoreNextOnError() {\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\nfunction wrap(fn, options = {}) {\n function isFunction(fn2) {\n return typeof fn2 === \"function\";\n }\n if (!isFunction(fn)) {\n return fn;\n }\n try {\n const hasOwnWrapper = Object.prototype.hasOwnProperty.call(fn, \"__sentry_wrapped__\");\n if (hasOwnWrapper) {\n const wrapper = fn.__sentry_wrapped__;\n if (typeof wrapper === \"function\") {\n return wrapper;\n } else {\n return fn;\n }\n }\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch {\n return fn;\n }\n const sentryWrapped = function(...args) {\n GLOBAL_OBJ._sentryWrappedDepth = (GLOBAL_OBJ._sentryWrappedDepth || 0) + 1;\n try {\n const wrappedArguments = args.map((arg) => wrap(arg, options));\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n withScope((scope) => {\n scope.addEventProcessor((event) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, void 0, void 0);\n addExceptionMechanism(event, options.mechanism);\n }\n event.extra = {\n ...event.extra,\n arguments: args\n };\n return event;\n });\n captureException(ex);\n });\n throw ex;\n } finally {\n GLOBAL_OBJ._sentryWrappedDepth = (GLOBAL_OBJ._sentryWrappedDepth || 0) - 1;\n }\n };\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch {\n }\n markFunctionWrapped(sentryWrapped, fn);\n addNonEnumerableProperty(fn, \"__sentry_wrapped__\", sentryWrapped);\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, \"name\");\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, \"name\", {\n get() {\n return fn.name;\n }\n });\n }\n } catch {\n }\n return sentryWrapped;\n}\nfunction getHttpRequestData() {\n const url = getLocationHref();\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n const headers = {\n ...referrer && { Referer: referrer },\n ...userAgent && { \"User-Agent\": userAgent }\n };\n const request = {\n url,\n headers\n };\n return request;\n}\n\nexport { WINDOW, getHttpRequestData, ignoreNextOnError, shouldIgnoreOnError, wrap };\n//# sourceMappingURL=helpers.js.map\n","import { isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, addExceptionMechanism, isParameterizedString, getClient, normalizeToSize, extractExceptionKeysForMessage, _INTERNAL_enhanceErrorWithSentryInfo, resolvedSyncPromise } from '@sentry/core/browser';\n\nfunction exceptionFromError(stackParser, ex) {\n const frames = parseStackFrames(stackParser, ex);\n const exception = {\n type: extractType(ex),\n value: extractMessage(ex)\n };\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n if (exception.type === void 0 && exception.value === \"\") {\n exception.value = \"Unrecoverable error caught\";\n }\n return exception;\n}\nfunction eventFromPlainObject(stackParser, exception, syntheticException, isUnhandledRejection) {\n const client = getClient();\n const normalizeDepth = client?.getOptions().normalizeDepth;\n const errorFromProp = getErrorPropertyFromObject(exception);\n const extra = {\n __serialized__: normalizeToSize(exception, normalizeDepth)\n };\n if (errorFromProp) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, errorFromProp)]\n },\n extra\n };\n }\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? \"UnhandledRejection\" : \"Error\",\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection })\n }\n ]\n },\n extra\n };\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception.values[0].stacktrace = { frames };\n }\n }\n return event;\n}\nfunction eventFromError(stackParser, ex) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)]\n }\n };\n}\nfunction parseStackFrames(stackParser, ex) {\n const stacktrace = ex.stacktrace || ex.stack || \"\";\n const skipLines = getSkipFirstStackStringLines(ex);\n const framesToPop = getPopFirstTopFrames(ex);\n try {\n return stackParser(stacktrace, skipLines, framesToPop);\n } catch {\n }\n return [];\n}\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\nfunction getSkipFirstStackStringLines(ex) {\n if (ex && reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n return 0;\n}\nfunction getPopFirstTopFrames(ex) {\n if (typeof ex.framesToPop === \"number\") {\n return ex.framesToPop;\n }\n return 0;\n}\nfunction isWebAssemblyException(exception) {\n if (typeof WebAssembly !== \"undefined\" && typeof WebAssembly.Exception !== \"undefined\") {\n return exception instanceof WebAssembly.Exception;\n } else {\n return false;\n }\n}\nfunction extractType(ex) {\n const name = ex?.name;\n if (!name && isWebAssemblyException(ex)) {\n const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n return hasTypeInMessage ? ex.message[0] : \"WebAssembly.Exception\";\n }\n return name;\n}\nfunction extractMessage(ex) {\n const message = ex?.message;\n if (isWebAssemblyException(ex)) {\n if (Array.isArray(ex.message) && ex.message.length == 2) {\n return ex.message[1];\n }\n return \"wasm exception\";\n }\n if (!message) {\n return \"No error message\";\n }\n if (message.error && typeof message.error.message === \"string\") {\n return _INTERNAL_enhanceErrorWithSentryInfo(message.error);\n }\n return _INTERNAL_enhanceErrorWithSentryInfo(ex);\n}\nfunction eventFromException(stackParser, exception, hint, attachStacktrace) {\n const syntheticException = hint?.syntheticException || void 0;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event);\n event.level = \"error\";\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\nfunction eventFromMessage(stackParser, message, level = \"info\", hint, attachStacktrace) {\n const syntheticException = hint?.syntheticException || void 0;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\nfunction eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace, isUnhandledRejection) {\n let event;\n if (isErrorEvent(exception) && exception.error) {\n const errorEvent = exception;\n return eventFromError(stackParser, errorEvent.error);\n }\n if (isDOMError(exception) || isDOMException(exception)) {\n const domException = exception;\n if (\"stack\" in exception) {\n event = eventFromError(stackParser, exception);\n const firstException = event.exception?.values?.[0];\n if (attachStacktrace && syntheticException && firstException && !firstException.stacktrace) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n firstException.stacktrace = { frames };\n addExceptionMechanism(event, { synthetic: true });\n }\n }\n } else {\n const name = domException.name || (isDOMError(domException) ? \"DOMError\" : \"DOMException\");\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if (\"code\" in domException) {\n event.tags = { ...event.tags, \"DOMException.code\": `${domException.code}` };\n }\n return event;\n }\n if (isError(exception)) {\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n const objectException = exception;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true\n });\n return event;\n }\n event = eventFromString(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, void 0);\n addExceptionMechanism(event, {\n synthetic: true\n });\n return event;\n}\nfunction eventFromString(stackParser, message, syntheticException, attachStacktrace) {\n const event = {};\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: message, stacktrace: { frames } }]\n };\n }\n addExceptionMechanism(event, { synthetic: true });\n }\n if (isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__\n };\n return event;\n }\n event.message = message;\n return event;\n}\nfunction getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }) {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? \"promise rejection\" : \"exception\";\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : void 0;\n } catch {\n }\n}\nfunction getErrorPropertyFromObject(obj) {\n return Object.values(obj).find((v) => v instanceof Error);\n}\n\nexport { eventFromException, eventFromMessage, eventFromUnknownInput, exceptionFromError, extractMessage, extractType };\n//# sourceMappingURL=eventbuilder.js.map\n","import { Client, getSDKSource, applySdkMetadata, addAutoIpAddressToSession } from '@sentry/core/browser';\nimport { eventFromException, eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\n\nclass BrowserClient extends Client {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n const opts = applyDefaultOptions(options);\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n applySdkMetadata(opts, \"browser\", [\"browser\"], sdkSource);\n super(opts);\n const { userInfo } = this.getDataCollectionOptions();\n if (opts._metadata?.sdk) {\n opts._metadata.sdk.settings = {\n // Only allow IP inferral by Relay if the user opted in via dataCollection\n infer_ip: userInfo ? \"auto\" : \"never\",\n // purposefully allowing already passed settings to override the default\n ...opts._metadata.sdk.settings\n };\n }\n const { sendClientReports } = this._options;\n if (WINDOW.document) {\n WINDOW.document.addEventListener(\"visibilitychange\", () => {\n if (WINDOW.document.visibilityState === \"hidden\") {\n if (sendClientReports) {\n this._flushOutcomes();\n }\n queueMicrotask(() => {\n void this.flush();\n });\n }\n });\n }\n if (userInfo) {\n this.on(\"beforeSendSession\", addAutoIpAddressToSession);\n }\n }\n /**\n * @inheritDoc\n */\n eventFromException(exception, hint) {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n /**\n * @inheritDoc\n */\n eventFromMessage(message, level = \"info\", hint) {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n /**\n * @inheritDoc\n */\n _prepareEvent(event, hint, currentScope, isolationScope) {\n event.platform = event.platform || \"javascript\";\n return super._prepareEvent(event, hint, currentScope, isolationScope);\n }\n}\nfunction applyDefaultOptions(optionsArg) {\n return {\n release: typeof __SENTRY_RELEASE__ === \"string\" ? __SENTRY_RELEASE__ : WINDOW.SENTRY_RELEASE?.id,\n // This supports the variable that sentry-webpack-plugin injects\n sendClientReports: true,\n // We default this to true, as it is the safer scenario\n parentSpanIsAlwaysRootSpan: true,\n ...optionsArg\n };\n}\n\nexport { BrowserClient, applyDefaultOptions };\n//# sourceMappingURL=client.js.map\n","const DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { GLOBAL_OBJ } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ;\n\nexport { WINDOW };\n//# sourceMappingURL=types.js.map\n","import { isNativeFunction, debug } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './types.js';\n\nconst cachedImplementations = {};\nfunction getNativeImplementation(name) {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n let impl = WINDOW[name];\n if (isNativeFunction(impl)) {\n return cachedImplementations[name] = impl.bind(WINDOW);\n }\n const document = WINDOW.document;\n if (document && typeof document.createElement === \"function\") {\n try {\n const sandbox = document.createElement(\"iframe\");\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow?.[name]) {\n impl = contentWindow[name];\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n DEBUG_BUILD && debug.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n }\n }\n if (!impl) {\n return impl;\n }\n return cachedImplementations[name] = impl.bind(WINDOW);\n}\nfunction clearCachedImplementation(name) {\n cachedImplementations[name] = void 0;\n}\nfunction fetch(...rest) {\n return getNativeImplementation(\"fetch\")(...rest);\n}\nfunction setTimeout(...rest) {\n return getNativeImplementation(\"setTimeout\")(...rest);\n}\n\nexport { clearCachedImplementation, fetch, getNativeImplementation, setTimeout };\n//# sourceMappingURL=getNativeImplementation.js.map\n","import { createTransport, makePromiseBuffer } from '@sentry/core/browser';\nimport { getNativeImplementation, clearCachedImplementation } from '@sentry/browser-utils';\n\nconst DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE = 40;\nfunction makeFetchTransport(options, nativeFetch = getNativeImplementation(\"fetch\")) {\n let pendingBodySize = 0;\n let pendingCount = 0;\n async function makeRequest(request) {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n const requestOptions = {\n body: request.body,\n method: \"POST\",\n referrerPolicy: \"strict-origin\",\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. when finishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 6e4 && pendingCount < 15,\n ...options.fetchOptions\n };\n try {\n const response = await nativeFetch(options.url, requestOptions);\n return {\n statusCode: response.status,\n headers: {\n \"x-sentry-rate-limits\": response.headers.get(\"X-Sentry-Rate-Limits\"),\n \"retry-after\": response.headers.get(\"Retry-After\")\n }\n };\n } catch (e) {\n clearCachedImplementation(\"fetch\");\n throw e;\n } finally {\n pendingBodySize -= requestSize;\n pendingCount--;\n }\n }\n return createTransport(\n options,\n makeRequest,\n makePromiseBuffer(options.bufferSize || DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE)\n );\n}\n\nexport { makeFetchTransport };\n//# sourceMappingURL=fetch.js.map\n","import { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core/browser';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\nfunction createFrame(filename, func, lineno, colno) {\n const frame = {\n filename,\n function: func === \"<anonymous>\" ? UNKNOWN_FUNCTION : func,\n in_app: true\n // All browser frames are considered in_app\n };\n if (lineno !== void 0) {\n frame.lineno = lineno;\n }\n if (colno !== void 0) {\n frame.colno = colno;\n }\n return frame;\n}\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\nconst chromeRegex = /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nconst chromeDataUriRegex = /at (.+?) ?\\(data:(.+?),/;\nconst chromeStackParserFn = (line) => {\n const dataUriMatch = line.match(chromeDataUriRegex);\n if (dataUriMatch) {\n return {\n filename: `<data:${dataUriMatch[2]}>`,\n function: dataUriMatch[1]\n };\n }\n const noFnParts = chromeRegexNoFnName.exec(line);\n if (noFnParts) {\n const [, filename, line2, col] = noFnParts;\n return createFrame(filename, UNKNOWN_FUNCTION, +line2, +col);\n }\n const parts = chromeRegex.exec(line);\n if (parts) {\n const isEval = parts[2]?.indexOf(\"eval\") === 0;\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]);\n if (subMatch) {\n parts[2] = subMatch[1];\n parts[3] = subMatch[2];\n parts[4] = subMatch[3];\n }\n }\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n return createFrame(filename, func, parts[3] ? +parts[3] : void 0, parts[4] ? +parts[4] : void 0);\n }\n return;\n};\nconst chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\nconst geckoREgex = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst gecko = (line) => {\n const parts = geckoREgex.exec(line);\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(\" > eval\") > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]);\n if (subMatch) {\n parts[1] = parts[1] || \"eval\";\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = \"\";\n }\n }\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n return createFrame(filename, func, parts[4] ? +parts[4] : void 0, parts[5] ? +parts[5] : void 0);\n }\n return;\n};\nconst geckoStackLineParser = [GECKO_PRIORITY, gecko];\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst winjs = (line) => {\n const parts = winjsRegex.exec(line);\n return parts ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;\n};\nconst winjsStackLineParser = [WINJS_PRIORITY, winjs];\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\nconst opera10 = (line) => {\n const parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : void 0;\n};\nconst opera10StackLineParser = [OPERA10_PRIORITY, opera10];\nconst opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\nconst opera11 = (line) => {\n const parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : void 0;\n};\nconst opera11StackLineParser = [OPERA11_PRIORITY, opera11];\nconst defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\nconst defaultStackParser = createStackParser(...defaultStackLineParsers);\nconst extractSafariExtensionDetails = (func, filename) => {\n const isSafariExtension = func.indexOf(\"safari-extension\") !== -1;\n const isSafariWebExtension = func.indexOf(\"safari-web-extension\") !== -1;\n return isSafariExtension || isSafariWebExtension ? [\n func.indexOf(\"@\") !== -1 ? func.split(\"@\")[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`\n ] : [func, filename];\n};\n\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };\n//# sourceMappingURL=stack-parsers.js.map\n","import type { ErrorEvent } from \"@sentry/browser\";\nimport {\n BrowserClient,\n defaultStackParser,\n makeFetchTransport,\n Scope,\n} from \"@sentry/browser\";\n\nimport type { LockerverseEnvironment, LockerverseSdkError } from \"./types.ts\";\n\nconst sentryClients = new Map<string, BrowserClient>();\n\nfunction stripUrlDetails(value: string | undefined) {\n if (!value) {\n return value;\n }\n\n try {\n const url = new URL(value);\n url.username = \"\";\n url.password = \"\";\n url.search = \"\";\n url.hash = \"\";\n return url.toString();\n } catch {\n return value.replace(/[?#][^\\s)]*/g, \"\");\n }\n}\n\nfunction sanitizeSentryEvent(event: ErrorEvent) {\n Reflect.deleteProperty(event, \"breadcrumbs\");\n Reflect.deleteProperty(event, \"request\");\n Reflect.deleteProperty(event, \"user\");\n\n for (const exception of event.exception?.values ?? []) {\n for (const frame of exception.stacktrace?.frames ?? []) {\n const filename = stripUrlDetails(frame.filename);\n if (filename) {\n frame.filename = filename;\n }\n }\n }\n\n return event;\n}\n\nfunction getSentryClient(\n dsn: string,\n environment: LockerverseEnvironment,\n sdkVersion: string\n) {\n const key = `${environment}:${dsn}`;\n const existing = sentryClients.get(key);\n if (existing) {\n return existing;\n }\n\n const client = new BrowserClient({\n beforeSend: sanitizeSentryEvent,\n dsn,\n environment,\n integrations: [],\n release: `@lockerverse/sdk@${sdkVersion}`,\n sendDefaultPii: false,\n stackParser: defaultStackParser,\n transport: makeFetchTransport,\n });\n client.init();\n sentryClients.set(key, client);\n return client;\n}\n\nexport function captureSdkError({\n context,\n contextName,\n dsn,\n environment,\n error,\n}: {\n context: Record<string, boolean | number | string | null>;\n contextName: string;\n dsn: string;\n environment: LockerverseEnvironment;\n error: LockerverseSdkError;\n}) {\n try {\n const scope = new Scope();\n scope.setClient(getSentryClient(dsn, environment, error.sdkVersion));\n scope.setTags({\n \"sdk.code\": error.code,\n \"sdk.operation\": error.operation,\n \"sdk.version\": error.sdkVersion,\n source: \"lockerverse-sdk\",\n });\n scope.setContext(contextName, context);\n scope.captureException(error);\n } catch {\n // Telemetry is best-effort and must not replace the checkout error.\n }\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79],"mappings":"AAAA,MAAMA,EAAe,OAAO,iBAAqB,KAAe,iBCA1D,EAAa,WCAb,EAAc,UCGpB,SAAS,GAAiB,CAExB,OADA,EAAiB,CAAU,EACpB,CACT,CACA,SAAS,EAAiB,EAAS,CACjC,IAAM,EAAa,EAAQ,WAAa,EAAQ,YAAc,CAAC,EAE/D,MADA,GAAW,QAAU,EAAW,SAAA,UACzB,EAAW,GAAe,EAAA,YAA2B,CAAC,CAC/D,CACA,SAAS,EAAmB,EAAM,EAAS,EAAM,EAAY,CAC3D,IAAM,EAAa,EAAI,WAAa,EAAI,YAAc,CAAC,EACjD,EAAU,EAAW,GAAe,EAAA,YAA2B,CAAC,EACtE,OAAO,EAAQ,KAAU,EAAQ,GAAQ,EAAQ,EACnD,CCHA,MACM,EAAyB,CAAC,EAChC,SAAS,EAAe,EAAU,CAChC,GAAI,EAAE,YAAa,GACjB,OAAO,EAAS,EAElB,IAAM,EAAU,EAAW,QACrB,EAAe,CAAC,EAChB,EAAgB,OAAO,KAAK,CAAsB,EACxD,EAAc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